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

Creating a subtotal of a percentage of count set of values

Status
Not open for further replies.

celie

Technical User
Sep 16, 2003
5
0
0
GB
Ive just started using Crystal 8 and am trying to create a subtotal of a "percentage of count" field.

So, the total will just return 100% if correct.

I know I could just put in 100% in a text box but I would like to know how to do this by creating a field or formula.


 
Due to rounding, it may not be 100%

The solution is dependent upon how you created the percent of count field.

You might create a variable to amass these, or leverage some existing formula that you created.

-k
 
Try a formula like this in the details section, substituting your own fields:

whileprintingrecords;
numbervar percenttot := percenttot + {table.amount} % sum({table.amount},{table.yourgroupfield});

To display the result in the group footer, use:

whileprintingrecords;
numbervar percentot;

Just click on the percent icon to format as percentages.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top