Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formula Editor Post Reply Post New Topic
Author Message
colinb
Newbie
Newbie


Joined: 09 Oct 2015
Online Status: Offline
Posts: 3
Quote colinb Replybullet Topic: Formula Editor
    Posted: 22 Feb 2016 at 12:26pm
Good Afternoon

I have a formula with 8 if/then/else statements...if I move the
6th if/then/else statement to the top in the formula editor, my results change...if I then move the 8th one to the top, the results change...etc....
Do you have any idea why it does this and how can I fix it?

Thank you very much
Colin

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Feb 2016 at 3:40am
two things to keep in mind.
first, if you have null values you need to address them first or in each if-then or it will stop evaluating when it hits that null in the row or use the option to 'use default values for nulls'.
second, your if-then runs in sequence, the first if-then condition the row meets ends the execution on that row and returns that "then" value. By changing the order it can change the result because a row might meet more than one if-then but will only return the first in the sequence.

Edited by DBlank - 23 Feb 2016 at 8:20am
IP IP Logged
colinb
Newbie
Newbie


Joined: 09 Oct 2015
Online Status: Offline
Posts: 3
Quote colinb Replybullet Posted: 23 Feb 2016 at 4:35am
ok...thank you
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.