Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Formual Canot be used - evaulated later Post Reply Post New Topic
Author Message
Cindy
Newbie
Newbie
Avatar

Joined: 13 Jan 2009
Location: United Kingdom
Online Status: Offline
Posts: 31
Quote Cindy Replybullet Topic: Formual Canot be used - evaulated later
    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
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet 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.


Edited by DBlank - 14 Jan 2009 at 1:13pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet 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?
IP IP Logged
Cindy
Newbie
Newbie
Avatar

Joined: 13 Jan 2009
Location: United Kingdom
Online Status: Offline
Posts: 31
Quote Cindy Replybullet 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
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet 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).
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.061 seconds.