Failed to open the connection.Details: [Database Vendor Code: 17 ]

We have too many reports designed by Crystal Reports XI Release 2 a time ago reports are old but we are calling them in asp.net 4.0 and connection through ODBC Data Sources (Driver SQL SERVER)
but when we refresh the report we are facing this issue....
Failed to open the connection.
Details: [Database Vendor Code: 17 ] Failed to open the connection.
AP Outstanding Check Run Detailed Ver 2 {CF3B13A2-F259-4B1D-ACC9-BF78F44D4AA5}.rpt
Details: [Database Vendor Code: 17 ]
here is the code to set ReportLoginInfo
CrystalDecisions.Shared.TableLogOnInfo logonInfo = new CrystalDecisions.Shared.TableLogOnInfo();
            string myTableLocation;
            foreach (CrystalDecisions.CrystalReports.Engine.Table myTable in rptDoc.Database.Tables)
                myTableLocation = myTable.Name;
                logonInfo = myTable.LogOnInfo;
                logonInfo.ConnectionInfo.AllowCustomConnection = true;
                logonInfo.ConnectionInfo.ServerName = ServerName; // dnsname
                logonInfo.ConnectionInfo.DatabaseName = DatabaseName;
                if (!(string.IsNullOrEmpty(UserID) || string.IsNullOrEmpty(Password)))
                    logonInfo.ConnectionInfo.UserID = UserID;
                    logonInfo.ConnectionInfo.Password = Password;
                    logonInfo.ConnectionInfo.IntegratedSecurity = false;
                logonInfo.ConnectionInfo.Type = CrystalDecisions.Shared.ConnectionInfoType.SQL;
                myTable.ApplyLogOnInfo(logonInfo);
                myTable.Location = DatabaseName + ".dbo." + myTableLocation;
                bool success = myTable.TestConnectivity();
Edited by: zeshansadiq on Nov 4, 2011 3:49 PM

resolved by me itself.
Do the following steps:
1. Open the report in the CR XI designer.
2. Select Database -> Set Datasource Location.
3. Set Datasource Location window will appear and in the replace with section connect to the database and replace these tables with the tables in the current datasource by clicking the update button.
4. After updating close the Set Datasource Location window.
5. Go to 'Database menu' and Click 'Verify Database' and click on u2019OKu2019.
6. Preview the report and the save the report.

