i have an odbc connection to a sybase database.
if i run a report from the crystal report viewer in vs 2008 that uses tables/views from the odbc connection those reports run fine.
if i run a report from the crystal report viewer in vs 2008 that uses the crystal command object, i get the following errror "Logon failed. Details: Cannot find DSN in connection string Error in File".
the following is the code i use to apply the login info for the report/subreports.
Dim ci As New ConnectionInfo()
ci.DatabaseName = "DB"
ci.ServerName = "DSN"
ci.UserID = "user"
ci.Password = "password"
For Each tbl As CrystalDecisions.CrystalReports.Engine.Table In tbls
Dim tli As TableLogOnInfo = tbl.LogOnInfo
tli.ConnectionInfo = ci
tbl.ApplyLogOnInfo(tli)
Next
Again this works on all other reports just not on the crystal command object.
I am using vs 2008 and crystal reports X.
Thanks