Page 3 of 3

problem with ProcessPdfRequest() and export Word and RichText

Posted: Mon Nov 21, 2011 11:06 am
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









problem with ProcessPdfRequest() and export Word and RichText

Posted: Tue Nov 22, 2011 8:15 am
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.