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
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.

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."));
                return;
            }

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

            Process.Start(fileName);
        }

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.

Regards,

Anandakumar S


Loader.
Live Chat Icon For mobile
Up arrow icon