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.
Unfortunately, activation email could not send to your email. Please try again.

Report Writer / Viewer Trouble

Thread ID:

Created:

Updated:

Platform:

Replies:

117352 Oct 2,2014 11:40 AM Oct 7,2014 12:42 AM WPF 1
loading
Tags: ReportWriter
Rich Henning
Asked On October 2, 2014 11:40 AM

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

Anandakumar S [Syncfusion]
Replied On October 7, 2014 12:42 AM

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


CONFIRMATION

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.

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.

;