Jump to content

Alternate row colors for html reports


mvkmahi

Recommended Posts

Hi All,

I have a question a couple of questions.

 

1) How to generate alternate row colors for html reports. I used the method suggested on the form using $V{REPORT_COUNT} and it works fine for pdf reports. But when exported to html, the alternate row colors won't show up. How to get alternate row colors working in html.

 

2) When I export to html, the alignment is different. For example if my pdf report has 3 pages with 2 rows on each page as follows

 

page 1 page 2 page 3

1 2 3 4 5 6 7 8 9

1 2 3 4 5 6 7 8 9

 

When I export to html report, everything show up on one page, but the alignment is different as shown. The alignment is different for each page exported from pdf. Can somebody please tell me if there's a way to set some parameter to get alignment correct.

 

1 2 3

1 2 3

4 5 6

4 5 6

7 8 9

7 8 9

 

Thanks,

Link to comment
Share on other sites

  • 2 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Use styles, assign the styles to all the items in the row and conjoin the sides of the column items. Assign the style to all the items in the row and set the items in the row to use styled text. Here is a sample of the style that works for me and for HTML output.

 

Code:

<conditionalStyle>
<conditionExpression><![CDATA[new Boolean( $V{REPORT_COUNT}.intValue() % 2 ==0 )]]></conditionExpression>
<style
name="alternating"
isDefault="false"
mode="Opaque"
forecolor="#000000"
backcolor="#CCCCCC"
fill="Solid"
border="Thin"
borderColor="#CCCCCC"
isStyledText="true"
/>
</conditionalStyle>

 

Works for me with v1.3.3..

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