Home > Home, MSDN, SSRS > SSRS : Replace string with an image

SSRS : Replace string with an image

Requirement is like  write an expression in textbox such that based on the value image is replaced.

Let say I have sample data query similar to you data as given below:-

select 'P1' GroupName,'A' Value
union
select 'P1' GroupName,'B' Value
union
select 'P1' GroupName,'C' Value
union
select 'P2' GroupName,'A' Value
union
select 'P2' GroupName,'B' Value
union
select 'P2' GroupName,'C' Value

And I have three images in my desktop as shown below:-

3

Now create a sample report as shown below:-

4

Now right Click on the textbox below the Value column and insert image as shown in below screen:-

111

Once you insert image, its open the image properties as shown below, and click on the expression icon which is also shown in this image:-

222

Expression editor open, where you enter the below expression:-

=IIF(Fields!Value.Value=“A”,“image1”,iif(Fields!Value.Value=“B”,“image2”,“image3”))

333

Images should be added in the report before as shown below:-

444

Run the report, report output looks like below:-

555

So it working, if you like it please like the post below..

Thanks

Prasad

Learn Different BI Tools
Subscribe my YouTube Channel : Know BI Tools

 

Advertisements
Categories: Home, MSDN, SSRS Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: