Skip to Content
0
Former Member
May 13, 2013 at 04:10 AM

VB.net System.IO can't load crdb_adoplus.dll

259 Views

I used CR in VB.net 2010. I already reinstall Crystal Report and SP2. The CR in the program could in design mode. When this report run with Crystal Report View. After load report, It's found problem at SetDataSource.

VB.net error message said. I really installed Crystal Report at: "SAP BusinessObjects\...\dotnet\..." not "\dotnet1\" What i did anything wrong

********************************

System.IO.FileNotFoundException was unhandled

Message=Could not load file or assembly 'file:///C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified.

Source=mscorlib

FileName=file:///C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll

FusionLog==== Pre-bind state information ===

LOG: User = JAMES_ONE\Administrator

LOG: Where-ref bind. Location = C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll

LOG: Appbase = file:///C:/Documents and Settings/Administrator/My Documents/Visual Studio 2010/Projects/TestReport2/TestReport2/bin/Debug/

LOG: Initial PrivatePath = NULL

Calling assembly : (Unknown).

===

LOG: This bind starts in LoadFrom load context.

WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().

LOG: Using application configuration file: C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\TestReport2\TestReport2\bin\Debug\TestReport2.vshost.exe.Config

LOG: Using host configuration file:

LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\config\machine.config.

LOG: Attempting download of new URL file:///C:/Program Files/SAP BusinessObjects/Crystal Reports for .NET Framework 4.0/Common/SAP BusinessObjects Enterprise XI 4.0/win32_x86/dotnet1/crdb_adoplus.dll.

StackTrace:

at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)

at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)

at System.Reflection.Assembly.LoadFrom(String assemblyFile)

at CrystalDecisions.ReportAppServer.DataSetConversion.DataSetConverter.DataSetProcessingDelegate(IntPtr arg)

InnerException:

********************************

my procedure:

********************************

Friend Sub ViewReport(ByVal ReportName As String, ByVal TableName As String, ByVal QueryString As String, Optional ByVal [Parameter] As String = "")

Try

'If Not UBound(TableName).Equals(UBound(QueryString)) Then MessageBox.Show("Passed Variable Are Not Correct", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information) : Exit Sub

Dim Report As CrystalDecisions.CrystalReports.Engine.ReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument

Dim CrystalReportViewer As CrystalDecisions.Windows.Forms.CrystalReportViewer = New CrystalDecisions.Windows.Forms.CrystalReportViewer

CrystalReportViewer.ActiveViewIndex = 0

CrystalReportViewer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle

'CrystalReportViewer.DisplayGroupTree = False

CrystalReportViewer.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None

CrystalReportViewer.Dock = System.Windows.Forms.DockStyle.Fill

CrystalReportViewer.Location = New System.Drawing.Point(0, 0)

CrystalReportViewer.Name = "CrystalReportViewer"

Dim Adapter As New OleDb.OleDbDataAdapter

Dim DataSet As New DataSet

'For I As Integer = 0 To UBound(TableName)

Adapter = GetDataAdeptor(QueryString)

Adapter.Fill(DataSet, TableName)

'Next

' String

'*** Report In the report Folder

'Dim rptPath As String = Application.StartupPath & "\CR-01.rpt"

'Report.Load(rptPath) ' programming path

Report.Load(Application.StartupPath & "/" & ReportName & "") ' programming path

Report.SetDataSource(DataSet)

If Not [Parameter] = "" Then Report.SetParameterValue(0, [Parameter])

CrystalReportViewer.ReportSource = Report

Me.Panel1.Controls.Add(CrystalReportViewer)

Catch ex As Exception

MsgBox("EORROR: " & ex.Message)

End Try

End Sub

***********************************