Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add aging to customer statement 2

Status
Not open for further replies.

mjbosko

Programmer
Jun 26, 2002
248
US
I've been asked to add the aging onto our customer statements.

cr8.5/vb6/sql7

I'm passing a recordset to CR (via ttx method) and it contains the age of each invoice. recordset looks like this:

CustID Inv# Amt Date Age
1235 100 4.00 3/1/2000 1
1235 101 10.00 3/5/2000 5
1235 130 15.00 6/2/2000 92 (guessing).
1222 100 4.00 3/6/2000 6

After i display my detail records, they want a box that shows the amounts w/in a age range:

0-30: $14.00
31-60:
61-90:
90+: $15.00

How is this accomplished??
 
Hi !

One way is to create four formulas that you place in the detail section (suppress the fields):

if {YourTable.AGE} <= 30 then
{YourTable.AMT}
else
0


if {YourTable.AGE} > 30 and {YourTable.AGE} <= 60 then
{YourTable.AMT}
else
0


if {YourTable.AGE} > 60 and {YourTable.AGE} <= 90 then
{YourTable.AMT}
else
0


if {YourTable.AGE} > 90 then
{YourTable.AMT}
else
0


(AGE must be a number or you will have to use the ToNumber function)

Now you insert a summary (Grand Total), and there you have the values that you can put in your box.

/Goran
 
And you can do group totals of these formulas as well, if your report needs these numbers once per group. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top