Similar Messages

  • Failed to open the connection. [Database Vendor Code:12154]

    I am brand new to Crystal Reports Server.  I am using Oracle as a database and 10g client on my XP workstations.  I keep getting this message.  I have my ODBC drivers loaded and tested for connection.  I have my Business View set up with the appropriate TNSNAMES.ora and login.  When I run any report, I get this message.  Can anyone tell me where my connection is broken?  It is driving me crazy!
    Thanks, Pam

    Edit: just realized I replied to a 3 years old thread...
    Though Crystal Reports is not my speciality, if you use Oracle, then I assume you are using the Oracle client as middleware, not ODBC, so that is more around the Oracle client you need to investigate rather than the ODBC. Tell me if I missed something here.
    Could you also clarify the OS you are implementing that solution on (32/64bits) and the connectivity you use from Business View (ODBC or Oracle client connectivity?)
    It also struck my mind that the DB vendor error code you get is around ORA-12154 "Could not resolve the connect identifier", which means you have a problem resolving the alias of the DB. This assumption seems to be confirmed by the fact it works from neither Crystal client nor the web interface.
    Edited by: Romain Anselin on Sep 28, 2010 1:57 PM

  • Failed to open the Connection:  to Database on CMC(Central Management Console)

    Post Author: [email protected]
    CA Forum: Data Connectivity and SQL
    I can create and run a report no problem on Crystal Reports XI. However when i upload it to the CMC i get Fail to open the connection. I use ODBC 3.51.17 for MySQL.I created Business Views from Dynamic Data Connections (could the problem be in here in the DC or DDC?)Reports are created in Crystal then uploaded to the CMCReports run FINE in Crystal, but once it is uploaded to the CMC i get a "Failed to open the connection.  xxxx.rpt

    Post Author: petiera
    CA Forum: Data Connectivity and SQL
    G'day,
    I'm facing the same problem, so did configuring ODBC and DNS solve this?
    If they did, I'd like to know how to do this in Linux. So far I've installed unixODBC and mysql ODBC connector, what else should be done? Is there some "list of things to do after installation" for Crystal Reports Server in Linux.
    -petiera

  • Failed to open the connection. Details: [Database Vendor Code: 53 ]

    I'm upgrading one of our applications from Visual Studio 2005 to 2010. In the process I'm also switching our reports to run using Stored Procedures instead of Tables/Views.  Everything runs fine on development machines after all the migration work.  On the server however, it does not work. And I am getting the error message ""
    Server is Windows 2003 Server 32 bit.  And yes, I have installed the latest runtimes version 13.0.2000.0 on the server.  There have been no other changes on the server other than to switch the target framework on the website in question from .net 2 to .net 4, and then to modify the web.config file to remove references to the older Crystal Reports and replace with references to the newer version.
    I've seen many other threads on this "failed to open the connection" errors but none of them are my problem except there is one post that remains unanswered where someone had the same Database Vendor Code 53.  I don't know what that error means, spent a considerable amount of time researching that before asking this question.
    Lastly, it appears that this error only happens when the report is pulling data from a Stored Procedure rather than Tables/Views.  If I re-copy the previous reports, they still work.
    The ODBC drivers haven't changed, nor should they. They are fully up to date on that server machine.
    I can't think of anything else that would be indicative of anything other than this is a bug.  Here is the error text as it shows up in the event log:
    Event code: 3005
    Event message: An unhandled exception has occurred.
    Event time: 12/7/2011 3:49:50 PM
    Event time (UTC): 12/7/2011 11:49:50 PM
    Event ID: 38ce5b5487984e8aa8d2b84493d859a8
    Event sequence: 17
    Event occurrence: 1
    Event detail code: 0
    Application information:
        Application domain: /LM/W3SVC/739252194/Root-1-129677751941252500
        Trust level: Full
        Application Virtual Path: /
        Application Path: D:\Websites\ACE5\Clients\TST\
        Machine name: ACE1
    Process information:
        Process ID: 5436
        Process name: w3wp.exe
        Account name: NT AUTHORITY\NETWORK SERVICE
    Exception information:
        Exception type: InternalException
        Exception message: Failed to open the connection.
    Failed to open the connection.
    Details:  [Database Vendor Code: 53 ]
    Failed to open the connection.
    Details:  [Database Vendor Code: 53 ]
    Failed to open the connection.
    PackSlipTST0 {638463B4-2196-492A-BD6E-9D82CB1862D5}.rpt
       at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
       at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
       at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportOptions options, HttpResponse response, Boolean asAttachment, String attachmentName)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportFormatType formatType, HttpResponse response, Boolean asAttachment, String attachmentName)
       at Distribution_PackingSlips_default.ExportPackingSlips(String CrystalReportPath, Boolean UseStoredProcedure)
       at Distribution_PackingSlips_default.Page_Load(Object sender, EventArgs e)
       at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
       at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
       at System.Web.UI.Control.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    Failed to open the connection.
    Failed to open the connection.
    Details:  [Database Vendor Code: 53 ]
    Failed to open the connection.
    Details:  [Database Vendor Code: 53 ]
    Failed to open the connection.
    PackSlipTST0 {638463B4-2196-492A-BD6E-9D82CB1862D5}.rpt
       at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
       at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

    Lots of great info here, except for the database; MS SQL? Oracle? Etc?
    Database Vendor Code 53 is an error code that the CR engine simply passes straight from the database it's self. E.g.; look at your database error code and you should be able to find a verbose description of the error.
    As a test, what happens if you add the report to your project and run it in the CR design part of the .NET IDE?
    - A quick google search of Error 53 (for MS SQL - an assumption) comes up with a number of good hits. E.g.;
    http://social.msdn.microsoft.com/Forums/en-AU/sqlgetstarted/thread/27684811-1a59-4273-b7ed-3cc990b4f20a
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]
    Edited by: Ludek Uher on Dec 8, 2011 6:31 AM

  • Failed to open the connection. Details: [Database Vendor Code: 12154].

    I have installed Crystal reports server 2008 VI on a Windows 2008 64bit OS. I have added SQL server and Oracle reports through CMC. I then installed Oracle 10g client 32bit on the server and created and tested the required DSNs using ODBC 32bit. All the testings are successfull.
    Now when I try to run my Oracle report through CMC it prompts for the parameters and when I enter them and click ok, gives me the following error:
    Failed to open the connection. Details: [Database Vendor Code: 12154].
    I have the same exact setup on a different server which has a 32 bit windows 2008 server OS and could run the same reports through CMC.
    Is there away to fix this in the 64 bit OS?
    I did a yahoo search and someone had a similar problem with Crystal RAS and Oracle.
    And there is mentions that this is an issue with 32 bit ODBC drivers on 64bit wondows OS.The parentheses in the default file location, C:\Program Files (x86), causes problems with the ODBC driver and the workarouns in re-installing Crystal RAS on a different folder.
    Full description is at (http://www.tririga.info/)
    Is this the case with Crystal report server 2008 VI? I already got users using the InfoView to run SQL reports and doing this will have to put the application offline atlease for a say.
    Any help is greatly appreciated.

    Vasana,
    Resolution: Failed to Open the Connection.
    First:
    If the Crystal Report is using 32-bit version of Microsoft ODBC then the Window 2008 server must also have 32-bit version of Microsoft ODBC. The 32- bit version of Odbcad32.exe is located in the %systemdrive%\Windows\SysWoW64 folder.
    On the Windows 2008 server, execute Odbcad32.exe by clicking start and run and entering the following: C:\Window\SysWow64\ODBC32.exe.
    Then:
    The Windows 2008 server ODBC Data Source Administrator must have the same System Data Source Server and Database Names that is used to run the Crystal Report.
    e.g. Crystal Report points to server ABC and database EFG (ABC_efg); then the ODBC connections on the Windows 2008 Server must also point to the same server ABC and database EFG (abc_efg) listed.

  • Failed to open the connection - database vendor code 17

    I'm upgrading a VB.net Windows Forms application from 1.1 to 4.0.  In the reporting form, the list of reports you can choose are pulled from a folder where the .rpt files reside.  Once the user chooses a report and executes it, vb code populates the current database connection information and displays the report in the report viewer control.
    The following things are true:
    - Version 1.1 works on my systems and my customers systems
    - The code has not been changed, except that it now targets .Net 4.0 instead of 1.1
    - The exact same .rpt files are being used
    - Version 4.0 connects to the same database my customer is using, and I can run the reports just fine from here.
    - Version 4.0 is able to connect to the database just fine from my customers systems (using the same connection information provided to the report)
    - My customer installed this:  http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_32bit_13_0_2.zip
    The only problem is that my customer encounters this error when trying to run any report from his systems:
    Failed to open the connection.
    Details:  Database Vendor Code: 17
    Failed to open the connection.
    Orders.BOL.TaskDetail {393C9017-0ED1-4E1E-8824-E222F4B9D14C}.rpt
    Details:  Database Vendor Code: 17
    I read all of the articles I could find, and they either don't describe this exact situation, or there is insufficient information for troubleshooting this issue.  Are there steps that I've missed to make Crystal Reports for VS2010 work on my customer's systems?
    Your help is appreciated,
    Mark

    Hi Mark,
    More information required -
    - Does this happen with all reports or few?
    - What is the connection type used for the report to connect to the database (OLEDB,ODBC etc)
    - Are you changing the database at runtime?
    few things you could check
    - Check if the database is accaessible from the client machine with proper permissions / rights.
    - If its an ODBC connection check if the DSN with same name is created on the client machine.
    - Check the driver / provided used by the report to connect to the DB, verify that the same is installed on the client machine. (SQL NAtive client, SQL Server etc)
    Also take a look at below articles discussing the simillar issue.
    [CR for VS2010: Failed to Open Connection [Database Vendor Code: 17 ]|CR for VS2010: Failed to Open Connection [Database Vendor Code: 17 ]]
    [1474461 - Unknown Database Connector Error when connecting to a Dataset in a VS .NET application |http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333433373334333433363331%7D.do]
    Hope this helps,
    - Bhushan.

  • Failed to open the connection.....[Database Vendor Code: -30081 ]

    Hi,
    We are using Crystal Reports to pull information from DB2. I received the following error during a DRP (disaster recovery planning) exercise. I am trying to determine what caused the error.
    Failed to open the connection. E:\temp\procSched\otchrt48.cibc-hr.eds.com.reportjobserver\~tmp17346b7ba1ea3b0.rpt Details: [Database Vendor Code: -30081 ]
    version of BOE we are using: BO Product: 11.5
            Crystal reports XI R2
    Any help would be appreciated.
    Regards,
    Kesavan

    Hello,
    And if you look up that error code for DB2 what does it indicate? CR is simply passing the message from the DB2 client to a message box. It's the Client that is not configured and causing the error to log on.
    Thank you
    Don

  • Failed to open the connection. Error in the Designer when copying ...

    I have two different systems I am developing an application on.
    I copy the entire directory from one system to the other. Both systems have the same environment:
    Visual Studio 2010
    Crystal Reports for Visual Studio 2010 (the production release, or I think it is the vesion is 13.0.2.0 is the version on the assemblies)
    SQL 2008 R2
    Today, I started adding Crystal reports to this VS solution. I have a reportdriver class that exports all the reports to an HTTP Stream, but we can sit that aside for now. The problem I am having is strictly with the integrated designer.
    I have a bunch of existing reports written for an old Sybase databse. I have ported them to SQL and the table structure matches. I simply add the report to my project, point it to the new datasource (using "Set Datasource Location" - OLE ADO SQL) and then preview the report to be sure it runs.
    I am just using "localhost" as my server name for the OLE connection so I...in theory... don't have to change the data source to view it on the other system. Both systems have SQL 2008 R2 installed locally. For my login credentials, I use SQL Security and use the same database login/password on both development machines andthe production server.
    Today, I copied my entire project to the other PC (as I do almost every day).. When I open any of the reports (in VS) and try to preview them I get:
    Failed to open the connection.
    Details: ADO Error Code: 0x80004005
    Source: Microsoft OLE DB Provide for SQL Server
    Description: [DBNETLIB][ConnectionOpen (Connect().]SQL Server does not exist or access denied.
    SQL State: 08001
    Native Error: 17 [Database Vendor Code: 17]
    I can only guess that I am using two different OLE ADO drivers on the two systems or there is something embedded in the rport or somewhere in my solution that "knows" I am not really on the same system that I initially set them up on and previewd them with.
    Am I on the right track? Any idea how I can fix this? Obviously, I don't want to have to setup the datasource for every report in my application (if I do that, the report works) when I copy it from the development to the production server.
    I am in a real bind here and under a fast aproaching deadline. Any help is much appreciated!!!
    Shayne

    Don't use localhost as your server name. It's a reserved name and should not be used in code.
    Try this also [Kbase |http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533353333333433363339%7D.do] SAP Note 1553469 - How to enable Database logging in Crystal Reports for Visual Studio 2010
    Edited by: Don Williams on Jan 30, 2011 6:02 AM

  • Infoviewer Error - Failed to open the connection.

    Hi,
    I get the below error when tring to view a report from infoviewer?
    Failed to open the connection. Products.rpt Details: [Database Vendor Code: 12154 ]
    Also where can i find the log files for CMC and infoviewer?
    Thanks in advance

    Hi! I'm getting a similar error.
    Re: 08004:oracleodbcoraora-12154: TNS: could not resolve the connect ....
    Posted: Aug 22, 2011 5:56 PM in response to: John Fleming
    Edit Reply
    I am receiving a similar error.
    Failed to open the connection.
    Details: 08004:OracleODBCOraORA-12154: TNS:could not resolve the connect identifier specified Database Vendor Code: 12154
    I've seen all sorts of discussion on the intertubes about possible fixes however, none stated are practical or they do not address my error specifically. I've exhausted resources on the net as well as those available to me.
    I'm currently running SAP Crystal Reports 2011 on WIN7 64bit and using Oracle in OraClient 10g_home1.
    Please let me know what insight you have. I cannot roll back to previous versions of Windows nor less encryption.
    Thank you for your time.
    Thank you, again, for your time.
    Jeff Embree.

  • Getting Error:Failed to open the connection while calling crystal report

    I am getting the below error while calling the crystal report from dot net app. I am using OLEDB to connect to database. It is working perfectly in our DEV environment but as soon as I move it to production information after changing the logon information in the report it start giving the below error.
    Failed to open the connection.C:\WINDOWS\TEMP{C2FD97D9-2ADE-41BB-88FF-23A4DF20BC6F}.rpt
    Details: [Database Vendor Code: 17 ]

    Are you able to connect to the database from the production machine using a UDL file?
    If you haven't tried this, here's how to do it. Take these steps on the machine that is hosting the application. Create a new text file on the desktop. Change the file extension to ".udl" (without the quotes). Double-click on this to bring up the OLEDB connection test: start on the Provider tab and select the appropriate provider. Click "Next" and on the following tab enter your connection information. Click the "Test Connection" button to test the connection. Does it connect  to the database successfully?
    If you click on "OK" to close the dialog and then open the UDL file with Notepad, you should see an OLEDB connection string. In this string should be the same property values for server, database, user id and password which you are providing through your application. If they are not the same, modify your application to use these values.
    If testing your connection information with the UDL file works but your application is still failing when using the same credentials, try profiling or tracing the database. Do you see connection attempts from the application? Are there any errors?
    If you're impersonating, have you set up windows authentication correctly for both the application and the database?

  • Failed to open the connection: Error Code 17

    Here's an odd one.
    Environment:
    VB.NET Winform
    Visual Studio 2008
    .NET framework 2.0
    Crystal Reports 2008
    ODBC connection
    I have three reports, living in the same directory. They are essentially identical, except for the grouping. All three run successfully within Crystal reports.
    From a report viewer Winform in VS, two of the three run. As I am dealing with a small data set, the reports render quickly. On the third report, There is a long pause when the report viewer form opens, then I finally get an error:
    "Failed to open the connection.
    Details: [Database Vendor Code: 17]
    Failed to open the connection.
    CallReportByExtension 58F5C135-7BA3-4215-898A-DADA6C7DAD9C.rpt
    Details:[Database Vendor Code: 17]
    I was initially getting similar errors on all three reports, before changing the datasource location to my ODBC connection. I have double-checked the location, verified the database, etc.
    What am I doing wrong? I can provide the VB code if requested, but since the other two reports work properly, I doubt it's code. I do know that I am passing the report name and path correctly to the report viewer form.
    As I am about to kick my monitor through the window and become a street denizen, I would greatly appreciate any help that would be offered.
    Thanks,
    Mike Beckner

    Thanks for the reply. This code works...two of the three reports work.
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Public Class frmReportViewer
        Dim m_datStartDate As Date
        Dim m_datEndDate As Date
        Dim m_strReportPath As String
        Dim m_strReportName As String
        Dim m_strStaticPath As String = "c:\Program Files\CallReportViewer\Reports\"
        Dim crConnectionInfo As New ConnectionInfo
       *****Omitting property declarations--I assign the report name and path via these properties. *****
        Private Sub frmReportViewer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            LoadReport()
        End Sub
        Public Sub LoadReport()
            Dim crReportDocument As New ReportDocument
            Dim crTableLogonInfo As New TableLogOnInfo
            Dim crTables As Tables
            Dim crTable As Table
            Try
                With crConnectionInfo
                    .ServerName = "CallWhereData"
                    .DatabaseName = "CallWhereData"
                    .UserID = "MyID"
                    .Password = "MyPassword"
                End With
                Me.Text = m_strReportName
                crReportDocument.Load(m_strStaticPath & m_strReportPath)
                crReportDocument.SetParameterValue("1StartDate", m_datStartDate)
                crReportDocument.SetParameterValue("2EndDate", m_datEndDate)
                crTables = crReportDocument.Database.Tables
                For Each crTable In crTables
                    crTableLogonInfo = crTable.LogOnInfo
                    crTableLogonInfo.ConnectionInfo = crConnectionInfo
                    crTable.ApplyLogOnInfo(crTableLogonInfo)
                Next
                CrystalReportViewer1.Dock = DockStyle.Fill
                CrystalReportViewer1.ReportSource = crReportDocument
            Catch ex As Exception
                MessageBox.Show(Err.Description)
            End Try
        End Sub
    End Class

  • Failed to open the connection, when view returns no data.

    Hi Guys,
    I'm having a minor issue.
    I'm running a report in the crystalreportsviewer in asp.net.
    The report is retrieving it's data from a view.
    The report also has a subreport with an overview with totals, using the same view and the same parameters as the primary report.
    Now everything is working fine in a filled database.
    But when the view does not return any data, i get the following error:
    Failed to open the connection. Failed to open the connection. Details:
    [Database Vendor Code: 53 ] Failed to open the connection. Details:
    [Database Vendor Code: 53 ] Failed to open the connection.
    Freight_Charges_By_Branch_By_Period_By_Customer {9D0460D7-5C9E-  4FD5-B190-AFD41693A143}.rpt
    Can anyone please help me with this problem.
    Thanks in advance!
    Regards William

    Lot of important info missing here:
    1) What version of CR?
    2) What CR updates have you applied?
    3) What version of .NET?
    4) Is this on your dev box or after you deploy?
    5) Have you looked up error code 53 for your database? (This is the error code CR engine is simply passing through from the db client)
    6) What is the database?
    7) What connection method are you using?
    8) Depending on the version of CR, can you run this report in the CR designer?
    9) Copy and paste the code used to run the report.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • Logon failed. Detail [Database Vendor Code: 1005]

    The application make use of ODBC to connect to Oracle database
    The way the reports are produced in the current VB application is by using the following line of codes
    cryQueryReport.Connect = ObjAdoConnection.sADOconnectstr
    cryQueryReport..SQLQuery =  sSQL & sSortString
    along the way the application also passes String value to the formular fields defined in the reports by making use of the following line of code
    cryQueryReport.Formulas(iFormulanumber) = "TITLE_1 = '" & mrsReportItems("TITLE_1") & "'"
    Now the codes have been modified to the following to accommodate the upgrade
    If Report2 Then
        'open the report
          Set MyReport = CrystalReport2
      Else
          Set MyReport = CrystalReport1
      End If
    'Crystal Report2 includes fields from 9 different tables
    'Crystal Report1 includes fields from 10 different tables
    For i = 1 To MyReport.Database.Tables.Count
      With MyReport.Database.Tables(i)
            Set ConnectionInfo = .ConnectionProperties
            .DllName = "crdb_odbc.dll"
            ConnectionInfo.DeleteAll
            ConnectionInfo.Add "DSN", "DSN Name"
            ConnectionInfo.Add "User Id", "User ID"
            ConnectionInfo.Add "Password", "Password"
      End With
    Next i
    MyReport.SQLQueryString = sSQL & sSortString
    For intCounter = 1 To MyReport.FormulaFields.Count
        If MyReport.FormulaFields(intCounter).FormulaFieldName = "TITLE_1" Then
            MyReport.FormulaFields(intCounter).Text = mrsReportItems("TITLE_1")
        End If
    Next intCounter
    CrystalActiveXReportViewer1.ReportSource = MyReport
    CrystalActiveXReportViewer1.ViewReport
    The error message pops up that says Run-time Error '2147189176 (80047e48)'   Logon failed. Detail [Database Vendor Code: 1005]
    when Ok is clicked, another error message says Run-time Error '214191854 (800473d2)':  The remaining text does not appear to be part of the formula.
    Could anyone tell me what is wrong with the way the Logon information is coded?
    Thank you for your time

    This post is being handled through an open support incident with the Developer Support team.
    It appears to be an issue upgrading from an earlier version of Crystal Reports using the old crystl32.ocx to the RDC SDK in Visual Basic 6.0.
    Elaine
    Edited by: Elaine Dove on Jul 6, 2009 2:47 PM

  • "Failed to open the connection" problem related to multiple tables in the report?

    Post Author: Gadow
    CA Forum: Data Connectivity and SQL
    System specifics:
    Web environment using ASP.Net 2.0 (from Visual Studio 2005 Professional)
    Crystal Reports 2008, v. 12.0.0.549, Full
    We have set up the following method for displaying reports via our website:
    User is sent to a report-specific page. The user is given some filtering options specific to the report that will be viewed. When the user has specified the data filters, the user clicks a button.
    The page wraps up the report parameters -- selection query, formula values, report location, the name to be displayed, etc. -- into a class which gets put into the Session object.
    The page redirects to DisplayReport.aspx. ALL reports redirect to this page.
    DisplayReport.aspx retrieves the report parameters from Session. A ReportDocument object is created and loaded, then set with the data from the parameters class.
    A ConnectionInfo object is created and set with the relevant log on credentials. All of the reports draw from the same database, so the connection information is hard-coded as the same for all reports. The page then iterates through all of the tables in the Database.Tables collection of the ReportDocument and calls ApplyLogOnInfo to each table using the ConnectionInfo object.
    The page is rendered and the user gets the filtered report.
    We currently have seven reports. Five reports work fine and display the correctly filtered data with no error messages. Two reports generate a Failed to open the connection error and do not display. I have verified that the queries being sent to DisplayReport.aspx are valid, and as I said the connection information itself is hard-coded in the one page that displays the reports and this is identical to all reports.
    The five reports that do work all have a single data table, either an actual database table or a single view. The two reports that do not work all have multiple tables. As far as I can tell, this is the only difference between the sets; all seven reports are based on the same DSN and I have verified the database on all of the reports. All of the reports were written using Crystal Reports 8, and all of the reports display fine in a Windows app I wrote some years ago using Crystal Reports 8. Again, the only difference between those reports that do work and those that do not is the number of tables used in the report: one table or view in the reports that display, more than one table (tables only, none use views) in the reports that do not display.
    As for the code I am using, below are the relevant methods. The function MakeConnectionInfo simply parses out the components of a standard SQL connection string into a ConnectionInfo object. DisplayedReport is the ID of the CrystalReportViewer on the page.Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs)
            Dim o As Object = Session("ReportParams")
            Dim ReportURL As String = ""
            'Verify that there is a ReportParameters object
            If o Is Nothing OrElse o.GetType IsNot GetType(ReportParameters) Then 'Redirect to the error page
                Response.Redirect("/errors/MissingReport.aspx")
            End If
            ReportParams = CType(o, ReportParameters)
            'Verify that the report exists
            ReportURL = "/Reports/ReportFiles/" + ReportParams.ReportName
            ReportPath = Server.MapPath(ReportURL)
            If Not File.Exists(ReportPath) Then
                Response.Redirect("/errors/MissingReport.aspx?Report=" + ReportParams.ReportTitle)
            End If
            InitializeReport()       
        End Sub
        Protected Sub InitializeReport()
            Dim RD As New ReportDocument
            Dim CI As ConnectionInfo = MakeConnectionInfo(DB_Bonus)
            Dim RPF As CrystalDecisions.Shared.ParameterField = Nothing
            RD.Load(ReportPath)
            If ReportParams.SelectString <> "" Then
                Dim Adapt As New SqlDataAdapter(ReportParams.SelectString, DB_Bonus)
                Dim DS As New Data.DataSet
                Adapt.Fill(DS)
                RD.SetDataSource(DS.Tables(0))
            End If
            For Each kvp As KeyValuePair(Of String, String) In ReportParams.Formulas
                Dim FFD As FormulaFieldDefinition = Nothing
                Try
                    FFD = RD.DataDefinition.FormulaFields(kvp.Key)
                Catch ex As Exception
                    'Do nothing
                End Try
                If FFD IsNot Nothing Then
                    Select Case FFD.ValueType
                        Case FieldValueType.DateField, FieldValueType.DateTimeField
                            If IsDate(kvp.Value) Then
                                FFD.Text = String.Format("Date()", Convert.ToDateTime(kvp.Value).ToString("yyyy, MM, dd"))
                            Else
                                FFD.Text = "Date(1960, 01, 01)"
                            End If
                        Case FieldValueType.StringField
                            FFD.Text = String.Format("""""", kvp.Value)
                        Case Else
                            'For now, treat these as if they were strings. If things blow up here,
                            'we will need to add the appropriate formatting for the field type.
                            FFD.Text = String.Format("""""", kvp.Value)
                    End Select
                End If
            Next
            For Each T As CrystalDecisions.CrystalReports.Engine.Table In RD.Database.Tables
                Dim TLI As TableLogOnInfo = T.LogOnInfo
                TLI.ConnectionInfo = CI
                T.ApplyLogOnInfo(TLI)
            Next
            DisplayedReport.ReportSource = RD
        End Sub
    Does this approach not work with reports containing multiple tables, or is there something I'm missing? Any meaningful suggestions would be much appreciated.

    Dear Dixit,
    Please refer to the Crystal report landing page to get the details
    information about the support for crystal report issues.
    Please use the following thread to post your questions related to
    crystal report.
    SAP Business One and Crystal Reports
    Regards,
    Rakesh Pati
    SAP Business One Forum Team.

  • CrystalReportViewer Failed to Open the connection Unable to retrieve Object

    I am getting the following Error on trying to view a report in the CMC and the Infoview.
    CrystalReportViewer
    Failed to Open the connection. ReportName
    Unable to retrieve Object.
    Failed to open the connection. ReportName
    I have recently re-installed Crystal Reports Server XI  on a server after a disk failure. I had a backup of my CMS database. I reinstalled the Crystal Servwer without atttaching this database, however crystal did not create a new db so I attached my old one.
    I have deleted all my old ODBC connections and recreated them with new names and then reconnected my reports in Crystal Reports XI using the "Set Datasource Location" option and the report works fine.But as soon as I try to view it after uploading it as an object onto the server, I get the above error.
    Any help would be appreciated.

    I am tagging into this unanswered question as well because I think I have a similar issue.  In my case I have a report which runs correctly in Crystal Reports designer but when I move it to the scheduler it fails on a "Failed to connect" to the report.  In have used "Set data location" to no avail.  When I go to Admin Tools and look at the complete list of datasources for all my reports this particular datasource is listed twice.  The group of reports under one of the datasources works correctly.  The reports listed under the second datasource all fail.  The two datsources are spelled exactly the same and when I sompare the database details for a successfull and a failing report using this datasource they are the same (in the console and in infoview).
    I have also checked the ODBC connections on the Crystalserver and there is only one occureence.
    Any ideas?
    Thanks!

