×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Find a percentage of a total of counts

Find a percentage of a total of counts

Find a percentage of a total of counts

(OP)
I am trying to make a summary-type report where one column shows a count of entities used to make that line.  I have a total of all the counts in the report footer line.  I want to make a column that shows the percentage of counts relative to the total number of counts.  Any suggestions???

RE: Find a percentage of a total of counts

(OP)
I am using cr8.0

RE: Find a percentage of a total of counts

You should be referring to group and report sections, not "lines". If you mean you have a count at a group level, and you want a percentage based on the grand total, then use a formula like this:

count({table.entity},{table.groupfield}) % count({table.entity})

Not sure whether you want this to be a distinctcount or not, but edit as necessary.

-LB

RE: Find a percentage of a total of counts

(OP)
Ok, I got this one -- here's another -- when I try to total a column containing a formula which is

sum (calculation)

I get the error message:  The summary / running total field cannot be created.

I am using cr ver 8.0

Is there any way around this???

Thanks in advance.

RE: Find a percentage of a total of counts

You need to show the content of the formula.

-LB

RE: Find a percentage of a total of counts

(OP)
Sorry I wasn't more expedient on my reply -- still
learning the group protocol.

Anyway, in the Group 1 Header I have the following:

    column for item numbers
    column for count of item numbers
    column for sum of weight
    column for percentage of sum of weight
    column for pieceweight
    formula @pcs
              sum ({wt},{item})/{piecewt}

the above error occurs when I try to total @pcs

I am truly appreciative of your support!
 

RE: Find a percentage of a total of counts

First, I believe you are in the wrong forum--try forum149: Business Objects: Crystal Reports 4 Other topics or forum767: Business Objects: Crystal Reports 1 Formulas in the future.

You cannot insert sums on formulas that already contain summaries or that use any function that requires a sequential evaluation of records, like Previous() or next(). In this case, you would need to use a variable to sum your formula. The following assumes you are summing at the grand total level:

//{@accum} to be placed in the section containing the {@pcs} formula:
whileprintingrecords;
numbervar sumpcs := sumpcs + {@pcs};

//{@display} to be placed in the report footer:
whileprintingrecords;
numbervar sumpcs;

-LB

RE: Find a percentage of a total of counts

(OP)
This worked very well -- I thank you.

I will certainly look at the other forums if I need further help -- Thanks again.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close