The first value of the available report parameters can be obtained without writing any code, just using only build-in functions. We have the utility function Item(index, collection)
, which returns an item from a collection by its zero-based index. When the report processing starts, the engine will create an instance of Processing.ReportParameter
class and populate its AvailableValues
collection based on the parameter definition. This AvailableValues collection is basically a List of ParameterValue
- a simple object that consists of Name
properties. In this case we can use the Item function to obtain the value of the first item in the AvailableValues collection like this:
= Item(0, Parameters.Parameter1.AvailableValues).Value
is the name of the report parameter - "proc" in the current scenario.
With this expression set in the ReportParameter's Value field, when the report is previewed, the first report parameter value will be selected by default.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items