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

Column Totals Questions

Status
Not open for further replies.

vafishing

Programmer
Jul 18, 2001
35
US
Using CR8.5. There is probably a simple answer to this question but here goes. I have four columns of totals:
@pledge(if gifttype='p' then giftamount)
@payment(if gifttype='y' then pledgepayment)
@writeoff(if gifttype='w' then writeoff)
@Due(@pledge-@payment+writeoff) Each transaction is listed seperately. Here is the problem. If a payment is made it produces a negative balance if it pays off the pledge, which makes sense based on the formula. If this happens, I need it to default to 0. We do not want to show negative balances on the Due Column. Is there a way to do this and still enable the Due column to sum properly and give me a group and grand total?
 
Try changing {@Due} to:

If({@pledge}-{@payment} +{@writeoff}) < 0 then 0 else
({@pledge}-{@payment}+{@writeoff})

You can insert summaries and grand totals on this formula. I'm not totally sure this is what you are looking for though.

-LB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top