Solved

Crystal Reports

Posted on 2013-01-31
2
147 Views
Last Modified: 2013-02-14
Hi,

I have a table filled with accounting bills, I'd like to create a crystal report that groups these bills by their date difference from today, kind of like an aging accounts receivable.

Such as :

0-30 days:
Bill 1
Bill 2
Bill 3

30-60 days:
Bill 4
Bill 5
Bill 6

60-90 days:
Bill 7
Bill 8
Bill 9

I'm wondering if this is at all possible?

Thank you
0
Comment
Question by:FCapo
2 Comments
 
LVL 13

Expert Comment

by:Philip Pinnell
Comment Utility
The way I would do it is to create a view in SQL like

CREATE VIEW MyView
AS

SELECT    
Field1,
... ,
Fieldn,

case
  when datediff(day,datefield,getdate()) < 30 then 1
  when datediff(day,datefield,getdate()) < 60 then 2
  when datediff(day,datefield,getdate()) < 90 then 3
  else 4
end as dategroup
FROM         MyTable

Then base your report on this view and group on 'dategroup' and name each one appropriately.

HTH
0
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
Comment Utility
If you are not allowed to mess with the databse then in CR you can use the same idea.

Create a formula field ...@AgeGroup

Numbervar diff:=Currentdate-{table.datefield};
If diff <=30 then
"0-30 Days"
else
If diff <=60 then
"31-60 days"
else
If diff <=90 then
"61-90 days"
else
"91days and over"

Then group on this formula field.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now