Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: running total skipping first record Post Reply Post New Topic
Author Message
geeveebee
Newbie
Newbie


Joined: 03 Jul 2014
Online Status: Offline
Posts: 8
Quote geeveebee Replybullet Topic: running total skipping first record
     Posted: 28 Sep 2015 at 1:35am
Hello,

I'm investigating a bad SUMming in a report I made.

It appears that a running total is not being set on the first record.

Could the evaluate check on the previous record be the culprit since there is no previous record?

If so can I change it to something like

if this<>previous and recordcount=0 then true else false




IP IP Logged
geeveebee
Newbie
Newbie


Joined: 03 Jul 2014
Online Status: Offline
Posts: 8
Quote geeveebee Replybullet Posted: 28 Sep 2015 at 2:26am
I seem to have found a solution for my problem.

adding an additional check for onfirstrecord and reversing the evaluation  seems to be the cure.

if onfirstrecord or {myfield} <> previous({myfield}) then true else false



Edited by geeveebee - 28 Sep 2015 at 2:28am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Sep 2015 at 5:45am
Also consider how your report is handling NULLs.
If your formula field is not using default values for nulls and you have a previous() function the first row will 'fail' because it is comparing to a NULL value.
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