Reporting

Parametrized Reports

 

When it is necessary to pass data of a certain type to a report (e.g., to pass a specific value to its filter string or a calculated field), you can avoid writing any code by utilizing parameters.

Requesting date-time parameter values in a report's Print Preview.

Passing Parameter Values to Your Reports

You can create parameters both of standard types (listed in the System.Type enumeration) and of your own custom types (such as enumerations or XPCollection objects).

When a report's Print Preview is shown, the Parameters panel automatically creates editors for each visible parameter, appropriate to its type (e.g., text boxes for string parameters and drop-down lists for Boolean values).

Parameter editors are created automatically, with respect to the parameter types.

The capability to provide custom editors for report parameters is preserved in all platforms supported by XtraReports.

In LightSwitch, parameter values can be passed directly from LightSwitch queries to reports.

Alternatively, you can pass a parameter's value silently (without prompting your end-users to submit it) and hard-code this value by yourself.

For a parameterized report, you can also choose whether a report document is shown immediately using the default parameter values, or it is rendered only after submitting parameter values by an end-user.

Using Report Parameters

After a parameter is created, added to a report's collection and assigned its value, it can be used in different ways during report generation. For example, you can bind report controls to a parameter...

Binding report controls to parameters.

...or filter your report based on a parameter's value...

Filtering a report based on a parameter's value

...or refer to report parameters in a calculated field's expression.

You can refer to parameters in a calculated field's expression.

This extreme flexibility with the use of parameters allows you to create the most complex reports without the need to write any code.

To learn more about various data shaping capabilities available in the XtraReports Suite, see Shaping Data.

More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.