Page 1 of 1

how to export report to PDF, RTF, XLS and DOC

Posted: Tue Sep 23, 2008 9:22 am
by sunsity4ever
I'm developing an WCF application and using Stimulsoft for reporting.
I used to generate report at runtime at client side.
My query is - I want to have facility to export report to any of these file types PDF, RTF, XLS and DOC. I want to achieve this through programmatically not just by the selecting from option given on report. What are the function available in stimulsoft class library, so that i write code which accepts requirement from client and export directly to these formats with/without showing actual report.

An early response will be highly appreciated.

Thanks & regards
Sanjay Malvi

how to export report to PDF, RTF, XLS and DOC

Posted: Tue Sep 23, 2008 10:18 am
by Edward
Hello, Sanjay Malvi.

Here is the code for exporting of the report without using dialog window:

Code: Select all

report.Render(false);
Stimulsoft.Report.Export.StiExcelExportService s = new
Stimulsoft.Report.Export.StiExcelExportService ();
StiExcelExportSettings mySettings = new StiExcelExportSettings();
FileStream fs = new FileStream("MyFile.xls",FileMode.Create,FileAccess.ReadWrite);
s.ExportExcel(report,fs,mySettings);
fs.Close();
And there are classes for exporting into each type of formats:
StiPdfExportService
StiRtfExportService
StiWord2007ExportService

mySettings is intended for specifying of the required parameters.

Thank you.

how to export report to PDF, RTF, XLS and DOC

Posted: Tue Sep 23, 2008 1:29 pm
by Vital
Hello,

Also you can use method ExportDocument of StiReport.

Thank you.