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

% on total problem

Status
Not open for further replies.

koolskins

IS-IT--Management
Nov 22, 2003
79
US
CR 10 against an Informix database...

I have a simple report with one group showing a vendor sadbus classification. There are about 8 classifications reported. I need to show the po value percentage of each classification, but instead of against the grand total, the percentage is being based on the sum of two of the classifications only. I have a formula to add the total cost of the two primary classifications and have that value in the report footer. I then use a formula to calculate the percentage of each group total based on the "group total / report footer total". All of the classification percentages are correct except for whatever classification is being printed first; it always shows 100%. I have used the specified order group option and have moved the order around and it always calculates the first classification as 100%. What am I missing here?
 
It sounds like you are using running totals or something. Your formula for the two classifications should look something like:

//{@twoclass}:
if {table.class} in ["A","B"] then {table.amt}

It's hard to tell what your group field is--is it on {table.vendor}? Then your percentage formula should be:

sum({@twoclass},{table.vendor}) % sum({@twoclass})

This would be placed in the vendor group header or footer section. Click on the % icon in the toolbar to get the percent sign.

-LB
 
Thanks. The group was by the sadbus classification and your formula was just what I needed. Appreciate the assist.

-Rw
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top