[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.SectionReport.Run

Run Method

Run()

Generates the report output that could be then printed, displayed in the viewer, or exported to an external document.

Declaration
public void Run()
Examples
var sectionReport = new GrapeCity.ActiveReports.SectionReport();
XmlTextReader xtr = new XmlTextReader(reportName);
sectionReport.LoadLayout(xtr);
sectionReport.Document.Printer.PrinterName = String.Empty;
sectionReport.Run();
IDocumentExport documentExportEx = new GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport();
using (var stream = new FileStream(fileName, FileMode.Create))
documentExportEx.Export(sectionReport.Document, stream);
Exceptions
Type Condition
LicenseException

Thrown if a component cannot be licensed.

ReportException

Thrown if something is wrong with the report structure.

Run(bool)

Generates the report output that could be then printed, displayed in the viewer, or exported to an external document.

Declaration
public void Run(bool syncDocument)
Parameters
Type Name Description
bool syncDocument

A bool value that determines whether to execute UI events. Set to true if UI events should be executed, otherwise set to false.

Remarks

This method should be used only inside WindowsForms applications in the UI thread (to ensure it won't be blocked long time).

Examples
var sectionReport = new GrapeCity.ActiveReports.SectionReport();
XmlTextReader xtr = new XmlTextReader(reportName);
sectionReport.LoadLayout(xtr);
sectionReport.Document.Printer.PrinterName = String.Empty;
sectionReport.Run(true);
IDocumentExport documentExportEx = new GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport();
using (var stream = new FileStream(fileName, FileMode.Create))
    documentExportEx.Export(sectionReport.Document, stream);
Exceptions
Type Condition
LicenseException

Thrown if a component cannot be licensed.

ReportException

Thrown if something is wrong with the report structure.