Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Running Totals Post Reply Post New Topic
Author Message
Lanita
Newbie
Newbie
Avatar

Joined: 28 Mar 2008
Location: United States
Online Status: Offline
Posts: 2
Quote Lanita Replybullet Topic: Running Totals
     Posted: 28 Mar 2008 at 1:39pm
I have created a manual running total that uses a compare to the previous record to know when to increment and it works fine from Crystal 11, however I need to load it into an application whose Crystal viewer doesn't like that comparison when it is the first record (no previous record to compare so it does nothing on the first record thus the running total is off by 1).  I added code to the total that is adding up in the running total field that if the record number is 1 then . . . but this doesn't seem to help (again, it works fine in Crystal but not after I load it into the application). 
 
Is there any other way to deal with using a compare to previous record for the first record on the report where there is no previous record to compare?
 
I've been struggling with this for weeks and feel rather beat up! Ouch
IP IP Logged
andymc
Newbie
Newbie
Avatar

Joined: 17 Mar 2008
Location: United States
Online Status: Offline
Posts: 18
Quote andymc Replybullet Posted: 31 Mar 2008 at 11:12am
There is a function called 'OnFirstRecord' - so use this to tell the formula not to compare to previous record if is OnFirstRecord
Andymc
IP IP Logged
Lanita
Newbie
Newbie
Avatar

Joined: 28 Mar 2008
Location: United States
Online Status: Offline
Posts: 2
Quote Lanita Replybullet Posted: 31 Mar 2008 at 1:01pm
 Thank you for your response.  I did that but it still is adding 1 in the footer.  I have the running total adding just fine.  The last record shows a number of 36 in the running total field which is the correct number, but when I put the display in the report footer, it adds one and shows 37.  It does this on 2 out of  16 columns and those two columns both have a number in the first record that should be included in the running total (and is included in the running total on the detail line) but it increments by one in the report footer.  My question is:  Why is it incrementing in the footer and what can I do to prevent that from happening?
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