ReportDocument.IsSubreport Property
Gets whether the report is a subreport.
Namespace CrystalDecisions.CrystalReports.Engine Assembly CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)
Syntax
'Declaration
Public Overrideable ReadOnly Property IsSubreport As Boolean
public virtual bool IsSubreport {get;}
Example
This example takes a ReportDocument object as a parameter. If the specified report is a subreport, it returns the name of the subreport, otherwise it returns the string "Main Report".
'Declaration
Private Function GetReportName(ByVal myReportDocument As ReportDocument) As String
Dim reportName As String = "Main Report"
If myReportDocument.IsSubreport Then
reportName = myReportDocument.Name
End If
End Function
private string GetReportName(ReportDocument reportDocument)
{
string reportName = "Main Report";
if (reportDocument.IsSubreport())
{
reportName = reportDocument.Name;
}
return reportName;
}
Version Information
Crystal Reports Basic for Visual Studio 2008
Supported since: Crystal Reports for Visual Studio .NET 2002
See Also
Reference
ReportDocument Class
ReportDocument Members
CrystalDecisions.CrystalReports.Engine Namespace