0
What could be wrong in my code below?
Private Sub LocalReport(ByVal digito As Integer)
Dim relatorioCorrente = New Microsoft.Reporting.WinForms.ReportDataSource()
ReportViewer1.LocalReport.DataSources.Clear()
If (digito = 1) Then
ReportViewer1.LocalReport.ReportEmbeddedResource = "ReportViewer.rpt1.rdlc"
mcv_modbusTableAdapter.Fill(geradorxmlDS.mcv_modbus)
relatorioCorrente.Name = "geradorxmlDS"
relatorioCorrente.Value = mcv_malhaBindingSource
ReportViewer1.LocalReport.DataSources.Add(relatorioCorrente)
ElseIf (digito = 2) Then
ReportViewer1.LocalReport.ReportEmbeddedResource = "ReportViewer.rpt2.rdlc"
mcv_modbusTableAdapter.Fill(geradorxmlDS.mcv_modbus)
relatorioCorrente.Name = "geradorxmlDS"
relatorioCorrente.Value = mcv_modbusBindingSource
ReportViewer1.LocalReport.DataSources.Add(relatorioCorrente)
ElseIf (digito = 3) Then
ReportViewer1.LocalReport.ReportEmbeddedResource = "ReportViewer.rpt3.rdlc"
mcv_registroTableAdapter.Fill(geradorxmlDS.mcv_registro)
relatorioCorrente.Name = "geradorxmlDS"
relatorioCorrente.Value = mcv_registroBindingSource
ReportViewer1.LocalReport.DataSources.Add(relatorioCorrente)
End If
ReportViewer1.RefreshReport()
End Sub
Would anyone care to make any suggestions? Thanks in advance for the help provided.
Format the code, horrible like this
– CypherPotato