Can anyone help me with establishing a connection to SF at runtime. I keep getting an error using the Crystal "ConnectionInfo" with the SF "ConnectionString"
Thanks Much.
Sample code
******************************************************
Private Sub ConfigureCrystalReports()
Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()
myConnectionInfo.DatabaseName = "MYDB"
myConnectionInfo.UserID = "Test"
myConnectionInfo.Password = "1234"
myConnectionInfo.ServerName = "MYServer"
northwindCustomersReport = New ReportDocument()
Dim reportPath As String = Application.StartupPath & "\" & "SubjectReport.rpt"
northwindCustomersReport.Load(reportPath)
myCrystalReportViewer.ReportSource = northwindCustomersReport
SetDBLogonForReport(myConnectionInfo, northwindCustomersReport)
End Sub
Private Sub SetDBLogonForReport(ByVal myConnectionInfo As ConnectionInfo, ByVal myReportDocument As ReportDocument)
Dim myTables As Tables = myReportdocument.Database.Tables
For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
Dim myTableLogonInfo As TableLogOnInfo = myTable.LogOnInfo
myTableLogonInfo.ConnectionInfo = myConnectionInfo
myTable.ApplyLogOnInfo(myTableLogonInfo)
Next
End Sub