Solved

Crystal Reports Aging A/R Report

Posted on 2006-07-11
8
358 Views
Last Modified: 2008-03-17
I have been given the task of creating an Aging A/R Report from an ODBC Data Source.  I have the connection working and can see the data fine.  What I am having a problem doing is breaking the records out into the different period.
The periods I am trying to get the data into is
Current, 30 Days Past Due, 60 Days Past Due, 90 Days Past Due, 120, Days Past Due
Once I have the data into the report I want to total each records past due by the Customer with the data in the correct buckets.
This is what I was thinking for 30 days past due
IF CurrentDate-{oa_sltrans.due-date}<=0
and CurrentDate-{oa_sltrans.due-date}>=30 then "LessThan30DAYSPD"
But this doesn't work any ideas?
0
Comment
Question by:Rcreese38
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 5

Assisted Solution

by:dkDeveloper
dkDeveloper earned 250 total points
ID: 17084763
Hi Rcreese38,

You're real close there -- try using the DateDiff function instead of just subtracting the dates.

As an example...
DateDiff ("d", Date(2006,01,01), Date(2006,02,01))
Would return 31.

Let me know if you need more help than that.

Good Luck!
dK
0
 
LVL 5

Expert Comment

by:dkDeveloper
ID: 17084779
Hi Rcreese38,

I should have noted that you can use the date fields ({oa_sltrans.due-date} and CurrentDate) directly in the function call, no need to parse those out or anything.

Cheers!
dK
0
 

Author Comment

by:Rcreese38
ID: 17084914
I think I am getting closer using the following
IF CurrentDate-{oa_sltrans.due-date}<=30
and CurrentDate-{oa_sltrans.due-date}>=0 then {@AmountPastDue}

@AmountPastDue is a Field with the Total amount past due that I want to place in place for a the name of the customer.
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

 
LVL 100

Expert Comment

by:mlmcc
ID: 17087433
What doesn't seem to be working?

Where are the formulas placed in the report?

mlmcc
0
 
LVL 17

Accepted Solution

by:
MIKE earned 250 total points
ID: 17087555
Rcreese:
Here is a formula that I use ofter for all my aging reports..you can modify it as needed to fit your AGING DAY requirements.

Try using this formula, changing the datafield names as needed:

if {Yourtablename.field}< dateadd("d",-720, currentdate) then ">720 days" else
if {Yourtablename.field}< dateadd("d",-540, currentdate) then ">540 days" else
if {Yourtablename.field}< dateadd("d",-360, currentdate) then ">360 days" else
if {Yourtablename.field}< dateadd("d",-180, currentdate) then ">180 days" else
if {Yourtablename.field}< dateadd("d",-120, currentdate) then ">120 days" else
if {Yourtablename.field}< dateadd("d",-90, currentdate) then ">90 days" else
if {Yourtablename.field}< dateadd("d",-60,currentdate) then ">60 days" else
if {Yourtablename.field}< dateadd("d",-30, currentdate) then ">30 days" else
if {Yourtablename.field}< dateadd("d",+29, currentdate) then "Current" else "Unknown"

Hope it helps.

Mike V
0
 
LVL 17

Expert Comment

by:MIKE
ID: 17087556
As you can see we LOVE to age our A/R......

MikeV
0
 

Author Comment

by:Rcreese38
ID: 17089972
Thank you for your comments.  I ended up doing it the following way and it is working.
Here is what I used for
30 Days
IF CurrentDate-{trans.table-date}<=30
and CurrentDate-{trans.table-date}>=0 then {@AmountPastDue}
Where @AmountPastDue is a field that subtracts Due Date - Current Date

From 31-60 Days Past Due
IF CurrentDate-{trans.table.due-date}<=60
and CurrentDate-{trans.table.due-date}>=31 then {@AmountPastDue}
Where @AmountPastDue is a field that subtracts Due Date - Current Date

I will split the points for the help and maybe use this way in the future. Between those who respond with code suggestions.  Thank you for your help
0
 
LVL 17

Expert Comment

by:MIKE
ID: 17089996
Glad I could be of help to you.

Mike V
0

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.

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

Suggested Solutions

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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

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