martynhiemstra Posted January 19, 2009 Share Posted January 19, 2009 Hi All,I would like to inform if there is maybe a bug in the textElement tag. If I set isStyledText to true like this: <textElement isStyledText="true" lineSpacing="Single"> <font fontName="Courier New" size="10" pdfEncoding ="Cp1250" isStrikeThrough="false" /></textElement>I then set the text to something like this:<style isUnderlined='true'>TEXT</style>When I view the report in the jasperviewer or print the report I see this in the textField.<style isUnderlined='true'>TEXT</style>Somehow the style tag isn't parsed. I have set isStyledText="true", I have tried different encodings. Even set the encoding to html and tried to print html but nothing is working. The tags are NOT getting parsed. I am using jasperreports 3.0.0Any help would be appreciated.Thanks in advance,Martyn Link to comment Share on other sites More sharing options...
martynhiemstra Posted January 19, 2009 Author Share Posted January 19, 2009 I found the bug. If your CDATA has the character & (operand) in it then style tags aren't parsed. I replaced all instances of & with & and now it works. This bug has been in jasperreports for over 2 years. I finally know why it only happened every now and then. Link to comment Share on other sites More sharing options...
Teodor Danciu Posted January 21, 2009 Share Posted January 21, 2009 Hi, You would have not considered this a bug if you would have looked at the /demo/samples/styledtext sample that we provide with the JasperReports project distribution for years now.Thanks,Teodor Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now