I have developed an ADO CRv9 report to be deployed via the Web. The report has one included sub-report. When the report is run in the designer, all works well. When deployed, everything works but the subreport - NO DATA.
Since I pass both reports the necessary data via record sets, I'm assuming the problem is with my code, when trying to send the sub-report my data. Please look at this and see if you find any issues...
if bolHeaderSubReport then
set session("oRsHeader"
= getHeaderRS(oConn, sDealerGuid)
'----------------------------------------
' Setup subreport functionality
'----------------------------------------
Set CRXSections = session("oRpt"
.Sections
For Each CRXSection In CRXSections
Set CRXReportObjects = CRXSection.ReportObjects
For Each ReportObject In CRXReportObjects
If ReportObject.Kind = 5 Then
Set CRXSubreportObj = ReportObject
Set CRXSubreport = CRXSubreportObj.OpenSubreport
CRXSubreport.MorePrintEngineErrorMessages = False
CRXSubreport.EnableParameterPrompting = False
CRXSubreport.DiscardSavedData
If ReportObject.SubreportName = "HdrSubRpt.rpt" Then
'--I get all the way into here...
set Database2 = CRXSubreport.Database
Set Tables2 = Database2.Tables
set Table2 = Tables2.Item(1)
Table2.SetPrivateData 3, session("oRsHeader"
'--- Yes session("oRsHeader"
has data
End If
End If
Next
Next
End if
Again, when the report is viewed via the web, there is NO DATA in it... sad face....
Thanks in advance for any help!!
Cliff
Since I pass both reports the necessary data via record sets, I'm assuming the problem is with my code, when trying to send the sub-report my data. Please look at this and see if you find any issues...
if bolHeaderSubReport then
set session("oRsHeader"
'----------------------------------------
' Setup subreport functionality
'----------------------------------------
Set CRXSections = session("oRpt"
For Each CRXSection In CRXSections
Set CRXReportObjects = CRXSection.ReportObjects
For Each ReportObject In CRXReportObjects
If ReportObject.Kind = 5 Then
Set CRXSubreportObj = ReportObject
Set CRXSubreport = CRXSubreportObj.OpenSubreport
CRXSubreport.MorePrintEngineErrorMessages = False
CRXSubreport.EnableParameterPrompting = False
CRXSubreport.DiscardSavedData
If ReportObject.SubreportName = "HdrSubRpt.rpt" Then
'--I get all the way into here...
set Database2 = CRXSubreport.Database
Set Tables2 = Database2.Tables
set Table2 = Tables2.Item(1)
Table2.SetPrivateData 3, session("oRsHeader"
'--- Yes session("oRsHeader"
End If
End If
Next
Next
End if
Again, when the report is viewed via the web, there is NO DATA in it... sad face....
Thanks in advance for any help!!
Cliff