problem with ProcessPdfRequest() and export Word and RichText

Stimulsoft Reports.WEB discussion
sofiane
Posts: 43
Joined: Fri Jun 17, 2011 8:33 am
Location: france

problem with ProcessPdfRequest() and export Word and RichText

Post by sofiane »

Hello,

Thank you for your response.

How can I controle the returned exported report ?

ie:
when we clic on "Export WORD" that returns Report1 exported as report.doc file.
when we clic on "Export Pdf" that return Report2 exported as report.pdf file.

"Report1.mrt" and "Report2.mrt" are differents reports.
Report1 is the report viewed
Report2 is Report1 modified








HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

problem with ProcessPdfRequest() and export Word and RichText

Post by HighAley »

Hello.
sofiane wrote:Thank you for your response.

How can I controle the returned exported report ?

ie:
when we clic on "Export WORD" that returns Report1 exported as report.doc file.
when we clic on "Export Pdf" that return Report2 exported as report.pdf file.

"Report1.mrt" and "Report2.mrt" are differents reports.
Report1 is the report viewed
Report2 is Report1 modified
Please, try to use next code:

Code: Select all

        protected void StiWebViewer1_ReportExport(object sender, Stimulsoft.Report.Web.StiExportDataEventArgs e)
        {
            if (e.Settings is StiWord2007ExportSettings)
            {
                e.Report.Load("Report1.mrt");
                e.Report.Render(false);
                //change reports properties if need
                // ...
                //change export settings if need
                // ...
                //(e.Settings as StiWord2007ExportSettings).ImageQuality = 1;
            }
            if (e.Settings is StiPdfExportSettings)
            {
                e.Report.Load("Report2.mrt");
                e.Report.Render(false);
                //change reports properties if need
                // ...
                //change export settings if need
                // ...
                //(e.Settings as StiPdfExportSettings).ImageQuality = 1;
            }
        }
Thank you.
Post Reply