Thursday, May 22, 2008

Embed HTML

So this is a really simple problem that Jason solved for me. If you have HTML in your database and you want to embed it into your report as HTML you need to do a few things. First start with a Text control.

1) Change the top drop-down to HTML

2) Change the second drop-down to Dynamic Text

3) Click on the tag and use the expression builder to select the appropriate field.

4) Manually insert the attribute format="HTML" into the VALUE-OF entity

If you follow these steps your HTML text will show up in your report document as formatted text that obeys the HTML rules.


Anonymous said...

Is it possible to use a css stylesheet on embedded HTML? Inline styles seem to work but trying to add an external file or even internal CSS declarations did not.

Scott Rosenbaum said...

are you talking about embedding html that references the CSS or are you referring to using a CSS that has BIRT styles in it.

You can definitely attach external style sheets from the outline view.

Anonymous said...

Is supported bold option in word reports? How can I add this option?

Jason Weathersby said...

yes Bold works in the word emitter. Just put it a style.

Anonymous said...

Actually, bold option works, but if you add <b> tag in the start of the text like:


It doesn't run.
I have also problems with the whitespace added before the tags, like:

test <b>test</b>

Whitespace in that case is removed, like:


Is a problem with the version? I'm using birt 2.2.1

Jason Weathersby said...

Can you log a bug for this? As a work around try to use BIRT styles which should show in the word output fine.

Ben said...
This comment has been removed by a blog administrator.
James said...
This comment has been removed by a blog administrator.
Paul said...
This comment has been removed by a blog administrator.
Scott Rosenbaum said...

Ben, James, Paul,

I have removed your comments since they seemed to be nothing more than attempts to juice your google ratings by adding links to other sites.

If you have questions about BIRT, please feel free to re-post without the links. Please also add more detail about the questions.

A better place to get questions answered is either the
BIRT-Exchange Forums
Eclipse BIRT Forums