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

Group A less Group B, formula needed 1

Status
Not open for further replies.

Jpln

Technical User
Feb 23, 2005
67
GB
I have a report which Sub totals a Group. The report is grouping by a status of 2 possible outcomes, CASH and SALES. I need to add a formula to the end of the report which will show SALES minus CASH.

How do you go about tyring to make a formula for a sum which is the result of a group.

Thanks
 
Create 3 formulas.
// CashAmt
If {table.status} = "Cash" then
{table.amount} else 0

// SalesAmt
If {table.status} = "Sales" then
{table.amount} else 0

// TotalDiff
Sum({@SalesAmt}) - Sum({@CashAmt})

Place formulas CashAmt and SalesAmt in the detail section and place formula TotalDiff in report footer.

MrBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top