开发者

Adding controls to RDLC at runtime

I need to be able to add all of the user uploaded images to my report dynamically. I have all of the images stored in one place and I have the name of all the images stored in the database.

Is this possible with an RDLC or would I ha开发者_如何转开发ve to generate a pdf and then insert my images into that with something like iTextSharp?


I solved this by generating a PDF with just images and then I merge the two PDFs with iTextSharp.


Yes it is possible.

  1. In your RDLC add an image
  2. In the image properties, set the image source to external
  3. For the value of the external source point to a field from your dataset which could be something like: MyImageDirectory+NameOfImageFromDatabase.jpg

If you have multiple images to display, use a tablix or a list to list all of them

One more thing: I had to set my path as an URI to make it work. A string wouldn't work last time I tried.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