Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Crystal Reports Aging A/R Report

Posted on 2006-07-11
8
Medium Priority
?
363 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 1000 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
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

 
LVL 101

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 1000 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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 …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

886 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