I have created few reports using CR 8.5. I have used ODBC dsn file to connect to the database (SQL Server). There is a procedure , that takes an input parameter. I am executing it and filling the report. everythings working fine.
Now I need to change the server/database, by pointing to a different dsn file. The new database will have the same procedure in it. Heres what I am doing..
Dim Report As CRAXDRT.Report
Dim RepAppl As New CRAXDRT.Application
Set Report = RepAppl.OpenReport(App.Path & "/CycleCount_Report" & reportIndex & ".rpt", 1)
Dim i As Integer
For i = 1 To Report.Database.Tables.Count
Report.Database.Tables.Item(i).SetLogOnInfo App.Path & "/App2_PICS.dsn", "PICS" ' App2_PICS is my new dsn file
.EnableParameterPrompting = False
CRViewer1.ReportSource = Report
But unfortunately it is still using the older connection to the older database. I even deleted the older dsn file.
Any help will be appreciated !!!!