i m using access 2007 and i create one view
from 3 table now i want to pass this view in crystalreport but it can't work?
view name is = Com_Out_Qua_Panding
here is my code
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim ReportForm As New CrystalReportForm
Dim Com_Out_Qua_Panding(0) As String
Dim QueryString(0) As String
Com_Out_Qua_Panding(0) = "Com_Out_Qua_Panding" 'Pass The Table That you used in the crystal Report
QueryString(0) = "SELECT * FROM Com_Out_Qua_Panding" ' Pass the Query
'ReportForm.MdiParent = MainForm 'Pass For Mdi True
ReportForm.ViewReport("RptCom_Out_Qua_Panding.rpt", Com_Out_Qua_Panding, QueryString, )
' You can pass the Parameter Value It is Optional
ReportForm.Show()
End Sub
Friend Sub ViewReport(ByVal ReportName As String, ByVal PartyInward() As String, ByVal QueryString() As String, Optional ByVal [Parameter] As String = "")
Me.MdiParent = MdiParent
If Not UBound(PartyInward).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.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(PartyInward)
Adapter = GetDataAdeptor(QueryString(I))
Adapter.Fill(DataSet, PartyInward(I))
Next
'Report In the report Folder
'Report.Load(Application.StartupPath & "/Report/" & ReportName & "")
Report.Load("E:\InWard-OutWard Project\WindowsApplication1\WindowsApplication1\RptCom_Out_Qua_Panding.rpt")
'End If
Report.SetDataSource(DataSet)
If Not [Parameter] = "" Then Report.SetParameterValue(0, [Parameter])
CrystalReportViewer.ReportSource = Report
Me.Panel1.Controls.Add(CrystalReportViewer)
End Sub
please help
and thanks in advance for your help