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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Statement Report Balance

Status
Not open for further replies.

Bonnie1

Technical User
Jun 9, 2003
2
US
I have been working on a statement report for several months and I am stumped. There is no Report header or footer. The Page header is blank, but the Page footer shows file path and name. The Group header on the Customer Name lists name, address and print date. The Group footer lists payment method and past month interest earned. The Detail is only 6 columns, Payment Date / Coupon Rate / Description / Principal Activity/ Balance / Interest Amount. I have 3 formulas setting the Principal Activity, Balance Beginning and Balance Ending. They are:

BalanceBeginning //sets beginning balance from the start date (CurCost is Principal at Todays Date and Principal Paid is the principal activity in the negative)
If {?StartDate} < PrintDate Then {CurCost} + {PrincipalPaid}

BalancePrincipal //sets principal activity (DCFlag indicates Debit [0] or Credit [1])
If {DCFlag} = 0 Then {Principal} * -1 Else If {DCFlag} = 1 Then {Principal} * -1

BalanceEnding //sets ending balance
If {?EndDate} <= PrintDate Then {@BalanceBeginning} + {@BalancePrincipal} Else {CurCost}

Using 6 transactions as a sample, this is what I get:

1) 7/1 coupon rate change 0 principal activity 88,248.83 balance
2) 7/1 no coupon change 59.93 principal activity 88,308.76 balance
3) 7/7 coupon rate change 0 principal activity 88,248.83 balance
4) 7/10 no coupon change -13,000.00 prin.activity 75,248.83 balance
5) 7/14 coupon rate change 0 principal activity 88,248.83 balance
6) 7/15 no coupon change 5,000.00 prin.activity 93,248.83 balance

The 1st and 2nd lines are correct, the 3rd line reverts back to 1st line. Obviously this is not what I want. The 3rd line should be 88,308.76; 4th line 75,368.69; 5th line 75,368.69 and the 6th should be 80,368.69.

I know I'm doing something wrong, but I can not see where. I hope someone can help.
 
Your formulas seem to be using only information within each record.

If you need to carry a &quot;balance&quot; from one record to the next, you need to use either a variable or the Previous() function.

Note: make sure you start your formulas with &quot;WhilePrintingRecords;&quot; if you depend on formulas executing in the order the records are displayed...

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thank you - I will try this very soon (month end projects are approaching) and I will let you know.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top