I have a small web site where I maintain user data, and I maintain the user data in a table that stores their image using a relative URL on the website, like "/images/users/user_id.jpeg".
I am using the ReportViewer control in the asp.net page to show reports from SSRS in the web application.
Now our users want reports to show their image in reports that they can export as pdf and print.
In the SSRS report I tried using an HTML image tag with both full and relative URLs with the option to render HTML, however it's not working.
I tried using the image control in the toolbox with an external URL and that also appears to be not working.
Can someone please help me get around this problem or guide me to some helpful links.
Thanks all.
It will be a lot easier to set up the report so that your users can see the image, if you can see the image in preview in Report Designer.
Make sure you have a working URL that takes you to one of your images. Test it, by pasting the URL into the address bar of your browser and ensure that the image is displayed in the browser.
Delete the existing image from your report. Insert a new image into the report object (normally a list or table) you are using to display your table. (This should be where the old image was.)
Specify Web as the image source, and enter your working URL as the URL of the image.
Preview the report in the report designer. You should be able to see the image (with the hardcoded URL) displayed correctly in the report.
Assuming all images are stored in the same directory on your server, switch to the layout tab of your report designer and click on the image object. In the Properties window, the value attribute should be the harcoded URL.
Click on the <Expression...>
option from the dropdown menu for the Value attribute. Edit the expression so that it says ="
your URL, without the filename" & Fields!
your image filename data field name.Value
Preview the report in the report designer. You should be able to see the appropriate image for your data displayed correctly in the report.
If everything has gone correctly up to this point, deploy the report and try viewing it in the Report Manager. You should be able to see the appropriate image for your data displayed correctly in the report.
At this point, your users should now be able to see the report images.