[#5224] - verticalAlignment ignored with isStyledText=yes?

Bug report
Project: Severity:
Component: Reproducibility:
Assigned to:

When I use different fonts for labels and associated text (e.g., Times-Roman for the label's PDF Font, and Courier for the text value), the printed data is not aligned vertically. To address this, where the Times-Roman static label is top aligned, I have to make the Courier text value verticalAlignment="Middle" for them to match.

But I have run into a situation where I cannot rectify the vertical alignment. With our web app, we make use of a text editor called tinyMCE for entry of certain parameters which will be printed on the JasperReport. It adds tags such as "p" and "b" (within angle brackets, of course -- see "Text Field Expression" code below). I have to convert the text in a variable so that it can be processed properly by Jasper, using styled text.

However, once I specify styled text, Jasper appears to ignore the vertical alignment of "Middle" that I had specified, and it reverts to "Top" alignment. Our purchased software has JasperReports 2.0.5 embedded in it.

(When running the report from iReport 2.0.5, use of styled text doesn't undo my vertical alignment specification!)

Anyway, I figured that I could add a style tag in the "Text Field Expression" specifying vertical alignment of "Middle". However, specification of vertical alignment with the style tag is not having any effect.

The version of the Jasper engine embedded in our purchased web application is 2.05, so we may be somewhat constrained in our options. I haven't installed the latest community JasperServer version, else I would test compiling my subreport in iReport 4 and see whether running it from the latest JasperServer have fixed the alignment issue.

But perhaps you can know whether this would still be an issue in the current version. I can live with it in the older version, but it would be nice for it to work properly going forward.


PlexPro's picture
Joined: May 11 2008 - 11:34pm
Last seen: 3 years 2 months ago