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!

Group Level percentages don't add up to 100%

Status
Not open for further replies.

BeeBear

Technical User
Sep 4, 2005
71
AU
Hi,

If there is an answer to this already somewhere, please point me to it (I couldnt find it).

Anyway, I'm on CR 10, and have a relatively basic summary report, that just displays the total cases per location, and shows what percentage that location has in relation to the report grand total.

Heres what displays if I use 2 decimal places:

Ballarat: 97 (2.22%)
Geelong: 169 (3.87%)
Melbourne: 4096 (93.90%)


These 3 percentages manually add up to 99.99%, because they are only shown as 2 dec places.

Is there a way I can make each %age display so that when the user manually adds the 3 displayed percentages, they get 100%?

Or alternatively, is there a formula I can display in the LAST occurence of the location group, instead of the percentage formula, that will say 94.00% to make the total 100%

Thanks in advance





regards

BB

*** Count your blessings not your problems******
:)
 
You could use a formula like this in place of your group totals, assuming they are placed in the group footer:

whileprintingrecords;
numbervar sumamt := sumamt + sum({table.Amount},{table.location}) % sum({table.Amount});
numbervar rdamt := rdamt + round(sum({table.Amount},{table.location}) % sum({table.Amount}),2);
if rdamt <> sumamt and
nextisnull({table.location}) then
sum({table.Amount},{table.location})%sum({table.Amount}) + sumamt-rdamt else
sum({table.Amount},{table.location})%sum({table.Amount})

-LB
 

Excellent - As usual you came up with the goods!

I replaced my basic percentage formula with your formula above, and it works perfectly!

Thanks :)



regards

BB

*** Count your blessings not your problems******
:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top