View Complete Thread
  • Re: Crystal Reports Login Fails on ExportToDisk

    Nov 12, 2018 01:56 AM|Brando Zhang|LINK

    Hi sphar1970,

    I mean you should use oledb as the provider in the application.

    Like below codes:

            objReportDocument.Refresh()
     
            Dim objLogOnInfo As New CrystalDecisions.Shared.TableLogOnInfo
            Dim objConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo
            Dim objDbConnectionAttributes As New DbConnectionAttributes
            Dim objEQ_LogonProperties As New DbConnectionAttributes
            Dim ServerName As String = "ServerName"     ' ENTER SERVER NAME HERE
            Dim DatabaseName As String = "DatabaseName"      ' ENTER DATABASE NAME HERE
     
            objEQ_LogonProperties.Collection.Add(New NameValuePair2("Data Source", ServerName))
            objEQ_LogonProperties.Collection.Add(New NameValuePair2("Initial Catalog", DatabaseName))
            objEQ_LogonProperties.Collection.Add(New NameValuePair2("Integrated Secruity", DbConnectionAttributes.LOGONPROP_INTEGRATED_SECURITY_SSPI))
            objEQ_LogonProperties.Collection.Add(New NameValuePair2("Provider", "SQLOLEDB"))
     
            objDbConnectionAttributes.Collection.Add(New NameValuePair2(DbConnectionAttributes.CONNINFO_DATABASE_DLL, DbConnectionAttributes.DATABASE_DLL_CRDB_ADO))
            objDbConnectionAttributes.Collection.Add(New NameValuePair2(DbConnectionAttributes.QE_DATABASE_NAME, DatabaseName))
            objDbConnectionAttributes.Collection.Add(New NameValuePair2("QE_DatabaseType", "OLE DB (ADO)"))
     

    Best Regards,

    Brando