Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

CR VS 2013 error: Additional information: Failed to load database information.

$
0
0

We have VS 2008 (V9.0.30729.1 SP1) using .Net 3.5 under Windows Server 2003 R2 Data Center Edition. VS 2008 came with Crystal Reports Version 10.5.3700.0. We developed a little report in a winform to run against Oracle 11gR2 using the OLE DB support in the CR Report Wizard in the VS 2008 IDE. It was a standard report with some code to print the report directly to the printer with out the viewer control. Here is the working code:

 

Imports System.Data.OleDb

Imports System.Data

Imports System

Imports System.Windows.Forms

Imports CrystalDecisions.CrystalReports.Engine

Imports CrystalDecisions.Shared

 

Public Class Form1

 

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim crReportDocument As New CrystalReport1()

        Dim DataSet1 As DataSet

        Dim adoOleDbConnection As OleDbConnection

        Dim adoOleDbDataAdapter As OleDbDataAdapter

 

        Dim connectionString As String = ""

        connectionString = "Provider=OraOLEDB.Oracle;"

        connectionString += "Data Source=OURDBNAME;"

        connectionString += "User ID=OURUSERID;Password=OURPSW"

        adoOleDbConnection = New OleDbConnection(connectionString)

        Dim sqlString As String = ""

        sqlString = "SELECT * FROM edi_filing_source_lov where filing_source_code in ('A','E')"

        adoOleDbDataAdapter = New OleDbDataAdapter(sqlString, adoOleDbConnection)

        DataSet1 = New DataSet()

        adoOleDbDataAdapter.Fill(DataSet1, "edi_filing_source_lov")

        crReportDocument.Database.Tables(0).SetDataSource(DataSet1)

        crReportDocument.PrintOptions.PrinterName = "HP_LaserJet_4350_PCL_5e_Info_Tech"

        crReportDocument.Refresh()

        crReportDocument.PrintToPrinter(1, False, 1, 99)

 

        Me.Close()

    End Sub

 

End Class

 

We want to migrate this report to VS 2013. We installed VS 2013 Professional (V12.0.30110.00 Update 1) under Windows Server 2012 R2 Data Center Edition. We downloaded CRforVS_13_0_9 and installed it in VS 2013. We moved the project from VS 2008 and opened it under VS 2013. It looks like it converted OK. When we run it we get the following error:

 

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in CrystalDecisions.CrystalReports.Engine.dll

 

Additional information: Failed to load database information.

Error in File temp_f11eb1be-db98-4d33-800c-4db3b36ab14e {EEB2A9E4-8239-49CB-B016-8CE4F4C7643E}.rpt:

 

Failed to load database information.

 

More information: We can step through the wizard in VS 2013 using the standard template and add a report viewer control to the form and point it at the report and run it just fine in the VS 2013 IDE when there is no code in the form1_load event. We feel we have the Oracle.DataAccess.dll for the 11.2.0 client installed and tested correctly on the server and do not feel there is an issue with data base installation. When we add back the code above to the form1_load event and run it we get the error above.

 

We have the logger set up but nothing gets added to the log files.

 

We have tried three different ways to set the data source to resolve the error that is occurring at this line of code that is failing but with no luck:

 

crReportDocument.Database.Tables(0).SetDataSource(DataSet1)

crReportDocument.SetDataSource(DataSet1)

crReportDocument.Database.Tables(0).SetDataSource(DataSet.Tables("edi_filing_source_lov"))

 

Do you have any other suggestions we could try?

 

Bruce


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>