Skip to Content
0
Jun 28, 2016 at 02:30 PM

SQL Logon Dialog?

20 Views

Hi,

When I set my reports datatable connection info it is ignored and I get the SQL connection login. I have set the integrity to true. Here is my code:-

With crConnectionInfo

.ServerName = Session("SiteSQLName")

.DatabaseName = Session("DatabaseName")

.IntegratedSecurity = True

crConnectionInfo.Type = CrystalDecisions.Shared.ConnectionInfoType.SQL

End With

crDatabase = rptCICPrint.Database

crTables = crDatabase.Tables

For Each crTable In rptCICPrint.Database.Tables

crTableLogonInfo = crTable.LogOnInfo

crTableLogonInfo.ConnectionInfo = crConnectionInfo

crTable.ApplyLogOnInfo(crTableLogonInfo)

Next

This code works in another project but not the one I am currently working on.

Regards,

Roger