开发者

In Reporting services, how do I add an image from a string or cell in the table?

开发者 https://www.devze.com 2023-04-08 13:59 出处:网络
What I\'m trying to do is this: I have a string with the full path to the image. I tried to add an external image to my report and set the image source to my string. but every time I load the report,

What I'm trying to do is this: I have a string with the full path to the image. I tried to add an external image to my report and set the image source to my string. but every time I load the report, it doesn't load the image. How do I do this, or is there a better way of doing this?

开发者_Python百科

Thank you


For an External image, the image source needs to be a URL for the image. Reporting Services will try to get the image using anonymous access.

http://technet.microsoft.com/en-us/library/dd220527.aspx


Ok, I got it figured out. What I did was in the image properties, in the General Tab, I selected the image source as External, I then created a report parameter Called "@ImageURL", and selected it in the "Use this image:". On the form I added this line of code: ReportViewer1.LocalReport.SetParameters(New Parameter("ImageURL", string.concat("file:\","C:\ImagesFolder\ImageName.jpg"))) this brings up the image correctly.

0

精彩评论

暂无评论...
验证码 换一张
取 消