Error"Failed to open the connection"  - Named Instance of SQL Server 2005

"Failed to open the connection" error, when connecting to the Named Instance of SQL Server 2005
The report is throwing error, when changing the logon information dynamically through C#.
Code
     string reportPath = @"D:\NET\TestReport\TestReport.rpt";
     ReportDocument reportDocument = new ReportDocument();
     reportDocument.Load(reportPath);
     foreach(CrystalDecisions.CrystalReports.Engine.Table table in tables)
          TableLogOnInfo tableLogonInfo = table.LogOnInfo;                         
          tableLogonInfo.ConnectionInfo.ServerName = @"TestServer\Instance1";  //Connnecting to Named instance of SQL Server 2005
          tableLogonInfo.ConnectionInfo.UserID = "sa";
          tableLogonInfo.ConnectionInfo.Password = "password";
          tableLogonInfo.ConnectionInfo.DatabaseName = "TEST_DB";
          table.ApplyLogOnInfo(tableLogonInfo);     
     crystalReportViewer1.ReportSource = reportDocument;
Error Message
     Failed to open the connection.
     Failed to open the connection.
     C:\DOCUME1\PUGALE1\LOCALS~1\Temp\{DF9593A5-5C80-4CBC-ABC3-EC4EF204A7EB}.rpt
The error is occuring only whenever i am connecting to the Named Instance of SQL Server 2005.
Thanks in Advance
Edited by: pugalendran p on Feb 2, 2009 10:32 AM
Edited by: pugalendran p on Feb 2, 2009 10:43 AM

Hi,
Following solution might help you to resolve the issue.
Solution1:
Issue happens because universe connection to the Database is not responding and the Data Source Name is not configured to write SQL Server 2005 database.
Resolution
Created new DSN connection under SYSTEM DSN to SQL Server 2005 Database.
Import the universe from the designer.
Go to File->Parameters.
Edit Connection.
On the Database Middleware Page expand SQl Server 2005->Select SQL Server 2005 driver.
Change the DSN to new DSN connection
Test the connection.
Save the Universe and Export it to the repository.
Solution2:
I am taking Oracle as an example over here.
This can be caused when the SQLNET.ora is located in a remote location using mapped drives.
Resolution
To resolve,
check the registry [HKLM\SOFTWARE\ORACLE] you should see a folder called HOME0
look for any paths that contain a mapped drive partition
Change the mapped drive letter to a UNC path (
server\folder)
Open a command prompt and do a tnsping using the tnsname and verify the location of the SQLNET.ora or TNSNAMES.ora
If the path is not updated to the new path
Reboot the server
Regards,
Sarbhjeet Kaur

