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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I link a recordset to a subreport ? 1

Status
Not open for further replies.

Paulus

Programmer
Sep 25, 2000
16
0
0
A1
Inside my program I can link a recordset flexible to my report with the following command: Report.Database.SetDataSource DataEnvironment1.rsMyRecordset

But how can I link the Reordset: MyRecordset2 to the subreport ?

 
Here's some sample code from Seagate:

Set CRSubreports = session("oRpt").OpenSubreport("ADODemo.rpt")

'Create the ADO Database Connection:

Set oConn2 = Server.CreateObject("ADODB.Connection")
oConn2.Open("ADO DEMO mdb")
set session("oRs2") = oConn2.Execute("Select * FROM ADODemoTable")
Set Database2 = CRSubreports.Database
set Tables2 = Database2.Tables
set Table1s = Tables2.Item(1)
CRSubreports.DiscardSavedData

Table1s.SetPrivateData 3, session("oRs2")

HTH...
 
Thanks for the answer... but I forgot to tell you that I´m using Visual Basic Version 6 Prof. Your answer I think is a solution for ASP ?!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top