Private Sub LoadReport(ByVal strReportPath As String)
Dim rpv As Microsoft.Reporting.WinForms.ReportViewer
rpv = New Microsoft.Reporting.WinForms.ReportViewer()
rpv.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local
rpv.LocalReport.ReportPath = strReportPath
Dim col As Collection = New Collection
col.Add(mReportData)
rpv.LocalReport.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource("DataLayer_PotentialProperty", col))
rpv.RefreshReport()
scSplitter.Panel2.Controls.Add(rpv)
If Not rvReportViewer Is Nothing Then
scSplitter.Panel2.Controls.Remove(rvReportViewer)
rvReportViewer = Nothing
End If
rvReportViewer = rpv
rvReportViewer.RefreshReport()
End Sub
|