[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.SectionReport.ParentReport

ParentReport Property

ParentReport

Gets or sets a value indicating the parent report.

Declaration
[Browsable(false)]
public SectionReport ParentReport { get; }
Property Value
Type Description
SectionReport

A SectionReport object that references the parent report.

Remarks

Allows to access to parent report from subreport.

Examples
var sectionReport = new GrapeCity.ActiveReports.SectionReport();
XmlTextReader xtr = new XmlTextReader(reportName);
sectionReport.LoadLayout(xtr);
sectionReport.Document.Printer.PrinterName = String.Empty;
sectionReport.Script = @"public void ActiveReport_ReportStart() {if (rpt.ParentReport != null) throw new Exception("The report was not designed to be subreport!")}";
sectionReport.Run();