Skip to Content
0
Former Member
Nov 23, 2009 at 10:17 PM

Crystal Reports 2008 - connection info in code not recognized

188 Views

Application is vb.net using dynamic cascading parms and has been runnning fine in Crystal XI using VS2005. We upgraded to VS2008 and CR 2008 for compatibility with Windows 7. Now all reports do not recognize the data connection assignment that takes place in the code (they revert to the connection used at design time).

We set the connection (ci) which is later referenced as myConnectionInfo

With ci

.ServerName =

.UserID =

.Password =

.DatabaseName =

.IntegratedSecurity = False

End With

And loop thru the tables.

For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables

Dim myTableLogonInfo As TableLogOnInfo = myTable.LogOnInfo

myTableLogonInfo.ConnectionInfo = myConnectionInfo

myTable.ApplyLogOnInfo(myTableLogonInfo)

Next

The connection passes a TestConnectivity test. But rather than see the parameter form, a generic form displays with the ServerName filled and requests login info. If you do enter that manually(not normal), the CR parm form displays but dynamic parms do not have their combo box.

The report will run fine against the default data connection. The problem is the report no longer recognizes the coded connection change which is critical to reporting the proper information.