Parameters are an important part of any report. They influence the data populated by manipulating the data passed in the report. Parameters can be used for modifying the default values of data and applying filtering to the data. You can also select more than one value using multi-value parameters.
FlexReport has parameters collection, C1FlexReport.Parameters, where parameters can be defined to specify types, captions, default value, possible values, and so on.
Each element that is defined as parameters in the C1FlexReport.Parameters collection is an instance of the ReportParameter class, with the following properties:
Nullable |
Gets or sets a value indicating whether the value of this parameter can be Null. Cannot be true if this is a multi-value parameter. |
AllowBlank |
Gets or sets a value indicating whether the value of this parameter can be an empty string. Ignored unless DataType is String. |
MultiValue |
Gets or sets a value indicating whether this is a multivalue parameter (a parameter that can take a set of values). |
Hidden |
Gets or sets a value indicating whether the parameter should be hidden from the end user (however, it will still be available for programmatic use with subreports, drill-through reports etc.) |
Prompt |
Gets or sets the prompt shown to the end user when prompting for parameter values. |
Value |
Gets or sets the parameter value. Value can be specified as an array if MultiValue is true (in this case all items should have the same item type). |
DataType |
Gets or sets the data type of the Parameter. |
AllowedValuesDefinition |
Gets AllowedValuesDefinition defining the list of allowed values for this parameter. Allowed values can be specified as a static list using AllowedValuesDefinition.Values property, or as a dynamic list bound to one of report’s data sources using AllowedValuesDefinition.Binding property. |
Report parameters can be easily added through the FlexReportDesigner application. For more information, see Working with Parameters and Binding Data to Parameters in Multiple Data Source Report .