Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: RF Total Post Reply Post New Topic
Author Message
Runner
Newbie
Newbie


Joined: 08 Feb 2013
Online Status: Offline
Posts: 22
Quote Runner Replybullet Topic: RF Total
     Posted: 05 Feb 2014 at 11:00am
I am trying to summarize in the report footer the following formula:
Sum({@OTHrs}, {EEName}) * {@OTDiff}

The formula is in the GF and not detail. When I try to insert this in my RF it pulls the last number and not a total.

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Feb 2014 at 11:11am
placing fields in a footer (group or pag or report) will display the data form the last detail detail row prior to it existing (even if the detail row is suppressed).
You also cannot summarize a summary.
IP IP Logged
Runner
Newbie
Newbie


Joined: 08 Feb 2013
Online Status: Offline
Posts: 22
Quote Runner Replybullet Posted: 05 Feb 2014 at 11:28am
How would I get the total in the RF? The field I am trying to sum is a formula calculating a dollar difference by employee from a timecard. The difference calculation by employee only works in the GF.
Thanks.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Feb 2014 at 11:32am

you can likely use Shared variables to add the values from each group footer and then display in the total in the report footer.

You will need 3 formulas
1 to set the value to 0 in the report header
1 to add the values on each group footer
1 to dsiplay the final result in the report footer
IP IP Logged
Runner
Newbie
Newbie


Joined: 08 Feb 2013
Online Status: Offline
Posts: 22
Quote Runner Replybullet Posted: 05 Feb 2014 at 11:54am
The formula that goes into the detail I cannot get to work. I receive the error remaining text not part of forumula.
Shared numbervar var1: = 0;
var1= var1 + {@TotalHrs}
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 06 Feb 2014 at 5:19am
var1:=var1 + {@TotalHrs}

also, just in case CR is anal, := not : =

HTH
IP IP Logged
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