all groups > vb.net controls > october 2007 >
You're in the

vb.net controls

group:

ReportViewer and dynamic query


ReportViewer and dynamic query jay
10/27/2007 7:49:25 PM
vb.net controls:
I am using strongly typed datasets, so the report viewer works great
with the following code:

Me.ReportViewer1.Reset()
Me.ReportViewer1.LocalReport.DataSources.Clear()
Me.ReportViewer1.ProcessingMode =
Microsoft.Reporting.WinForms.ProcessingMode.Local

Dim newDS As New
Microsoft.Reporting.WinForms.ReportDataSource("ProcurementDataSet_ApplicationRights")
newDS.Value = Me.ApplicationBindingSource
Me.ReportViewer1.LocalReport.DataSources.Add(newDS)
MeApplicationRightsTableAdapter.Fill(Me.ProcurementDataSet.ApplicationRights)
Me.ReportViewer1.LocalReport.ReportPath =
"Reports\rpt_ApplicationRights.rdlc"
Me.ReportViewer1.RefreshReport()

But now I need to create this dataSet on the fly based on parameters
defined in the report, and would like to see some examples of this.
It seems the VB report likes to have the field defined in a dataset
AddThis Social Bookmark Button