Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Crystal Reports

Posted on 2013-01-31
2
Medium Priority
?
159 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
ID: 38839990
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 2000 total points
ID: 38840126
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

916 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