Solved

Crystal Reports Aging A/R Report

Posted on 2006-07-11
8
356 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

813 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

12 Experts available now in Live!

Get 1:1 Help Now