Jump to content
  • Conditional styles using contextual information

    Assigned User teodord
    CategoryFeature request

    REF: http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=33800&catid=8


    We have a requirement in our project to display the textfield border when the value in the text field is NULL.

    "conditionalStyle" - This allows me to conditionally display the border but I have to write style for every textfield in the report. I will not be able to use the Style Template also in this case as conditionalStyle cannot be declared in it.


    If the conditional style could access the contextual information (textfield value for which it is rendering), I can write a single style class and use it across the project.

    User Feedback

    Recommended Comments

    Changed Resolution from Open to Fixed

    Changed Status from Acknowledged to Resolved

    Hi,This can be achieved now in two ways:- style template files (JRTX) do accept conditional styles now, is just that the condition expression only support single $P, $F, $V or $R references. Sometimes this might be enough, but it does not actually give access to the value of the element.- upcoming JRL release will introduce in report elements to allow referencing a style dynamically, based on current element values.Styles with parameters is yet another kind of feature, but given its complexity, would probably not be implemented soon, so I thought I just provide some workarounds for now.I hope this helps.Teodor
    Link to comment
    Share on other sites

  • Create New...