0
我創建了2個報表billa4.rdlc和billa5.rdlc,我想根據用戶選擇的組合框選項將報表加載到報表查看器。 請幫我這個。 下面的代碼加載billa4.rdlc如何加載rdlc報表運行時
Try
Dim P2 As New ReportParameter("pbillnum", billnoprint)
Me.DataTable1TableAdapter.Fill(Me.billdata.DataTable1, billnoprint)
Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter() {P2})
Me.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
Me.ReportViewer1.ZoomMode = ZoomMode.FullPage
Me.ReportViewer1.RefreshReport()
Catch ex As Exception
MsgBox("error")
End Try
昏暗的P2作爲新ReportParameter( 「pbillnum」,billnoprint) Me.DataTable1TableAdapter.Fill(Me.billdata.DataTable1,billnoprint) Me.ReportViewer2.LocalReport.ReportPath ( 「Bill.rdlc」) Me.ReportViewer2.LocalReport.SetParameters(新澤西ReportParameter(){P2}) Me.ReportViewer2.SetDisplayMode(DisplayMode.PrintLayout) Me.ReportViewer2.ZoomMode = ZoomMode.FullPage Me.ReportViewer2 .RefreshReport() 我試過了不工作 –