Similar Messages

  • 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.

  • Error: Failed to open the connection

    Hi all,
    I have use Crystal Report 2008 to construct a report which access mySQL via ODBC. HOwever, I am fail to publish it to InfoView.
    It always display the following error:
    ERROR [PublishingService:HandlerPool-14] BusinessObjects_PublicationAdminErrorLog_Instance_2467 - [Publication ID # 2467] - Document job "Report2a.rpt" (id 2,475) scheduling failed: Failed to open the connection. ~tmp1356563301f0e10.rpt. (FBE60502)
    My BOE(XI 3.0) is installed in SUSE Linux Enterprise 9 x86 and have tested the ODBC connection via isql and it can be connected.
    Can anyone help to identify the problem? Or any procedure can be provided to publish the crystal report to InfoView.
    Thank you so much.

    Hi all,
    I have use Crystal Report 2008 to construct a report which access mySQL via ODBC. HOwever, I am fail to publish it to InfoView.
    It always display the following error:
    ERROR [PublishingService:HandlerPool-14] BusinessObjects_PublicationAdminErrorLog_Instance_2467 - [Publication ID # 2467] - Document job "Report2a.rpt" (id 2,475) scheduling failed: Failed to open the connection. ~tmp1356563301f0e10.rpt. (FBE60502)
    My BOE(XI 3.0) is installed in SUSE Linux Enterprise 9 x86 and have tested the ODBC connection via isql and it can be connected.
    Can anyone help to identify the problem? Or any procedure can be provided to publish the crystal report to InfoView.
    Thank you so much.

  • 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?

  • Crystal report Error "Failed to open the connection."

    I have an ASP.NET application that access a database through ODBC. There is a problem  when I run Crystal Report " Failed to open the connection. Failed to open the connection". Can someone tell me how can i overcome ths problem.

    Moved to .NET SDK forum.
    Search here, lots of posts on how to debug database access through a WEB app.
    Don

  • Error: Failed to open the connection when opening Crystal Report in CMC or

    Hello all,
    I am getting theError: Failed to open the connection when opening Crystal Report in CMC or Infoview
    with access database as the datasource which is in the network drive.

    Hi Sonali,
    This is because Crystal Reports does not recognize database connection from share drive
    1. Save the database locally on server machine
    2. Create a new database on server and link the new database with the database on Network.
    Steps to link the database.
    1.Create a new test database on server.
    2. Go to File --> Get External Data --> Link tables | Select the database on Network Drive.
    3. Select all the tables from the database.
    4. Save the Database  e.g. Test.mdb.
    5. Create an ODBC Connection on server machine, with the same name as on client machine using test.mdb database.
    Note: Click on Advanced button, enter the default user id and password for the odbc connection, it is not mandatory to give Login Name and Password, only if the user id and password are given then we need to provide the same user id and password in the CMC database configuration.
    6. Create a report using this ODBC connection, and save the report to Enterprise.
    Regards,
    Navin

  • 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. 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, 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

  • Failed to open the connection after changing the connection in CMC

    Hi
    Below are our environment details:
    BOXI 3.1 SP3
    Solaris Sparc 10
    Crystal Reports 2008 Sp3
    Weblogic 11g
    Our team is facing the problem as described below:
    We have created Crystal Reports using JDBC connection and it works fine
    in an environment(SIT).
    When we migrate these reports to the another environment(UAT) we get
    the error "Failed to open the connection"
    After migrating we indeed change the connection to Custom Database
    Login Information in CMC.
    So to troubleshoot we installed Crystal Reports in UAT environment and
    had to perform Set DataLocation after which
    the reports starting working fine.
    Now when we are migrating reports to Production we have the same issue.
    We cannot install Crystal Reports on Production this time and hence we
    are stuck.
    Please let us know if any known workaround or solution for the same.
    Thanks
    Kamal
    Edited by: Kamalaksha Shetty on Nov 15, 2011 4:18 AM

    Hi Meenal,
    I am not 100% sure I understood the workaround of having Crystal Designer on the server. Can you connect from UAT designer to production and perform the same operation?
    Check this KBA that describes this problem and a solution:
    https://service.sap.com/sap/support/notes/1445067
    Regards,
    Julian

  • 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

  • Failed to open the connection error using Business View OLE DB

    I have a Crystal Report built on a Business View with the db being accessed by an OLE driver.  Everything works fine using Crystal Designer, but when I try to access it through BOE I get the "Failed to open the connection" error.  I have the ole drivers installed on the server.
    We are on BOE 12.1.0.
    The db is IBM as400.
    Suggestions??

    Ok so I spent the day trying to find the differences between the working and the non-working application. I began by adding code one piece at a time to the working application. The goal was to try and get it to break on the deployment server. I found the lines of code that is causing the break on the deployment server. Here it is:
        private void setReportParameters()
            try
                crystalReportDocument.SetParameterValue(0, reportUserName.Value);
                crystalReportDocument.SetParameterValue(1, reportArea.Value);
                crystalReportDocument.SetParameterValue(2, reportCDR.SelectedValue);
                crystalReportDocument.SetParameterValue(3, reportStatus.Value);
            catch (Exception ex)
                throw ex;
    This sub-routine is called from my button click code and is used to set the parameters for the report. Once I added this to the working application it broke also. My goal here is to send the parameters to the report from a form the user is filling out. Please keep in mind this code works in Visual Studio 2005 and my local IIS server running on my development machine. It breaks on the target deployment server
    The code broke on reports with sub-reports as well as report with no sub-reports. As soon as it was added and deployed the application through the "Failed to open the connection" error.
    Thoughts?

  • Problem: Failed to open the connection. Error Code 0x800002F4 (-2147482892)

    Problem: Failed to open the connection. Error Code 0x800002F4 (-2147482892)
    This is on two (2) separate machines. These are NEW INSTALLATION development work stations (laptops). One is Vista (Visual Studio 2008 / Crystal Reports 2008), and the other is Windows XP Pro (Visual Studio 2003 / Crystal Reports XI R1).
    I am using EXISTING CODE (established over several years), and EXISTING REPORTS (established over several years). Old development station was XP Pro, as above, and still exists, and still works fine.
    I can open the report in Crystal, and see the results just fine. Data for the report is obtained via ODBC.
    Can someone identity the actual error by the Error Code above, and advise. Thanks You in Advance.

    Ok, so let's start at step 1:
    SP 1 just released and I'd recommend applying that. The SO is available from here:
    https://smpdl.sap-ag.de/~sapidp/012002523100010503722008E/cr2008_sp1.exe
    For future reference, msm matching the above SP is here:
    https://smpdl.sap-ag.de/~sapidp/012002523100011715292008E/cr121_mm.zip
    and msi is here:
    https://smpdl.sap-ag.de/~sapidp/012002523100011722132008E/cr121_redist_install.zip
    Step 2: a few questions:
    a) I am not sure what CR SDK you are using; RDC, .NET? I suspect that you are using the CR assemblies for .NET, but do confirm.
    b) what is the database you are connecting to?
    c) is this a web or a win app?
    Step 3:  As the error can mean any number of things (to me it's just means something went wrong during the attempt to connect to the database...), the solution may vary, however the troubleshooting steps remain quite consistent:
    1) Do make sure the report is indeed working in the CR 2008 designer (e.g.; make sure "saved data" is not enabled.
    2) Try a simple new windows app with one of your reports. See if you have a report with no subreports and use it
    3) If that works, use a report with subreports
    4) If the above does not work in (1) above, create a new report to the same ODBC connection, do not code any database connection - let the report prompt for the logon parameter (PWD)
    5) Run the new report in your new app, enter the PWD when prompted
    6) If this works, add your database logon code
    7) If that works, add your original report (again, preferably with no subreports)
    8) If that fails, ensure that the subreport and main report use the same database connection type (ODBC)
    9) If it works, see if you can determine the difference between your old app and the new app.
    Ludek

  • Failed to open the connection.  ReportName

    Post Author: mhortman
    CA Forum: General
    I just installed CR Server, and am trying to run my first report, and this is the error message that comes up when I try to preview it:In the Crystal report Viewer:Failed to open the connection.
    Yesterday Sales
    Unable to retrieve Object.Failed to open the connection.
    Yesterday Sales The report is named Yesterday Sales.   The documentation says something about removing the duplicate ODBC connection, but the ODBC on the machine I developed the report, and on the server are different. Any Help????Thanks

    Post Author: GraemeG
    CA Forum: General
    mhortman:
    The documentation says something about removing the duplicate ODBC connection, but the ODBC on the machine I developed the report, and on the server are different.
    That might be your problem - the report is expecting to find the odbc conector it has been assigned and can't so it fails. Not knowing the version you're using, I suggest you defined an odbc driver on the development machine the same as the one on the server (or vice versa depending on which is less distruptive). Make sure your report is using that connection and republish it. It should work fine.
    Just in case you're not sure how, in XI you change the odbc connection by right-clicking on the 'Database fields' section within Field Explorer, Create new connection and then re-assign each table in the top window to the new odbc connection in the bottom window.

  • NZ Library Error: Failed to open the wallet

    I installed Oracle Http Server (Apache 2 distributed with Oracle 11g database software) in the same server (but in a different Oracle home) where I had installed Oracle 11g. The installation was fine. However, I haven't been able to start the Http Server at all. When I checked all the logs, I finally found the following error. What do I need to do?
    NZ Library Error: Failed to open the wallet
    Thanks.
    Andy

    I know it has been a long time since anyone has posted on this thread but I am hoping that Jay_Kard might get notified.
    I have had almost exactly the same problem.  I have about 50 reports that are available to users through InfoView, they have been around for a year or more.  Suddenly a few weeks ago two of them stopped working, the users get the "Failed to make the connection" error.
    I am using Crystal Reports 11.5 and Crystal Reports Server 11.5 with an ODBC connection to a SQL Server 2005 database.  The 2 reports that are not working both use a series of dynamic prompts for the users to enter report parameters, but so do the others that continue to work well.  Before reading this thread I had already tried a lot of the suggestions from this thread, I can't get anything to work.  The ODBC DSN on the server is set up and named exactly like the DSN that I use for development, I have rebuilt the dynamic prompts used on these reports, I can't get these 2 reports to work.
    One other odd thing is that I, with admin rights to all reports in InfoView, can view these failing reports both from Crystal and from InfoView following the same path as my users to access the reports.  I don't know if that will help anyone figure out the problem.
    Jay, if you happen to read this I would love to know if you were able to get your problem resolved, I may need the same solution.
    Thanks.

Maybe you are looking for