pratik65 0 Light Poster

i am trying to get crystal report of my Marks_master Records From Table . I tried Following Code But It is Giving Me Exception As :

System.IO.FileNotFoundException was unhandled
Message=Could not load file or assembly 'file:///C:\Program Files (x86)\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.

Imports System.Data.SqlClient
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class frmMarks_Report

    Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load

        Dim conn As New SqlConnection("Data Source=.\SQLEXPRESS;Initial Catalog=grade;Integrated Security=True;Pooling=False")
        Dim ds As DataSet
        Dim da As SqlDataAdapter
            Dim query As String = " SELECT Gr_No,Name,Class,Division,Semester,Exam,Subject,Max_Marks,Min_Marks,Obtained_Marks FROM Marks_Master WHERE Class='" & cmbClass & "' and Division='" & cmbDiv & "' and Exam='" & cmbExam & "' "
            da = New SqlDataAdapter(query, conn)
            ds = New DataSet

            da.Fill(ds, "Marks_Master")

            Dim mt As ReportDocument
            mt = New CrystalReport1

            Me.CrystalReportViewer1.ReportSource = mt

        Catch ex As Exception
            If conn.State = ConnectionState.Open Then
            End If
        End Try

    End Sub
End Class
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.