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
close icon

Report Writer / Viewer Trouble

Previously we had implemented the report writer and viewer for exporting reports.  Although since then these methods of exporting reports have been creating files of 0 bytes that no longer have any content.  When rendered through the report viewer the report is displayed properly with all of the proper data, but when using the built in save feature we get similar results with no exception being raised in the code.  We make reference to Syncfusion Report Controls, Viewer, Writer, and Core.  Any thoughts on getting this working?

Below is a sample of our fairly straightforward Report to Pdf method

public void PDF()
            IList results = _printQuery.Search(_criteriaViewModel.Criteria);
            Assembly assembly = _printQuery.GetType().Assembly;
            Stream reportSourceStream = _maintenanceReportFinder.GetReportSourceStream(assembly, ReportType);

            if (reportSourceStream == null)
                _frameworkWindowManager.ShowMessageBox(new MessageBoxParameters("Unable to locate report resource."));

            var reportWriter = new ReportWriter(reportSourceStream);
            reportWriter.DataSources.Add(new ReportDataSource("Dataset", results));

            var printDialog = new SaveFileDialog
                FileName = "Report_" + DateTime.Now.ToString("MM_dd_yyyy") + ".pdf",
                Filter = ".pdf|.pdf"
            var fileName = printDialog.FileName;

            reportWriter.Save(fileName, WriterFormat.PDF);


1 Reply

AS Anandakumar S Syncfusion Team October 7, 2014 04:42 AM UTC

Hi Rich Henning,

This error may occur due to failing in ReportWriter processing, in order for you to get a solution for this behavior, please contact us at Syncfusion Support or you may also open a support ticket by login in to direct trac account and mention this forum link for reference.


Anandakumar S

Live Chat Icon For mobile
Up arrow icon