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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Save report as pdf file on IIS error

Thread ID:





121119 Nov 10,2015 09:02 AM UTC Nov 12,2015 09:55 AM UTC WPF 1
Tags: ReportViewer
Asked On November 10, 2015 09:02 AM UTC

When I use this code in VS in debug all works fine, but when I publish on IIS, don't generate PDF file, create but not populate with data and when try to open get error that file is corrupted.
Please help me, if have any suggestions...
var response = new HttpResponseMessage ();

var dataSources = new ReportDataSourceCollection ();

if (jsonResult.generalDataSet != null)
dataSources.Add (new ReportDataSource { Name = jsonResult.generalDataSet.name, Value = jsonResult.generalDataSet.value });

if (jsonResult.recordDataSet != null)
dataSources.Add (new ReportDataSource { Name = jsonResult.recordDataSet.name, Value = jsonResult.recordDataSet.value });

ReportWriter reportWriter = new ReportWriter (System.Web.HttpContext.Current.Server.MapPath ("~/Reports/ProAurum.rdlc"), dataSources);

MemoryStream stream = new MemoryStream ();

reportWriter.Save (System.Web.HttpContext.Current.Server.MapPath ("~/Reports/test.pdf"), WriterFormat.PDF);



Soundara Rajan S [Syncfusion]
Replied On November 12, 2015 09:55 AM UTC

Hi Martin,

Thanks for contacting Syncfusion support.

We are unable to reproduce the mentioned issue and it’s working fine with our IIS server. We have prepared a runnable sample based on this and it can be downloaded from below location,

For your reference, we have deployed the above sample in our live server and please find the hosted sample link below,

If the issue still persist, please share the reproducible sample with us to validate the issue?.

Soundara Rajan S.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon