Menu

#39 JRTX styles aren't used

open
5
2012-12-07
2009-10-19
No

Caused by issue 2747641 .

In DJ 3.0.10, I 've got:

dynamicReportBuilder.setTemplateFile("be/ggg/myJrxml.jrxml");

And myJrxml.jrxml has these lines:

<template
class="java.net.URL">getClass().getResource("/be/ggg/myStyles.jrtx")</templ
ate>
...

<pageFooter>
<band height="20">
<line>
<reportElement style="pageFooterLine" x="0" y="0" width="540" height="0" />

</line>
...
</band>
</pageFooter>

And myStyles.jrtx has these lines:

<style name="pageFooterLine">
<pen lineStyle="Solid" lineWidth="0.1"/>
</style>

It doesn't crash, but it doesn't use that style either. Everything is printed in a default style.
Before the fix for issue 2747641 it was relatively better: if a style doesn't exist, it should fail fast.

Solution:
If a specified style exists in the jrtx, it should use it. (Currently it doesn't)
If a specified style doesn't exist in the jrtx, it should fail fast.

Discussion


Log in to post a comment.