Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Help with Conditional formatting Post Reply Post New Topic
Author Message
Wesker
Newbie
Newbie
Avatar

Joined: 19 Oct 2015
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote Wesker Replybullet Topic: Help with Conditional formatting
     Posted: 22 Oct 2015 at 11:09pm
Hi,

I'm trying to create a report on Crystal (11.0.0.2269) and having trouble with a conditional formatting formula - Background.

Currently I have:

if {Command.O/S Supplier Update} <> '' then crYellow
else if {Command.Expired} = 'Y' then crRed
else crNoColor

Which is fine, however I need to expand it to factor in a few more options and that's where I have become stuck. Unhappy

Specifically I need:

if {Command.O/S Supplier Update} contains: "Awaiting Relese Since" then crYellow

if {Command.Expired} = 'Y' then crRed

else crNoColor

In addition I also need to create:

If {Command.Original Receipt} is "this week / next week" and {Command.Current Receipt} has not been updated to reflect the above, then crFuchsia

Help would be appreciated! Big%20smile

Thanks,
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Oct 2015 at 3:12am
This assumes you are not dealing with NULL values...
you will have to order this in the fashion that supports your priority process:

if {Command.O/S Supplier Update} in ["","*Awaiting Release Since*"] then crYellow
else
If {Command.Original Receipt} = "this week / next week" and {Command.Current Receipt} <> "this week / next week" Then crFuchsia
Else
if {Command.Expired} = "Y" then crRed
else crNoColor

IP IP Logged
Wesker
Newbie
Newbie
Avatar

Joined: 19 Oct 2015
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote Wesker Replybullet Posted: 26 Oct 2015 at 12:22am
Tanks for the reply.

Unfortunately the above doesn't work on my report Unhappy
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Oct 2015 at 2:31am
More of s description of what is not working would be helpful. I also noticed it should be LIKE rather than IN on the first part of the statement
if {Command.O/S Supplier Update} LIKE ["","*"...
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