Issue:
[toc on_off::hide=1]
The visualize.report interface exposes the updateComponent function that gives your script access to the JIVE UI. Using the updateComponent function, you can programmatically interact with the JIVE UI to do such things as set the sort order on a specified column, add a filter, and change the chart type. In addition, the undoAll function acts as a reset.
Customer would like to apply its own filtering/sorting actions instead of JasperReports Server default JIVE. But customer faced issues while tried to get report name and perform actions on it.
Resolution:
1. You can provide a name to every component by adding additional property:
<property name="net.sf.jasperreports.components.name" value="test"/>
JIVE actions like filter/sorting would work for simple text field. For more information, please check: https://community.jaspersoft.com/documentation/tibco-jasperreports-server-visualizejs-guide/v71/api-usage-interactive-reports#Interacting_With_JIVE_UI
Another issue is - JIVE is disabled for fields that contains complicated expressions. For example:
$F{name} == null || $F{name} =="" || LEN(TRIM($F{name} ) ) != 0 ? $F{name} + "true" : $F{name} + "false"
The reason behind it is that interactivity of a column such as filter, conditional formatting or sorting is related to the type of values displayed by that column. Text and numbers and dates have different sorting and filtering criteria, so it is important to know the type of the date in the column. When using a complex expression with more than a field or variable in it, we cannot know the type of the values produced by the expression anymore. So we don't know how to sort it or how to filter the values.
When the expression is put back into a variable, and the single variable is part of the column expression, we know the type, because variables have a type. As a solution you can place expression in variable and use this variable in text field expression. Please, check this screencast: https://screencast-o-matic.com/watch/cqVT6b3uOU
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now