Hi All
I have paged through all the previous entries for this kind of thing but still can't get my code right.
I am trying to change the SQL Server for the report.
CrystalReportPath = "S:\CrystalReports\" + strENVRptNme
Set CrystalApplication = New CRAXDDRT.Application
Set CrystalReport = CrystalApplication.OpenReport(CrystalReportPath)
CrystalReport.DiscardSavedData
For Each CrystalTable In CrystalReport.Database.Tables
CrystalTable.SetLogOnInfo strEnvSrv, "MYDBS", "MUSR", "MPWD"
Next CrystalTable
Could someone please tell me where I am going wrong. The report contiues to point to the original machine.
Thanks
I have paged through all the previous entries for this kind of thing but still can't get my code right.
I am trying to change the SQL Server for the report.
CrystalReportPath = "S:\CrystalReports\" + strENVRptNme
Set CrystalApplication = New CRAXDDRT.Application
Set CrystalReport = CrystalApplication.OpenReport(CrystalReportPath)
CrystalReport.DiscardSavedData
For Each CrystalTable In CrystalReport.Database.Tables
CrystalTable.SetLogOnInfo strEnvSrv, "MYDBS", "MUSR", "MPWD"
Next CrystalTable
Could someone please tell me where I am going wrong. The report contiues to point to the original machine.
Thanks