We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Starting in 2019, the Reporting control is no longer included in Essential Studio. If you're experiencing issues with the Syncfusion Reporting Platform, Report Viewer, Report Designer, or Report Writer, we recommend migrating to Bold Reports, our dedicated reporting platform.

Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.

We thank you for choosing Syncfusion and appreciate your understanding.

ReportViewer external image?

Hi Is it possible to set a parameter for a image then get the location of the file and the image will be shown in the report based on the location of the image file?



7 Replies

AS Anandakumar S Syncfusion Team November 18, 2015 07:02 AM UTC

Hi Ven,

Yes, Syncfusion ReportViewer have support to view external images. We have prepared a sample to use ReportParameter as image location which gets image path from code behind using SetParameters() API and it can be downloaded from the following location.
http://www.syncfusion.com/downloads/support/forum/121174/EXTERN~11809593332.ZIP

Regards,
Anandakumar S


VE Ven November 18, 2015 07:54 AM UTC

Sir in the sample that you send to me the image isn't showing? can you give me a video tutorial about that?

Thanks,


AS Anandakumar S Syncfusion Team November 18, 2015 09:13 AM UTC

Hi Ven,

The previously shared sample gets image from the application folder location which is passed to parameter value and set to ReportViewer using SetParameters() API. We have prepared a video sample of the application and it can be downloaded from the following location.
http://www.syncfusion.com/downloads/support/forum/121174/ze/ExternalImage1029490323

If you still face the issue in viewing the shared sample then share your Syncfusion Essential studio version details with us.

Regards,
Anandakumar S


NN Nandish NR replied to Anandakumar S June 3, 2017 12:11 PM UTC

Hi Ven,

The previously shared sample gets image from the application folder location which is passed to parameter value and set to ReportViewer using SetParameters() API. We have prepared a video sample of the application and it can be downloaded from the following location.
http://www.syncfusion.com/downloads/support/forum/121174/ze/ExternalImage1029490323

If you still face the issue in viewing the shared sample then share your Syncfusion Essential studio version details with us.

Regards,
Anandakumar S

Hi,

I have followed the steps shared in the sample. However, report is not generating, instead i can see only progress till an long time. After SetParameter(), what function i need to call to save pdf report in preferred location.

I have created, Report viewer instance in .cs and binding report path from locally.

Using ReportWriter, i can able to generate report. However, image is not displaying in generated report. Can you suggest me the best approach to generate report with dynamic image path as pdf.

Regards,
Nandish N R


VS Vinoth Srinivasan Syncfusion Team June 5, 2017 01:55 PM UTC

Hi Ven, 
 
Query 
Response 
I have followed the steps shared in the sample. However, report is not generating, instead i can see only progress till an long time. After SetParameter(), what function i need to call to save pdf report in preferred location. 
 
I have created, Report viewer instance in .cs and binding report path from locally. 
 
You have to call refreshreport() method after SetParameter() method to render the report. Also, if you want to export the report as PDF from report viewer, then you can use the built-in export option in the viewer to export the report. 
Using ReportWriter, i can able to generate report. However, image is not displaying in generated report.  
We request you to provide the image path as parameter and set the image source as “External Type” to export the report with image as PDF. We have prepared sample based on this and it can downloaded from the following location. 
 
Also you can use RDLC report type and convert the image as bytes, assign it to the business data objects and use them to ReportWriter datasource property in code behind. 
 
 
Can you suggest me the best approach to generate report with dynamic image path as pdf 
We can use the ReportWriter class to directly export the reports into PDF without viewing the report output. 
 
Regards, 
Vinoth S. 



NN Nandish NR June 11, 2017 03:12 PM UTC

Hi,

Generated pdf from attached sample program. However, pdf generated with error. please find the attached pdf file and screen shot of error for reference.

Both attached sample are with same error output. If we remove image parameter, pdf will generate with out error.



VS Vinoth Srinivasan Syncfusion Team June 12, 2017 10:46 AM UTC

Hi Nandish, 
 
We were able to export the report with image as PDF at our end from both the shared samples. We have prepared a video demo based on this and it can be downloaded from the following location. 
 
 
If you still face any issue then we request you to modify the previously shared sample to reproduce the problem at our end. It will be helpful for us to validate the problem at our end. 
 
Regards, 
Vinoth S. 


Loader.
Up arrow icon