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!

Grandtotal for Crystal Formula

Status
Not open for further replies.
Dec 10, 2003
4
US
Hello,

I have been unable to calculate a grandtotal for the crystal formula below in my report footer. I have tried to create another formula to generate the grandtotal, but I am receiving negative results.

Formula is : if Sum ({emp_earnings.qtd_hours}, {V_TFX_EMPLOYEE_PROFILE.person_id})<520 then
Sum ({emp_earnings.qtd_hours}, {V_TFX_EMPLOYEE_PROFILE.person_id})*{@hrly rate}*{?per pay}/100 else
if Sum ({emp_earnings.qtd_hours}, {V_TFX_EMPLOYEE_PROFILE.person_id}) >520 then
520*{@hrly rate}*{?per pay}/100

Any suggestions?

Thanks for your help.
megmccartney
 
Assuming that your formula (let's call it {@pay}) is working at the group level, then create two additional formulas:

//{@accum} to be placed in the group footer or header:
whileprintingrecords;
numbervar sumpay := sumpay + {@pay};

//{@display} to be placed in the report footer:
whileprintingrecords;
numbervar sumpay;

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top