landin Posted April 25, 2008 Share Posted April 25, 2008 Hi I'm building a report that retrieves html data from Database, the report is filled succesfully, but there are a lot of html tags that can not be rendered properly. I followed example for markup=html, but i want to know if this feature is possible or what kind of constraints or tags are not supported when an embedded html data is being attached to a jasper report? There is an attached html sample that I'm using Regards Post edited by: landin, at: 2008/04/24 20:03 Link to comment Share on other sites More sharing options...
landin Posted April 25, 2008 Author Share Posted April 25, 2008 I had problems to attach the html, here is a zipped version of this file [file name=sample-f9bfc0a4f85f5399bee3e8b64d983d28.zip size=9725] Post edited by: landin, at: 2008/04/24 20:20 Link to comment Share on other sites More sharing options...
lshannon Posted April 25, 2008 Share Posted April 25, 2008 I am not sure I understand what you are trying to do. However the only time I have used HTML in a JasperReport I have used it in a static text field with the "Is Styled Text" flag set. In the sample reports that ship with JR I found a report that lists the supported tags. This is as of 2.0.1, not sure if the list of tags has increased:<font size="12"><font size="12"></font><font color="red"><font color="red"></font><font face="Comic Sans MS"><font face="Comic Sans MS"></font><b>bold <b></b> <i>italic <i></i> <u>underlined <u></u>an empty line follows (<br/>):<br/><sup><sup></sup> and <sub><sub></sub><br/>A bulleted list:<li>item 1 <li></li> Link to comment Share on other sites More sharing options...
Teodor Danciu Posted April 25, 2008 Share Posted April 25, 2008 Hi, A text field with HTML markup will render only formatted characters. All tags that represent layout will not work. So it is only about font, color, font style, or anything else that has to do with formatted text. But nothing such as tables or divs or whatever that represent layout will work.You should understand that we are talking about a "text field" displaying styled text, not about a HTML browser component that allows you to embed complex HTML into the report. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
RandyAvis Posted March 10, 2009 Share Posted March 10, 2009 I'm using version 3.1.3 and cannot find the proper setting to display tags properly. We have a large text field where users will enter paragraphs of text. They would also like to do bold, underline, etc.For instance a sample follows: This is paragraph one. It is quite short.This is paragraph two. it is much longer and will wrap if the display box is long enough. This is just more more more more more stuff to make it break lines on my browser. this next part is bold I'm sure you get the idea. When I display this as a text field, i get a tag displaying between the first and second paragraphs and the bold tags just show as text. I saw some references to a 'styled text' attribute in postings from a few years ago, but i don't see anything like that now. How do i make this work? the field definition is below in the code blockThe isPdfEmbedded tag is leftover from experimenting with this value. Either way, i still get instead of bold text and tags for new lines. Code: Link to comment Share on other sites More sharing options...
iscribble Posted April 15, 2009 Share Posted April 15, 2009 RandyAvis, I'm not sure if you have solved this issue yet, but it appears that you have not included markup="html" in your textElement definition. 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