Imports System.Data
Imports System.Drawing
Imports System.Xml
Imports System.Windows.Forms.Control
Imports System.Data.SqlClient
Imports System.Windows.Forms.BindingSource
Imports System.Windows.Forms.Binding
Imports Microsoft.Reporting.WinForms
Imports Microsoft.Reporting.WinForms.ParameterState
Imports Microsoft.Reporting.WinForms.DrillthroughEventArgs
Imports Microsoft.Reporting.WinForms.ReportDataSource
Imports Microsoft.Reporting.WinForms.ReportDataSourceCollection
Public Class Form1
Public datasource As Microsoft.Reporting.WinForms.ReportDataSource
'Public conn As System.Data.SqlClient.SqlConnection
Public fileSql As New Sql
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.ReportViewer1.RefreshReport()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Me.ReportViewer1.ProcessingMode = ProcessingMode.Local
'Me.ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local
''Dim ds As New DataSet()
''Dim da As SqlDataAdapter
' ''Dim dt As DataTable
''Dim cmd As SqlCommand
''conn = New SqlConnection(fileSql.Strcon)
''conn.Open()
''Dim sqlCheckUser As String = " select * from dbo.transactionsale"
''cmd = New SqlCommand(sqlCheckUser, conn)
''cmd.ExecuteNonQuery()
''da = New SqlDataAdapter(sqlCheckUser, conn)
''ds = New DataSet()
''da.Fill(ds, "transactionsale")
' ''dt = ds.Tables("transactionsale")
''datasource = New Microsoft.Reporting.WinForms.ReportDataSource("transactionsale", ds.Tables(0))
'Dim jaa As String = "fff"
''ReportViewer1.LocalReport.DataSources.Clear()
''ReportViewer1.LocalReport.DataSources.Add(datasource)
'ReportViewer1.LocalReport.ReportPath = "Report1.rdlc"
'Dim parajoe As New ReportParameter("parajoe", jaa)
'Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter() {parajoe})
'Me.ReportViewer1.LocalReport.ReportEmbeddedResource = "Report1.rdlc"
'Me.ReportViewer1.LocalReport.ReportPath = "Report1.rdlc"
'ReportViewer1.LocalReport.Refresh()
'Me.ReportViewer1.RefreshReport()
'//Set the report processing mode
Me.ReportViewer1.ProcessingMode = ProcessingMode.Local
'//Assign report file i.e. rdlc
Me.ReportViewer1.LocalReport.ReportEmbeddedResource = "GI.ServiceManager.ServiceReport.rdlc"
'//Add datasets
'this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("ProcessData", Program.CurrentServiceInstrument.Data.tblServiceReportProcessData));
'this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("AccessoryData", Program.CurrentServiceInstrument.Data.tblServiceReportAccessoryData));
'this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("Summary", Program.CurrentServiceInstrument.Data.tblServiceReportSummary));
Dim jaa As String = "ddd"
'//Create the report parameters and assign values to it
Dim rParam As ReportParameter() = New ReportParameter(1) {}
rParam(0) = New ReportParameter("parajoe", jaa)
'//Set report parameters
Me.ReportViewer1.LocalReport.SetParameters(rParam)
'//Refresh report to render it
Me.ReportViewer1.RefreshReport()
End Sub
End Class
A first chance exception of type 'System.ArgumentNullException' occurred in Microsoft.ReportViewer.WinForms.dll
A first chance exception of type 'Microsoft.Reporting.WinForms.LocalProcessingException' occurred in Microsoft.ReportViewer.WinForms.dll
A first chance exception of type 'Microsoft.Reporting.WinForms.LocalProcessingException' occurred in Microsoft.ReportViewer.WinForms.dll
A first chance exception of type 'Microsoft.Reporting.WinForms.LocalProcessingException' occurred in Microsoft.ReportViewer.WinForms.dll
A first chance exception of type 'Microsoft.Reporting.WinForms.LocalProcessingException' occurred in Microsoft.ReportViewer.WinForms.dll