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

Conditional Field Percentage

Status
Not open for further replies.

AyJayEL

Technical User
Jan 30, 2001
425
GB
I have a report grouped by course. There are 4 categories of student on a course. Completed, withdrawn, continuing and transferred.

I have created four conditional fields like this.

If {cat} = 1 then 1 else 0 (where {cat 1 equals completed, cat 2 equals withdrawn etc). I have a sum on these formula. I have a summary that totals all the students.

How do I create a field for the group footer that shows the percentage of courses complete, withdrawn etc compared to the total number of students. If I use the percent formula I get a message that says Cannot Create Summary etc. Learn something new every day *:->*
 
Hi !

If I get you right you have a count of students per course and a sum for each of your formula fields. Right ?

Then I think you would be able to make a formula for each category that looks something like this to put in your group footer:

Sum ({@completed}, {table.courseID}) / Count ({table.studentID}, {table.courseID}) * 100

etc. etc.


Hope this will help you.
/Goran
 
Goran

When I use this formula

Sum ({@Complete},{Qualads2.Q02_RCODE})/Count ({Qualads2.REF},{Qualads2.Q02_RCODE})*100

I get the message - The Summary/Running Total field could not be created.

This happens as soon as I go to save the formula. I am using Crystal 8 by the way.

Do you know the meaning of this message please?

Andrea Learn something new every day *:->*
 
By the way this formula works in the Report Footer

Sum ({@Complete})%Count ({Qualads2.REF})

But of course I would ideally like a breakdown per course.

Many thanks for you assistance in this.

Andrea Learn something new every day *:->*
 
Does the formula @complete contain a summary operation? if so you cannot summarize a summary operation and therefore you are getting this error.

If this is the case please adivse. Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
@Complete has a formula like this -

if {Qualads2.Q19_CSTAT} = 2
then 1
else 0

Would you call it a summary?

Andrea Learn something new every day *:->*
 
No that is not a summary, and I do not know why you are getting the error.

Try replacing the numerator of your division with a 1, and saving your formula to see if you get an error message. Then try replacing the denominator of your formula with a 1 and saving it and see if you get an error message.

This way we cna at least narrow down which summary operation, the Sum or the count, or both are having problems. Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Hmmm.... Well whether I replaced the numerator or the denominator I got the same message.

Sigh...

Here is the formula copied and pasted here incase I am doing something completely stupid (has been known).

Sum ({@Complete},{Qualads2.Q02_RCODE})/Count ({Qualads2.REF},{Qualads2.Q02_RCODE})*100

Andrea Learn something new every day *:->*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top