Alternate row hightlighting
Options
Hi there,
I posted this in the designing BIRT reports forum a few days ago but did not get an answer, then I realised there was a more appropriate forum for it ;-)
I've applied some row highlighting rule on a table in my report design, which works fine in the preview within Eclipse.
row["__rownum"] % 2 equal to 0
However, this does not seem to be applied when I run the report using my own servlet.
Is there something I need to do to get the highlighting rule executed or is this possibly a bug?
I've attached the code for my servlet below.
Kind regards,
Cedric
I posted this in the designing BIRT reports forum a few days ago but did not get an answer, then I realised there was a more appropriate forum for it ;-)
I've applied some row highlighting rule on a table in my report design, which works fine in the preview within Eclipse.
row["__rownum"] % 2 equal to 0
However, this does not seem to be applied when I run the report using my own servlet.
Is there something I need to do to get the highlighting rule executed or is this possibly a bug?
I've attached the code for my servlet below.
Kind regards,
Cedric
0
Comments
-
Hi Cedric,
Is the highlighting depending on a CSS file? If so, you could try "Importing" the stylesheet versus "Using" the stylesheet. You may also need to set the resource path for the CSS file using something like:
config.setResourcePath(sc.getRealPath("/WEB-INF/styles"))
I don't think the syntax is the problem, but there are two ways to get the row number, and the other way is like below:
row.__rownum % 2 equal to 0
Hope this helps.Warning No formatter is installed for the format ipb0 -
Hi Virgil,
thanks for the response. I'll give that a try later.
What I found confusing is that I'm actually using a library, which redefines the default theme to use a specific stylesheet. I "use the library" in the report design and the theme is displayed in the outline, with the associated stylesheet. So I don't really understand why I would need to "use the stylesheet" or indeed import it.
But then again, the styles defined were not standard Birt styles, like .table-footer or .table-header so maybe this had something to do with it at runtime.
Regards,
Cedric0 -
Even if you are referencing the style in a library there are 2 different ways to do it. If you "import" a stylesheet, then all the styles become BIRT styles and are defined directly in the XML rptdesign file. However, if you "use" a stylesheet, then that CSS file remains external and it must be made available at the Resource path defined by the BIRT engine. Only a reference to the style name is actually saved in the XML rptdesign file. This is done this way so you can change the CSS file and have the report automatically use the new style.Warning No formatter is installed for the format ipb0
Categories
- All Categories
- 109 Developer Announcements
- 49 Articles
- 100 General Questions
- 122 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 122 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management