Maybe you are looking for

  • Help.....How to Open a Project in WSAD..............

    Hi Everybody, I am new to WSAD 4... I created a J2EE project. My program is located in C:\Program Files\IBM\Application Developer\workspace Can someone Please tell me how can i open this project in WSAD. I searched in help, but no help there.. I woul

  • Can't update camera raw file in photoshop cs5

    I have Adobe Photoshop CS5, version 12.0.4.  I am trying to open camera raw files ending in ARW (Hasselblad Stellar Camera) and PhotoShop tells me there are no updates available.  I have downloaded the mac os file (using Yosemite, latest version) and

  • ITunes Duplicate Artwork

    I'm running 10.7.1 and iTunes 10.4 (64-bit). When adding artwork to selected items within iTunes via the get info window, the artwork is added TWICE for each item when double-clicking on the artwork box and navigating to the art. However, when select

  • NOKIA 5130 -UNABLE TO CONNECT TO GPRS CONNECTION

    I have bought new Nokia 5130 Express Music handset on 26 Dec 2009 and Reliance GSM post paid connection. I have got settings from reliance from GPRS, WAP and MMS setting. The problem faced is whenever, I connect to opera mini browser, it connecting f

  • ORA-12541: TNS: no listener when attempting to log int SQL*Plus

    Hi everyone, Since we are now studying forms. I installed The Developer Suite on the same machine as the Oracle Database. I was able to use SQL*Plus and the Procedure Builder in Oracle Forms. I was able to connect to the Oracle 8i database with the O