You are here
Is it possible to import styled html in report
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
Post edited by: landin, at: 2008/04/24 20:03
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
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/>):
<sup><sup></sup> and <sub><sub></sub>
A bulleted list:
<li>item 1 <li></li>
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.
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 block
The isPdfEmbedded tag is leftover from experimenting with this value. Either way, i still get instead of bold text and
tags for new lines.
<textfield hyperlinktype="None" isstretchwithoverflow="true"> <reportelement height="18" isprintwhendetailoverflows="true" positiontype="Float" stretchtype="RelativeToBandHeight" width="552" x="2" y="0"></reportelement> <textelement></textelement> <textfieldexpression class="java.lang.String"> <!--[CDATA[$FeventInfo]]--> </textfieldexpression></textfield>
TIBCO Software Inc.
All rights reserved.
- User Groups
- Contribute to our Wiki
- Request a Feature
- Report a Bug
- Share your Extension
- JasperReports Server
- JasperReports Library
- Jaspersoft ETL
- Jaspersoft Studio
- Contact Us