Click here to Skip to main content
15,880,651 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi
I have a VB6 app running off a secured MS Access Database.
Currently - I have a number of reports created using an ADO datasource, and then from VB - I re-create the ado recordset (to link to the correct location of the db files).

Set Report = Appl.OpenReport(gsDBPath & "\" & gsReportName & ".rpt")

OpenADORS rs_Crystal, "SELECT * FROM " & gsReportSourceQry
Report.DiscardSavedData

On Error Resume Next
Report.Database.SetDataSource rs_Crystal
CRViewer.ReportSource = Report

CRViewer.Refresh
CRViewer.ViewReport

This works fine, but I have a couple of sub-reports. Any ideas how I programmatically re-link to a report with a sub-report using ADO - or is there a better way

Any ideas?

Steve
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900