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!

conditional subtotal for a group

Status
Not open for further replies.

cathiec

Programmer
Oct 21, 2003
139
IE
i have a crystal report that is grouped by account code. For each account code there are several entries. If allocation if A or P then i want to sum amount and call it amount invoiced and if allocation is blank then i want to sum amount and call it outstanding, my problem is that i only want to print amount in one column in the group and then have two subtotals. Whatever way i try to do this i can only ever create one subtotal for either amount outstanding or amount invoiced.
 
I think you need to create two formulas, one called amtInvoiced:

"if({allocation} = 'a' or {allocation} = 'p') then {amount} else 0"

one called amtOutstanding:

"if(isNull({allocation}) or {allocation}="") then {amount} else 0"

you then put these two fields alongside your amount field, and can sum these instead.

I hope this helps - if not can you provide a bit more info about table structure and report structure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top