Jump to content
We've recently updated our Privacy Statement, available here ×

HTML in Text Field


s.ferraz

Recommended Posts

Good morning,

I have a rich text editor in my system that writes the data as HTML in the database.

However, when I read this data on jaspersoft and insert it in the text field with markup html, it's really unformatted.

In this site forum, I read that jasper only accepts a few html tags.

Considering it, How can I convert this data to accept it in Jasper without losing formatting?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

As far as I know Jasper still doesn't support full html source/tags within textfields. Just the simple ones like for example <b> <i> <u> <font> <sup> are supported. It's quite difficult to implement a (inner) content changing layout within a simple textfield that is part of a JasperReport (outer) design as well. So imagine a <table> within a textfield that is part of a table component in Jasper also?!? 

So I guess that's why there won't be any FULL html support in JasperReports.

There was a HTML Component (look into the tracker for former discussions with Teodor) that actually should do that, but this isn't working as expected.

So the only way I know is to render the content with e.g. the JEditorPane or any other "html2image" component to an image object and print that in your reports.... but then you have to live with the limitations of scaling, resolution and breaking pages. So a very ugly solution.

Sorry but perhaps anyone knows it better!??!

regards

C-Box

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...