Clarity

  • 1.  Jasper Conditional Formatting using icons

    Posted Oct 05, 2016 05:27 AM

    Hi just started using Jasper Studio.

    I have a report where I need to change a value into an icon. Like risk values are done in e.g. status reports in CA PPM.

     

    Any one how knows how that is done in Jasper Studio?

     

    Looking forward hearing from you if you know ;o)

     

    BR

    Lisbeth



  • 2.  Re: Jasper Conditional Formatting using icons

    Posted Oct 28, 2016 05:14 PM

    Hi Lisbeth,

    From Jaspersoft studio you can edit all standard reports and get inspired.
    You can either upload your custom images or use ones in the system.
    Here is an example from Project Status Report


    <image>
    <reportElement x="951" y="1" width="15" height="15" uuid="9fe13868-e5be-4948-94db-b177028ace8a">
    <printWhenExpression><![CDATA[$F{OVERALL_STATUS_KEY} == 1]]></printWhenExpression>
    </reportElement>
    <imageExpression><![CDATA[$F{P_OVERALL_STATUS} == 0 ? "repo:/ca_ppm/resources/images/arrowSideGreen" : $F{C_OVERALL_STATUS} < $F{P_OVERALL_STATUS} ? "repo:/ca_ppm/resources/images/arrowUpGreen" : $F{C_OVERALL_STATUS} > $F{P_OVERALL_STATUS} ? "repo:/ca_ppm/resources/images/arrowDownGreen" : "repo:/ca_ppm/resources/images/arrowSideGreen"]]></imageExpression>
    </image>

     

    BR Davor



  • 3.  Re: Jasper Conditional Formatting using icons

    Posted Nov 01, 2016 08:32 PM

    Agree with BR.  

     

    Here is also the example to show the Traffic light icons:

    <image>
    <reportElement x="135" y="152" width="18" height="18" uuid="cc8f24db-f0e0-4236-856f-86e3f7616760">
    <property name="local_mesure_unity" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.y" value="px"/>
    </reportElement>
    <imageExpression><![CDATA[$F{C_SCHEDULE_STATUS}.intValue() ==1 ? "repo:/ca_ppm/resources/images/stoplightGreen":
    $F{C_SCHEDULE_STATUS}.intValue() ==2 ? "repo:/ca_ppm/resources/images/stoplightYellow" :
    $F{C_SCHEDULE_STATUS}.intValue() ==3 ? "repo:/ca_ppm/resources/images/stoplightRed" :
    "repo:/ca_ppm/resources/images/stoplightWhite"]]></imageExpression>
    </image>