How to make VB and crystal report data connectivity and also how to display database information to crystal report viewer
Printable View
How to make VB and crystal report data connectivity and also how to display database information to crystal report viewer
What version of VB are you using? VB 6.0, VB.Net?
What database are you using?
I used something like this with VB.Net
Method 1)
For i = 1 To Report.Database.Tables.Count
Report.Database.Tables(i).SetLogOnInfo(gDB_Server, gDB_Server, gDB_ID, gDB_Password)
Next i
Method 2)
Dim crpTable As CRAXDDRT.DatabaseTable
For Each crpTable In Report.Database.Tables
Dim cp As CRAXDDRT.ConnectionProperties
cp = crpTable.ConnectionProperties
With cp
.Item("DSN").Value = gDB_Server
.Item("User ID").Value = gDB_ID
.Item("Password").Value = gDB_Password
End With
Next crpTable