Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Hide/Show images besed on field value Post Reply Post New Topic
Author Message
waely
Newbie
Newbie


Joined: 20 May 2009
Online Status: Offline
Posts: 8
Quote waely Replybullet Topic: Hide/Show images besed on field value
    Posted: 21 Aug 2009 at 2:20pm
Hi,
I have a field that has values (1,2,3) and I would like to show three images (green, yellow, red) based on the value of that field.
 
is there a way I can set the path of the image based on the field value or can I just set the width and length sizes of the images to 0 when they're not equal to that field value?
 
any suggestion is appreciated.
thanks
IP IP Logged
Jyri
Newbie
Newbie


Joined: 19 Aug 2009
Location: Finland
Online Status: Offline
Posts: 13
Quote Jyri Replybullet Posted: 24 Aug 2009 at 12:12am
Hey,
 
I think there are few ways to do this, but I would do it like this :
 
First insert a text field to report where you want to show the colors. Then right click the text field and select format text.
Go to Border tab, and there press the x-2 in backgroud.
Put something like this to the formula field :
 
if {table.fieldname} =1 then green else
if {table.fieldname} =2 then yellow else
{table.fieldname} =3 then red
 
- Jyri
IP IP Logged
waely
Newbie
Newbie


Joined: 20 May 2009
Online Status: Offline
Posts: 8
Quote waely Replybullet Posted: 24 Aug 2009 at 8:30am

Jyri,

I have images that I like to show instead of changing the bg color.
thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 24 Aug 2009 at 8:59am
can't remember how to change the pic based on this but you can easily add all 3 objects (pics) to the space you want to display then conditionally suppress each based on your needs 
e.g.
pic #1 suppress as: NOT ({table.field}=1)
pic #2 suppress as: NOT ({table.field}=2)
pic #3 suppress as: NOT ({table.field}=3)


Edited by DBlank - 24 Aug 2009 at 9:00am
IP IP Logged
waely
Newbie
Newbie


Joined: 20 May 2009
Online Status: Offline
Posts: 8
Quote waely Replybullet Posted: 24 Aug 2009 at 10:58am
thanks. that worked.
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.