Crystal Reports

Posted on 2013-01-31
Medium Priority
Last Modified: 2013-02-14

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
Question by:FCapo
LVL 13

Expert Comment

by:George Hirst
ID: 38839990
The way I would do it is to create a view in SQL like


... ,

  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.

LVL 77

Accepted Solution

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"
If diff <=60 then
"31-60 days"
If diff <=90 then
"61-90 days"
"91days and over"

Then group on this formula field.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Watch the video of Kernel Migrator for SharePoint, which demonstrate the process easily of migration from SharePoint to SharePoint, OneDrive for Business & Google Drive servers, Public Folder to SharePoint, File Server to SharePoint. The tool has va…
To export Lotus Notes to Outlook PST or Exchange and Domino Server files to Exchange Server or PST files with ease, go for Kernel for Lotus Notes to Outlook conversion tool. Through the video, you can watch the conversion process. A common user with…

600 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