views:

992

answers:

2

Is it possible to add a dynamic picture to a paramter in rdlc? for example:

=SWITCH(Parameters!picture.Value="1","picture1.jpg", Parameters!picture.Value="2","picture2.png") or something similar?

or any other way to use the parameter's value to be the guide for the dynamic picture?

A: 

Hi, there if this suits you you can set paramter value to be the path to the selected picture.The just Set to Image it Source is External.There are outher ways to this if this is not fine just say Best Regards, Iordan

IordanTanev
A: 

Yes this is possible. See this blog entry for a good explanation.

In short do the following:

  • Set the pictures Source property to the value "External"
  • Set the pictures Value property to an expression like "=Parameters!PathToPicture.Value"
  • Set the EnableExternalImages property of the ReportViewer or the LocalReport-object to true
Jan