'How can I filter in Birt (Parameter) on a computed column?
Is it possible to add a parameter to filter by a computed column and if so how?
I have a report which gives the level of a bill of material and this is set as level in Birt as a computed column using the following expression:
var result = "" ;
for(i = 0; i< row["depth"]; i++) {
result = result + "."
}
result = result + row["depth"] ;
result;
Solution 1:[1]
I found the solution and thought others may find this useful.
How to create cascading parameters that use a single data set.
In Data Explorer, right-click Report Parameters, and choose: New Cascading Parameter.
On New Cascading Parameter, in Cascading Parameter Name, you can specify a different name if you do not want to use the default name. The name that you specify appears only in the list of report parameters in Data Explorer.
In Prompt text, specify the name for the parameter group that appears in the Enter Parameters dialog.
Select Single Data Set.
Create the report parameters for this group of cascading parameters.
In Parameters, choose Add. On Add Cascading Parameter, specify the following values:
In Name, type the parameter name. In Data Set, select the data set that returns the values for populating all the parameter lists. In Value, select the field that contains the values that you want to pass to the SQL query or filter condition at run time.
In Display Text, optionally select a field that contains the values that you want to display to the user. For example, the values to pass to the SQL query or filter condition are from the productcode field, but you want to display values from the productname field to the user.
Choose OK.
In Properties, set the other properties for this report parameter, including the prompt text, display type, and default value.
To create the next report parameter, choose Add, and follow the same steps until you set up all levels of the cascading parameter group.
- When you finish creating all the report parameters in the group, choose OK. The cascading parameters appear in Report Parameters in Data Explorer.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | TheOx |