A rendered report can be sent straight to the printer or exported to any supported format from code — no viewer required.

Print. Load, then call Print():
var report = new StiReport();
report.Load(@"Reports\TwoSimpleLists.mrt");
report.Print();
Export. Render first, then write the document to a stream in the chosen format:
var report = new StiReport();
report.Load(@"Reports\TwoSimpleLists.mrt");
report.Render();

var stream = new MemoryStream();
report.ExportDocument(StiExportFormat.Pdf, stream);      // or Word2007, Excel2007, ...

How it works. Rendering is separated from output, so the same prepared report can be printed and exported to several formats without rebuilding it.
Auf dem Screenshot unten Sie können das Ergebnis des Beispiel-Codes ansehen:

Exporting a Report from Code

Hallo! Brauchen Sie Hilfe?