Issue Description
If you have a JRXML report with Table component and specify a complex expression in a Detail TextField element, it leads to disabling Filter/Sort JIVE functionality.
Please find attached printscreen of the issue:
Resolution
JIVE looks at the expression in the detail text field to understand what is the data source field or variable it needs to sort and filter after.
When the text field uses a simple expression with only the name of a field or variable, things work smooth.
Take the "Freight" column in the report attached.
The text field in the detail cell has the following formula:
"$" + $F{freight}
The result of this formula is known only when JR renders the content of the text field and is not know when sorting or filtering occurs.
Sorting and filtering are data processes which occur at data level, when only field and variables values are at hand, and when text field expression are not known.
In short, we cannot sort and filter on text field expressions.
We can only sort and filter on dataset fields and variables.
The solution in such cases is to either take the text field formula and create a variable for it in the dataset, and then use this variable as the only thing in the text field expression.
Another approach is to leave the expression of the text field in place, but specify at column level in the table component, which is the field or variable to use for sorting and filtering, using one of the following two custom properties that can be set in the column tag/object:
net.sf.jasperreports.components.table.column.field
net.sf.jasperreports.components.table.column.variable
Ref. Case 00063266
Recommended Comments
There are no comments to display.