Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: If Then w. multiple actions Post Reply Post New Topic
Author Message
SpencerRichman
Newbie
Newbie


Joined: 28 Feb 2017
Online Status: Offline
Posts: 1
Quote SpencerRichman Replybullet Topic: If Then w. multiple actions
    Posted: 03 Mar 2017 at 10:03am
I am trying to use the Formula Workshop to write a formula that will look at a data field and if it isNull, then I want it to (1) enter "MISSING" in the field and (2) highlight the field in yellow.  I am trying the following:

if IsNull({Customers.Address Line 1}) = TRUE then "MISSING" ELSE {Customers.Address Line 1};
if IsNull({Customers.Address Line 1}) = TRUE then cryellow else crNoColor

I am not getting an error message, but nor is it working.  Instead I am getting a large number and the field is not highlighted in yellow.

Any ideas?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Mar 2017 at 2:37am
The background color formula needs to be placed in the location that controls that.
Right click on the field
select format field
select Border Tab
select the formula button (x-2) next tot he Background option
enter your formula there
if IsNull({Customers.Address Line 1}) then cryellow else crNoColor

For your other formula, are you placing the formula field on the canvas or the original address field?
The formula does not alter your data, it is not an update script. You need to use the formula field as your display data. The above format formula needs to be applied to this this formula as well.
Also keep in mind if you have any empty strings this will not change it to 'Missing'
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.078 seconds.