David Monti
David Monti

Reputation: 1

crystal report summary calculation

I have a listing of clients grouped by zip code. i have only an interest in the total number of clients in each zip code grouping. I am trying to limit my report to a certain number of groups determined by the user entering a percent as a parameter. For example this is the list of zip code information

zip code c   50 clients    50% of total clients
zip code d   25 clients    25% of total clients
zip code e   10 clients    10% of total clients
zip code a   10 clients    20% of total clients
zip code b    5 clients     5% of total clients

(They have been sorted in order descending order)

Print the report listing the top 80% of total clients.

I have tried using the percentofdistinctcount summary field but I can't get the program to add the values together to meet but not exceed the percentage given as the parameter, 80% in this case. If I try to enter Sum(percentofdistinctcount(fieldname)) I get an error telling me the field can't be summarized. thanks

Upvotes: 0

Views: 279

Answers (1)

Siva
Siva

Reputation: 9101

To the extent you understand the problem use below solution.

You are using a parameter for the percentage and at the same time you are showing data with that input of the paramter.

In this case you need to calculate percentage for all zipcodes in the report and then conditinally supress as per the user input.

Example:

if percent value<80
then false
else true

After the supress apply your summation contion on the displayed results.

If this doesn't help you I apologize

Upvotes: 0

Related Questions