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!

Grouped formula with summed values - ?Use these values in sep formula 1

Status
Not open for further replies.

IceRuby

Technical User
Jan 20, 2004
85
AU
Utilising Crystal Version 10 linked via ODBC to SQL database.

Via a formula I have set up defined groups, then a summation is completed on each defined group. Is it possible to create a specified formula on these group summations?

E.g Grouping formula
if {transaction_type} = "WORK" and {tax_category} = "GROSS"
then "Salaries" else
if {transaction_type} = "ALLOWANCE"
then "Allowance" else
if {transaction_type} = "DEDUCTION" and (paye_tax_category} = "GROSS" and not({short_description} like "*Pre*") and not({short_description} like "SGC")
then "Deductions"

This linked to Group #1 providing me with

Salaries $10,000
Allowance $2,000
Deductions $3,000

Summed values are absolute so I need to be able to create a formula from this group to sum Salaries + Allowances and subtract Deductions. (10,000 + 2,000 - 3000) = 9,000

Appreciate your help
 
Create another formula:

if
(
{transaction_type} = "WORK" and
{tax_category} = "GROSS"
) or
{transaction_type} = "ALLOWANCE"
then {table.amt} else
if {transaction_type} = "DEDUCTION" and
(paye_tax_category} = "GROSS" and
not({short_description} like "*Pre*") and
not({short_description} like "SGC")
then -{table.amt} else
0

Place this in the detail section and then insert a summary on it.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top