Print Page | Close Window

Formual Canot be used - evaulated later

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5217
Printed Date: 02 May 2024 at 3:06pm


Topic: Formual Canot be used - evaulated later
Posted By: Cindy
Subject: Formual Canot be used - evaulated later
Date Posted: 14 Jan 2009 at 12:46pm

Hello,

Most likely this is simple but I an new to Crystal Reports. I am trying to get a percentage on two calculated fields.  When I input the formula:
(@NotMet)/(@Total of group)*100, I receive the following error:
 
Formula cannot be used because it must be evaluated later.
 
The summary fields are calculated on each group.
 
What is up with that?  How can I get a percentage on two calculated fields?
 
Thanks in advance!!
 


-------------
Cindy



Replies:
Posted By: DBlank
Date Posted: 14 Jan 2009 at 1:12pm

looks like you created formulas for some summary function in the group.

Can you replace these with the standard Summary Functions (e.g. a count, distinct count or sum of the not field and total in group)?
From there just use
{Summary of not met} % {summary of Total of group}
for your percentage formula (these will appear in your report fields and can be dragged and dropped into the formula.


Posted By: DBlank
Date Posted: 14 Jan 2009 at 1:20pm

Now that I look at it do you have 2 groups in this report, 1 that is getting all records in a group and the other that is a sub group breaking these into "met" and "not met" and then you are trying to get percentages at group level 2 on the "met"? You can't do that because the you need a total from group 1 that has not been calculated at group2.

You can handle that in different ways but your result percentage would have to be put at group level 1.
Am I on the right track with the way you have this report set up?


Posted By: Cindy
Date Posted: 14 Jan 2009 at 1:29pm
WinkThank you very much for your response.  I am not using standard summary functions.  I may have done this the hard way :-), I did the count functions as a running total field with a condition.  Example:  count where {database.field} = 1  ( DBF field 1 = Met 0 = Not Met). I have it so it does a count on each group. 
I have two count fields for each group, one as Met and the other Not Met.
I do have a Total count.  Should be easy .......not coming as easy as I thought.
 
Thanks again!! 


-------------
Cindy


Posted By: DBlank
Date Posted: 14 Jan 2009 at 1:40pm
If you are using a running total make sure your formula field is in a footer. Running totals cannot be in headers (summary functions can).



Print Page | Close Window