LocalReport.SetParameters 方法
Sets report parameter properties for the local report.
命名空间: Microsoft.Reporting.WinForms
程序集: Microsoft.ReportViewer.WinForms (在 microsoft.reportviewer.winforms.dll 中)
语法
声明
用法
参数
- parameters
An array of ReportParameter objects that contains a list of the report parameter properties.
备注
The parameters specified for the SetParameters method must be defined in the original report definition.
示例
The following code example shows a report parameter being set to the value of a check box on a form.
private void SetReportParameters() {
ReportParameter p = new
ReportParameter("ShowDescriptions", checkBox1.Checked.ToString());
this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { p });
}
Private Sub SetReportParameters()
Dim p As New ReportParameter("ShowDescriptions", _
CheckBox1.Checked.ToString())
ReportViewer1.LocalReport.SetParameters(p)
End Sub
另请参见
参考
LocalReport 类
LocalReport 成员
Microsoft.Reporting.WinForms 命名空间