Udostępnij za pośrednictwem


Defining Report Parameters in a Report (Visual Studio Report Designer)

You can define report parameters in a client report definition (.rdlc) file to support conditional formatting or to use in expressions or code. You cannot map report parameters to query parameters or use them in filters. In local processing mode, all data processing is handled independently of report processing.

To set parameters, you use the Report Parameters dialog box to add parameters to the report definition.

To provide a data value to the parameter at run time, you must write code that passes the value. In local processing mode, the ReportViewer controls do not provide a parameter area for accepting parameter values from the user. You will need to add fields to the form to get data values, and then use the SetParameters method to pass those values to the ReportViewer control. Sample code is provided that illustrates this technique. For more information, see Sample: Using an RSS Feed in ReportViewer.

Note that some parameter properties are intended for programmatic use only. For more information about how parameter properties are used programmatically, see Microsoft.Reporting.WebForms.ReportParameterInfo and Microsoft.Reporting.WinForms.ReportParameterInfo.

See Also

Concepts

Configuring ReportViewer for Local Processing