Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: total doesn't display value Post Reply Post New Topic
<< Prev Page  of 2
Author Message
Macavity
Groupie
Groupie


Joined: 24 Sep 2012
Online Status: Offline
Posts: 93
Quote Macavity Replybullet Posted: 25 Jul 2013 at 12:02am
onfirstrecord was already in the formula, that doesn't help

made formula fields, results :

@order = S000001
@previousorder = empty
@ordertest : if {order} <> previous({order} then true else false
 result = false (odd)

@invoice = 200
@previousinvoice = 0
@invoicetest : if {invoice} = previous{invoice} then true else false
result = false

so what it should do is the else part : {amount} which is 108000

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Jul 2013 at 3:40am

Using the default values for null should have made your first row in the set be including as the previous value (null) <> the currentvalue

you can also force it to use the via onfirstrecord

Edited by DBlank - 25 Jul 2013 at 3:40am
IP IP Logged
Macavity
Groupie
Groupie


Joined: 24 Sep 2012
Online Status: Offline
Posts: 93
Quote Macavity Replybullet Posted: 25 Jul 2013 at 4:02am
onfirstrecord doesn't work, I think I'm going crazy, I added a line in the formula :

if recordnumber = 1 then shared numbervar balance:= {amount}

and that works !

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Jul 2013 at 4:10am
are you suppressing records?
IP IP Logged
Macavity
Groupie
Groupie


Joined: 24 Sep 2012
Online Status: Offline
Posts: 93
Quote Macavity Replybullet Posted: 25 Jul 2013 at 4:35am
no suppresses
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 25 Jul 2013 at 4:36am
Here, it basically comes down to we don't know what CR is seeing for the various values.

Break your formula into smaller pieces where you can see each value that is involved in a decision...otherwise you're just guessing at what CR is doing, and many times I've seen the error of my logic by doing this.

So for a first step write a simple formula like:
previous({order})

just to see what CR is 'seeing'.

HTH
IP IP Logged
Macavity
Groupie
Groupie


Joined: 24 Sep 2012
Online Status: Offline
Posts: 93
Quote Macavity Replybullet Posted: 25 Jul 2013 at 5:32am
i did that, see above
IP IP Logged
<< Prev Page  of 2
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.016 seconds.