Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple TTX files and multiple ADO.Recordsets.

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a report with multiple recordsets. Within each recordset, there can be many sub-recordsets. I am having no problem filling the "parent" recordset, however the sub-recordsets come up as blank each time, even though the corresponding ADO object contains the data i need. I cannot get both recordsets to display. Crystal is just not reading the data contained in the sub-recordset. I am using two TTX files, one for the Parent recordsets, and one for the child recordsets. I am also using the SetTablePrivateData method, and adjusting the Table# parameter (0 for my first ADO.recordset object, and 1 for my 2nd ADO.Recordset object.) Perhaps there is some other property or method in Crystal that will work in setting two separate recordset objects to two TTX files of the same report?
 
Have you check to make sure that the recordset for the subreport containing data? Are you opening the sub-report after opening the main report? Hopefully this will help: (it assumes the main report is open. adoCaseRS is the recordset for the main report and adoTeamMemberRS is the recordset for the subreport.
'***************************************************************************
' Populate Main-Reports
'***************************************************************************

Call CrystalReport.Database.Tables.Item(1).SetPrivateData(3, adoCaseRS)
'***************************************************************************
' Populate Sub-Reports
'***************************************************************************
If Not adoTeamMemberRS.EOF Then
Set crTeamMemberSub = CrystalReport.OpenSubreport("subTeamMember.rpt")
Call crTeamMemberSub.Database.Tables.Item(1).SetPrivateData(3, adoTeamMemberRS)
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top