Solved

Crystal Reports

Posted on 2013-01-31
2
152 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 500 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

830 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