Tips and Tricks
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Tips and Tricks
Message Icon Topic: Sum Formula in Group Post Reply Post New Topic
Author Message
joshdooley
Newbie
Newbie
Avatar

Joined: 26 Mar 2009
Location: United States
Online Status: Offline
Posts: 4
Quote joshdooley Replybullet Topic: Sum Formula in Group
    Posted: 27 Mar 2009 at 6:38am
I have a formula that is inserting a "1" into the report if a job is a "warranty" job.  This formula is working.  Now, I want the "sum" of those items on the report.  Crystal 2008 is not letting me do it.
 
The name of this formula is "Warranty"  It is working.
if GroupName ({WORK_ORDER.LOT_ID}) = "W" then 1
 
I created a second formula called "Warranty Count."  The formula that I attempted to use to "sum" the "1" totals is
 
if {@Warranty} = 1 then Sum ({@Warranty})
 
Crystal 2008 is giving me an error, "This field cannot be summarized."  I also tried
 
if {@Warranty} = 1 then Count ({@Warranty})
 
Also tried
 
Sum ( {@Warranty})
 
Same error, "This field cannot be summarized." 
 
Also, I cannot right click and "INSERT SUMMARY" into the report.  Crystal 2008 is not allowing it for this particular scenarios.  
 
 
 Any help is appreciated!


Edited by joshdooley - 27 Mar 2009 at 12:51pm
IP IP Logged
joshdooley
Newbie
Newbie
Avatar

Joined: 26 Mar 2009
Location: United States
Online Status: Offline
Posts: 4
Quote joshdooley Replybullet Posted: 03 Apr 2009 at 10:36am
Any ideas on this one guys and gals?
IP IP Logged
Chrissy
Newbie
Newbie


Joined: 01 Apr 2009
Online Status: Offline
Posts: 9
Quote Chrissy Replybullet Posted: 03 Apr 2009 at 2:12pm
What if you try declaring a variable where you assign the 1...
 
 
something like
 
 
shared numberVar x;
 
if GroupName ({WORK_ORDER.LOT_ID}) = "W" 
        x := x + 1;
        1
 
 
Then you would need to add two other formulas, one setting the x variable to zero and putting in the appropriate place on the report.  and then another one with just the value of x to give you the sum.
IP IP Logged
shijobaby
Newbie
Newbie


Joined: 28 Nov 2009
Location: India
Online Status: Offline
Posts: 1
Quote shijobaby Replybullet Posted: 28 Nov 2009 at 9:57am
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.031 seconds.