Jump to content
We've recently updated our Privacy Statement, available here ×

how set lineColor to a box?


aihtnyc

Recommended Posts

Hi! I´m trying to set lineColor, to a frame , dynamically.

I know I´ve to set the <propertyExpression name="net.sf.jasperreports.style.box...><![CDATA[$F{my_field}]]></propertyExpression>, but I´ve tried with all propertyExpression possible.

How can I do it?

This is my frame code:

<frame>
 <reportElement mode="Opaque" x="0" y="0" width="520" height="20" uuid="ad07ad42-3f35-4be6-a6d1-96a04dd115e7">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<propertyExpression name="net.sf.jasperreports.style.box.pen.lineColor"><![CDATA[$F{my_field}]]></propertyExpression>
<propertyExpression name="net.sf.jasperreports.style.backcolor"><![CDATA[$F{field_one}]]></propertyExpression>
</reportElement>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
</frame>
 
Thanks!
Link to comment
Share on other sites

  • 4 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...