Solved

Crystal Reports Aging A/R Report

Posted on 2006-07-11
8
351 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
 
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
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.

744 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