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

alternate row coloring html...i know its discussed


findashwin

Recommended Posts

Ok. If I use printwhenexpression functionality, I can get alternate row coloring to work. No Problem there. But that is not the solution to export in html. So after doing some looking around, I have decided to use styles & conditional styles. For some reason, I see no coloring in either pdf or html? Code snippet here....

 

style declaration in begining of jrxml

-------------------------------------------

<style name="row_style" isDefault="false" ackcolor="#00FF00">

<conditionalStyle>

<conditionExpression><![CDATA[boolean.valueOf( $V{PAGE_COUNT}.intValue() % 2 == 1 )]]> </conditionExpression>

<style isDefault="false" backcolor="#FFFF00"/>

</conditionalStyle>

</style>

 

-----------------------------------------

place where its referenced is as follows

 

<textField isStretchWithOverflow="true" >

<reportElement style="row_style" x="0" y="0" width="150" height="15"/>

<box>

<pen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>

</box>

<textElement>

<font size="10"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{COLUMN_1}]]></textFieldExpression>

</textField>

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I have a more basic problem. The background color that I am setting on JRDesigntextfield doesnt show up in pdf or html. I am doing this programmatically. Is there anything else that I need to do?

 

 

this is the textfield is declared.

 

<textField isStretchWithOverflow="true">

<reportElement x="0" y="0" width="150" height="15" backcolor="#00FF00"/>

<box>

<pen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>

</box>

<textElement>

<font size="10"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{COLUMN_1}]]></textFieldExpression>

</textField>

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