Assign a variable value to the backcolor tag

Is it possible to assign a parameter value or a field value to the "backcolor" tag?

I don't want to set a static color to my conditional style, but I receive the color from Java/database (I can pass it to the report as parameter or as field).

Like this (see backcolor tag):


        <conditionalStyle>
            <conditionExpression><![CDATA[$P{valutazioneLibretto}.equals("CRITICA")]]></conditionExpression>
            <style mode="Opaque" backcolor=$F{myDTO}.getColor1()/>
        </conditionalStyle>
 

Instead of: <style mode="Opaque" backcolor="FF00FF"/>

andrey87's picture
Joined: Jan 28 2017 - 12:52am
Last seen: 1 month 4 weeks ago

0 Answers:

No answers yet
Feedback
randomness