.net – Include an unknown amount of external images in a report? – Education Career Blog

I am building a report that needs to include photographs, I have no way of knowing how many photos will be taken but they are stored on a file server under folder named after the ID of the report being generated. How would I go about including these in an RDLC?


It’s simple to include images in report if you know quantity and filenames: MSDN How to: Add an Image (Image Wizard)

But in your case if you don’t know how many images should be displayed, you have options:
– save image file names in DB and select them with sql from report
– create web service to gether image file names from directory and pass it in report as a datasource. Reporting Services: Using XML and Web Service Data Sources

Next in report use Table or List, place Image there and set url/path to Image from datasource field.


I’m a PHP guy so my answer needs to be filtered, but in PHP you’d do a directory reading and then review each file in the directory to make sure it was a suitable image type for including.


and the a for a while loop to review the file name extensions to make sure you’re including only images.

Leave a Comment