StiReportResponse Class

Top  Previous  Next

 

A report can be shown without using the StiWebViewer component. The special Stimulsoft.Report.Web.StiReportResponse class is used in this case. This class is a set of methods for saving a rendered report in different formats to the stream of a page. It is possible to assign a lot of input parameters which allows controlling the saving format of a report. For example, the following code can be used to save a report to the PDF format to the stream of a page:

 

 

StiReport report = new StiReport();

report.Load("MyReport.mrt");

report.Render(false);

Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(this, report);

 

 

In this code the report will be loaded first. Then this report will be rendered. Then the result of the report rendering will be saved to the stream of a page. The following code saves a report to the Excel 2007 format.

 

 

StiReport report = new StiReport();

report.Load("MyReport.mrt");

report.Render(false);

Stimulsoft.Report.Web.StiReportResponse.ResponseAsExcel2007(this, report);

 

 

 

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)