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!

How to calculate percentage from group total and display in Details

Status
Not open for further replies.

thuynh32

Technical User
Oct 22, 2010
3
US
Hello,

Could you please help me to calculate percentage as per person and display under %TotalClaims? The data I already got in CR as follow:

(Group Header) by FUNDING
=====================================
(Details)
Name TotalClaims %TotalClaims
------------------------------------
John $101,000 ?
Jane $201,569 ?
Joe $55,987 ?
Jim $66,543 ?
David $155,789 ?
=====================================
(Footer) $580,888

Please show me how to call the Total(from Group Footer) as $580,888 and calculate the percentage for each one of the items in Details area.

Thanks a million

Ethan
 
I don't think you need to "call the Total".
just put a formula -- {Detail Value} % {Total Value} --
for each detail section.
This Total should work as Global.
If not, put whileprintingrecord; at the top of the formula.
 
{table.totalclaims} % sum({table.totalclaims})

Then click on the % icon.

-LB
 
I was using lbass' suggestion and work like a charm. And thank you all for your prompt assistance.

On this matter; I know that there are other way to do this that I saw somewhere is to create 1 fomular and place them in the header (or footer) and another fomular to display (or to call) the group total in Details view.

If possible, can you guys show me how to do that too? :)

Thanks,
 
I can't imagine why you would want to do something that is more complicated than necessary. The only time I can think of that something like this is necessary is if only running totals will return the summary. Then you could insert a subreport (a copy of the current report) in the group header (linked on the groupfield) where you would add a formula that shares the group total with the main report sections below, as in:

whileprintingrecords;
shared numbervar rt1 := {#grptot};

Then in the main report detail section, you could use formulas like this:

whileprintingrecords;
shared numbervar rt1;
{table.totalclaims} % rt1

You'd want to add a reset formula for the shared variable in the group footer:

whileprintingrecords;
shared numbervar rt1 := 0;

-LB
 
That is exactly what I need. Thanks LB for your prompt respond and thoroughly explaining the steps.

Best regards,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top