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

Help with sum formula

Status
Not open for further replies.

priyanthan

Programmer
Jul 27, 2008
70
CA
I have a report with duplicate records and need to summarize few fields.

I’m using the following formula (@DisPurchase) to eliminate the duplicate records,

If Onfirstrecord or ({BNSMISRPT.TRANSEQ}) <> previous ({BNSMISRPT.TRANSEQ}) then
{@Purchase}
else 0

When i try to sum the @DisPurchase I’m not able to sum.
Working with CR 8.5 / DB2
Can anyone please help me with this.

Thanks.
 
You can insert a running total that does a sum of {@Purchase}, evaluate on change of field or group (if you grouped on this field): {BNSMISRPT.TRANSEQ}. Reset never or on change of some higher order group. Place in a footer section only.

-LB
 
I cannot even create a running total. i don't see the @DisPurchase in the available fields.

thanks.
 
No, insert a running total and use {@Purchase}--you are doing the equivalent of the formula by evaluating on change of the transeq field.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top