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

Grand Total 1

Status
Not open for further replies.

dawtes

Programmer
Joined
Jun 23, 2005
Messages
31
Location
US
Hi,
Can you help me out on how to find the Grand total of this formula.
if GroupName ({table_name.field_name}) = 'A' then
(67.7 * Count ({table_name.field_name}, {table_name.field_name}))/100
else if GroupName ({table_name.field_name}) = 'B' then
(37.8 * Count ({table_name.field_name}, {table_name.field_name})) / 100
else if GroupName ({table_name.field_name}) = 'C' then
(15 * Count ({table_name.field_name}, {table_name.field_name})) / 100
else if GroupName ({table_name.field_name}) = 'D' then
(53.8 * Count ({table_name.field_name}, {table_name.field_name})) / 100

Thank you
 
You don't need to use groupname in the formula, you can just use the group field itself. Create two formulas:

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

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

-LB
 
Thank you, I got it working
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top