Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: vs 2008 connect to a crystal command object Post Reply Post New Topic
Author Message
mc_tiger
Newbie
Newbie


Joined: 24 Oct 2008
Location: United States
Online Status: Offline
Posts: 4
Quote mc_tiger Replybullet Topic: vs 2008 connect to a crystal command object
    Posted: 13 Nov 2009 at 8:04am
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
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.