I have a table in SQL server populated with the information I need. It is referenced by a stored procedure. I cannot figure out what is causing this error. Any help would be great.
Ok, you need to use either the applicaton LogOnServer method or the Database Table object's SetLogonInfo method. Some sample code for the SetLogonInfo is shown below. Use the SetLogonInfo before calling the printout method:
Dim crApp as New CRAXDRT.Application
Dim crRpt as CRAXDRT.Report
Set crRpt = crApp.OpenReport("myreport.rpt"
Set crDB = crRpt.Database
Set crTables = crDB.Tables
For Each crTable In crTables
'For a native connection, SetLogOnInfo arguments are ServerName, DatabaseName, UserName, and UserPassword
crTable.SetLogOnInfo "dell-laptop", "Northwind", "green", "password"
'For an ODBC connection, SetLogOnInfo arguments are ODBC ConnectionName, DatabaseName, UserName, and UserPassword
'crTable.SetLogOnInfo "Northwind", "Northwind", "green", "password"
Next
Use the appropriate syntax for your connectivity (ODBC, native). If you're using OLEDB, you'll need a different syntax as well. It's helpful if you mention your connectivity and Crystal version number in your posts.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.