Hello friends
I have a problem displaying a picture on a table detail based on a value of
a column.
If this column have a value greather than 10, show a image, else show
another image. I don't know how to call the images on the statement below
=IIf(Fields!DIAS.Value > 10, show_image_1, show_image_2)
I've added the images to the project as a embedded images.
Can anyone please help me or give me an example?
Thanks for Help
BrunoI only know one line of VB code, which is what I use to show/hide
report elements. Maybe you can use it to help you write yours to work
the way it needs to.
=IIF(Parameters!ReportGroup.Value = 1 AND Parameters!ReportType.Value =1, False, True)|||Hi Bruno
I'm only a novice, but this works:
Create two identical table rows, one below the other, each row has one cell
showing the (same) database field - e.g. "ID" and one cell to hold the
appropriate image - row 1 holds image1, row2 holds image2.
Now set the visibility of each row using expressions:
row1: =iif(Fields!ID.value<10,true,false)
row2: =iif(Fields!ID.value>=10,true,false)
when you run the report, the rows will be visible with the appropriate
images appearing as the ID.values change
~grasshopper~
"Bruno" wrote:
> Hello friends
> I have a problem displaying a picture on a table detail based on a value of
> a column.
> If this column have a value greather than 10, show a image, else show
> another image. I don't know how to call the images on the statement below
> =IIf(Fields!DIAS.Value > 10, show_image_1, show_image_2)
> I've added the images to the project as a embedded images.
> Can anyone please help me or give me an example?
> Thanks for Help
> Bruno|||Create an image control on the report, make it show one of the images
you've embedded. In the properties of the image, you should be able to
see how the image is referred to in the "value" property. Now wrap the
=IIf statement around this. The image name will have to be in double
quotes because you are passing a string value to the property. For
example;
=IIf(Fields!DIAS.Value > 10, "Image1.gif", "Image2.gif")
If you wanted to show now image you could do;
=IIf(Fields!DIAS.Value > 10, Nothing, "Image2.bmp")
I haven't tried this but see no reason it shouldn't work for both
RS2000 or RS2005.
Cheers
Chris
Bruno wrote:
> Hello friends
> I have a problem displaying a picture on a table detail based on a
> value of a column.
> If this column have a value greather than 10, show a image, else show
> another image. I don't know how to call the images on the statement
> below
> =IIf(Fields!DIAS.Value > 10, show_image_1, show_image_2)
> I've added the images to the project as a embedded images.
> Can anyone please help me or give me an example?
> Thanks for Help
> Bruno
没有评论:
发表评论