6

Is it possible to add a dynamic picture to a parameter in rdlc report? 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?

Yahfoufi
  • 2,220
  • 1
  • 22
  • 41
C.H
  • 73
  • 1
  • 4

2 Answers2

10

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

In short do the following:

  • Set the picture's Source property to the value External
  • Set the picture's Value property to an expression like =Parameters!PathToPicture.Value
  • Set the EnableExternalImages property of the ReportViewer or the LocalReport object to true
Mariusz Jamro
  • 30,615
  • 24
  • 120
  • 162
Jan
  • 15,802
  • 5
  • 35
  • 59
0

You can set the parameter value to be the path to the selected picture. Then just set the Image Source to External. There are other ways to this; if this is not fine just say.

lc.
  • 113,939
  • 20
  • 158
  • 187
IordanTanev
  • 6,130
  • 5
  • 40
  • 49