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

Is it possible to conditionally add dollar amounts?

Status
Not open for further replies.

suefhmis

Instructor
Jan 24, 2002
25
0
0
US
I'm using CR 8.5.
I'm creating a report and the customer would like the total of the Dollar Amount field, but if the record has a payment type of "Due", "CWA", "No Charge", or "Pre-Need", that dollar amount should NOT included in the total. But it does need to be displayed on the report. For example:

Joe Schmoe Check $120
Jane Doe Due 80
Jim Roe Cash 100
Jerry Blow No Charge 50
Total $220

I'm sure there's an easy way to do this, just can't figure it out myself! Thanks.
 
You can create a Running Total to accomplish this.

Create a new Running Total from the Field Explorer.

Field to Summarize: {table.amount}
Type of Summary: Sum
Evaluate: Use a Formula...
Code:
          {table.payment} = "Check"
Reset: This depends on if your are grouping and if you want to reset at the group level. If there is no grouping, choose Never. If there is grouping, choose On change of group, and select the appropriate group.

Also, the formula for Evaluate may need to change depending on what payment types are valid for Summing.

~Brian
 
Or you could create a formula for the details section:

if not({table.paymenttype} in ["Due", "CWA", "No Charge", "Pre-Need"]) then {table.amt}

And then insert a summary (sum) on this formula. Both running totals or formula methods will work, but running totals will slow your report more than the formula approach.

-LB
 
Oops - forgot to uncheck the TGML:

Or you could create a formula for the details section:

if not({table.paymenttype} in "Due", "CWA", "No Charge", "Pre-Need") then {table.amt}

And then insert a summary (sum) on this formula. Both running totals or formula methods will work, but running totals will slow your report more than the formula approach.

-LB
 
One more time to get the brackets:

Or you could create a formula for the details section:

if not({table.paymenttype} in ["Due", "CWA", "No Charge", "Pre-Need"]) then {table.amt}

And then insert a summary (sum) on this formula. Both running totals or formula methods will work, but running totals will slow your report more than the formula approach.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top