I'm trying to pass a recordset to a subreport that I don't know the name of. I'm using ASP and CR8 Automation Server I'm getting a 'Type Mismatch' on the following line:
Set session("CrSection" = session("CrSections".Item(i)
Here is the code:
Set session("CrSections" = session("oRpt".Sections
For i = 1 To session("CrSections".Count
Set session("CrSection" = session("CrSections".Item(i)
Set session("CrReportObj" = session("CrSection".ReportObjects
For y = 1 To session("CrReportObj".Count
If session("CrReportObj".Item.Kind = SubreportObject Then
Set session("CrSubReportObj" = session("CrReportObj".Item
Set session("CrSubReport" = session("CrSubReportObj".OpenSubreport
'We need to set the database, database tables and database table of the subreport
'to get to the method that we need: SetPrivateData
Set session("CrDatabase" = session("CrSubReport".Database
Set session("CrDatabaseTables" = session("CrDatabase".Tables
Set session("CrDatabaseTable" = session("CrDatabaseTables".Item(1)
session("CrDatabaseTable".SetPrivateData 3, rsChecks
End If
Next
Next
??? I'm completely stumped.
Set session("CrSection" = session("CrSections".Item(i)
Here is the code:
Set session("CrSections" = session("oRpt".Sections
For i = 1 To session("CrSections".Count
Set session("CrSection" = session("CrSections".Item(i)
Set session("CrReportObj" = session("CrSection".ReportObjects
For y = 1 To session("CrReportObj".Count
If session("CrReportObj".Item.Kind = SubreportObject Then
Set session("CrSubReportObj" = session("CrReportObj".Item
Set session("CrSubReport" = session("CrSubReportObj".OpenSubreport
'We need to set the database, database tables and database table of the subreport
'to get to the method that we need: SetPrivateData
Set session("CrDatabase" = session("CrSubReport".Database
Set session("CrDatabaseTables" = session("CrDatabase".Tables
Set session("CrDatabaseTable" = session("CrDatabaseTables".Item(1)
session("CrDatabaseTable".SetPrivateData 3, rsChecks
End If
Next
Next
??? I'm completely stumped.