Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Unable to summarize field Post Reply Post New Topic
Author Message
barleo
Newbie
Newbie


Joined: 23 Sep 2009
Location: Singapore
Online Status: Offline
Posts: 1
Quote barleo Replybullet Topic: Unable to summarize field
    Posted: 23 Sep 2009 at 1:53am
Hi there,
 
i am dying for help here...
I am trying to summarize a formula to be placed on group header 1.
My formula is actually found in group header 2 and it contains:
 
"if {@A27-ClassofService}="Economy" then Sum (gross_ticket_extax, ticket_no)+Sum (total_tax,ticket_no)"
 
is it becos CR cant summarize on a summary?
 
Thanks in advance...
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 23 Sep 2009 at 6:31am
No, it is that Crystal doesn't summarize where the results are variable...The way to summarize this may be a running total, that is DBlank's forte, but the way that I would do it is with shared variables.
 
for your case, probably 3 formulas will be needed, the hard one you already have.
 
In GH1 a reset formula:
shared numbervar total:=0;
"" //to hide the rest
 
In GF1, the display:
shared numbervar total
 
In the GH2, adding the sums together:
shared numbervar total;
local numbervar thisTotal := 0;  //or whatever was displayed before
 thisTotal := Sum (gross_ticket_extax, ticket_no)+Sum (total_tax,ticket_no);
 
total := total + thisTotal;  //increment your sum
 
thisTotal  //display the total for GH2
 
 
HTH
 
 
 
 
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.