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.

Save report as pdf file on IIS error

Hi,
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);


Thanks!

Martin


1 Reply

SR Soundara Rajan S Syncfusion Team 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,
http://www.syncfusion.com/downloads/support/forum/121119/ze/ReportExportDemo898444123.zip

For your reference, we have deployed the above sample in our live server and please find the hosted sample link below,
http://ssrs.syncfusion.com/ReportExport

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

Regards,
Soundara Rajan S.

Loader.
Up arrow icon