I'm using crystal report and vb6. how can i change the connection properties of the crystal report in vb6?
I'm using a udl for my connection. I have two databases namely TK and TK_MCC. TK is for other company and TK_MCC is for the subsidiary company. I used TK database when I created the crystal report. How can I change the connection properties in Crystal Report using vb6 so when I change my udl to TK_MCC it will run properly? I tried using the code below but it doesn't change the connection properties of the crystal report. I'm using this code after I display the report.
Global crxReport As CRAXDRT.Report
With crxReport.Database.Tables
For intCount = 1 To .Count
.Item(intCount).ConnectionProperties.Item("Data Source") = sServer
.Item(intCount).ConnectionProperties.Item("Initial Catalog") = sDBName_
.Item(intCount).ConnectionProperties.Item("User Id") = sUserName
.Item(intCount).ConnectionProperties.Item("password") = sPassword
Next
End With
How can I do it without creating a new crystal report just for TK_MCC?
Thank you very much.