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.

ReportWriter external local image not exporting to PDF


I'm trying to export a report to PDF directly, without any report viewer control, just one button which exports to PDF and I've been using the ReportWriter class. I know that we can't directly export charts to a report due to UWP limitations as answered here:


So I decided to take a workaround and trying to generate that chart to an image and then loading it into the report dynamically from a local path. Now here comes the different points of view about the problem which I'm stuck at.

On my sample which I've attached below, there's an imagePath property with a local path that needs to point to any image locally.
And then if we take a look at the report we can see 3 images with some borders of different colors:
  1. The first one is an external type of image (source set to "External") set with a local value, the value is assigned via a parameter and programmatically from the code. I've tried a lot of ways of writing the path, none of them worked, till I decided to try an external image with a image online from a website. (Black border)
  2. This second image, is the external image loaded up from a website with its source set to "External", it is showing correctly on the report designer, no issues there so far. (Red border)
  3. And the last image which we have, has the source selected to "Embedded", now this image is also showing on the designer. (Blue border)
Once we launch the sample and click the export button, the filepicker opens up correctly and we can select the path on where to save the PDF. When we open the PDF we can see the following images:
  1. The external image is NOT seen, just the black border.
  2. The external image is NOT seen, even though we can see it in the designer correctly.
  3. The embedded image is seen correctly.
Now the question is, how can we solve this? I know that UWP has some limitations, but we really need to be able to export some kind of chart and now it's just a simple image which we're trying to load dynamically.

Also lastly, we would like to avoid the use of a WebAPI just for that.

Thanks and have a nice day,

Attachment: RdlcExternalImage_3c11c103.rar

5 Replies

VS Vinoth Srinivasan Syncfusion Team April 6, 2017 11:47 AM UTC

Hi Alexandru, 
Thanks for contacting Syncfusion Support. 
We need web client and file browser to get the “external” type image in our source, but these are not supported for UWP without service, so the external images are not shown in your exported report. We can export the external type images by using the web api service. Since you don’t want to use the WEBAPI project, you can achieve this using DataBase image type in image report item. To achieve this add the chart images to your business object collection and insert image report item with “Database” image source type then use the image value date field in value of the report item. 
Vinoth S. 

AP Alexandru Pastor Opris April 19, 2017 04:07 PM UTC

Hi Vinoth,

Sorry for the late response, I've been trying different ways to make this to work but without success so far, is there any chance that you could provide a sample or even more information on how to approach this?

Thanks and have a nice day.

VS Vinoth Srinivasan Syncfusion Team April 20, 2017 03:02 PM UTC

Hi Alexandru, 

You can convert the image stream into byte array and add it to business object collection. Create an image with “Datasource” source type and bind the field value to the image value property to export report to pdf. We have prepared a sample based on this and it can be downloaded from the following location. 

Vinoth S

AP Alexandru Pastor Opris April 21, 2017 07:14 AM UTC

Hello Vinoth,

Thanks for the sample, but unfortunately I can't download the sample because its giving me an error with the code AccessDenied.

Can you please update the link or give me access to it?

Thanks so much, have a nice day.

VS Vinoth Srinivasan Syncfusion Team April 21, 2017 09:44 AM UTC

Hi Alexandru, 

Sorry for the inconvenience caused. 

The sample can be downloaded from the following location. 

Vinoth S. 

Live Chat Icon For mobile
Up arrow icon