Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
crSubreport = crReport.OpenSubreport(crSubreportObject.SubreportName)
crSubreport.EnableOnDemand = False
crSubreportObject.EnableOnDemand = False
crSubreport = crReport.OpenSubreport(crSubreportObject.SubreportName)
'import namespaces at the top of the code page
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Dim crReport As New CrystalReport1()
Dim crSubreportObject As SubreportObject
Dim crSubreport As New ReportDocument()
Dim crTableLogOnInfos As New TableLogOnInfos()
Dim crTableLogOnInfo As TableLogOnInfo
Dim crTables As Tables
Dim crTable As Table
Dim crReportObjects As ReportObjects
Dim crReportObject As ReportObject
Dim LoopReportObject As Integer
Dim TableCounter As Integer
'accessing the reportobjects collection
crReportObjects = crReport.ReportDefinition.ReportObjects
'loop through report objects collection
For LoopReportObject = 0 To crReportObjects.Count - 1
crReportObject = mcrReportObjects.Item(LoopReportObject)
'check to see is the current report object in the
'report object collection is a subreport object
If crReportObject.Kind = ReportObjectKind.SubreportObject then
'if the report object is a subreport object
'then set it to a report
crSubreportObject = crReportObject
'This is where you set the property to show the
'subreport on export
crSubreportObject.EnableOnDemand = False
crSubreport = crReport.OpenSubreport(crSubreportObject.SubreportName)
'Crystal Reports Old Code
'crSubreport.EnableOnDemand = False
End If
Next
'View the report
CrystalReportViewer1.ReportSource = crReport