Jump to content
JasperReports Library 7.0 is now available ×

conditional borders


Rianur

Recommended Posts

Hi,

I understand, from reading previous posts, that styles - including conditional styles - only over-ride default attributes. I have a conditional style that sets the font to bold and adds a top border:

 

Code:
<style name="groupingStyle" isDefault="false" fontSize="6">
<conditionalStyle>
<conditionExpression><![CDATA[$F{summary}]]></conditionExpression>
<style name="groupingStyle" isDefault="false" topBorder="Thin" topBorderColor="#000000" fontSize="6" isBold="true"/>
</conditionalStyle>
</style>

 

The condition will set the font to bold, but the top border is not added. I can not, through iReport (versions 1.3 or 2), set the border attributes of the text box to be 'Default', ie. there is no place to click a 'reset to default' button that I can see. Therefore the border is not added to the box through the conditional style.

 

Code:
[code]<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self">
<reportElement style="groupingStyle" x="164" y="0" width="26" height="10" key="textField"/>
<box topBorder="None" topBorderColor="#000000" topPadding="1" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" rightPadding="1" bottomBorder="None" bottomBorderColor="#000000"/>

 

I can remove the topBorder and topBorderColor in the xml file, but iReport will re-add them when ever I open the properties of this box.

 

Is there something that I am missing in terms of setting the border with a conditional style? It is not working for me.

Thanks.

Post edited by: Rianur, at: 2007/06/26 18:20

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

I have yet to find a solution to this issue. I am trying to work on a work-around. Can someone please confirm that styles - including conditional styles - only over-ride 'default' properties (borders, font sizes, etc.)

Thanks for your time.

Post edited by: Rianur, at: 2007/06/26 18:43

Link to comment
Share on other sites

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...