Returns whether a subreport has data and suppresses rendering if it doesn't.
Namespace:
C1.C1ReportAssembly: C1.C1Report.2 (in C1.C1Report.2.dll)
Syntax
C# |
---|
[BrowsableAttribute(false)] public bool SubreportHasData { get; } |
Visual Basic |
---|
<BrowsableAttribute(False)> _ Public ReadOnly Property SubreportHasData As Boolean Get |
Remarks
This property allows you to check whether a subreport has data and prevent it from rendering if it doesn't.
Examples
The code below uses script to hide sections with empty subreports:
The code below uses script to hide a field containing an empty subreport and show another field instead:
Copy CodeC#
_c1r.Sections.Detail.OnPrint = "Detail.Visible = fSubreport.SubreportHasData" |
Copy CodeC#
_c1r.Sections.Detail.OnPrint = "hasData = fSubreport.SubreportHasData\r\n" + "fSubreport.Visible = hasData" + "fNoData.Visible = Not hasData\r\n" + |