It's all about the answers!

Ask a question

BIRT report shows HTML tags in the WI summary


Sridhar Kuna (1602117) | asked Nov 09 '10, 7:32 a.m.
I have a report developed which displays the HTML tags in the Work Item Summary area.

If the work item summary contains 'The "sample.pdf" file' then my report displays the work item summary as 'The "sample.pdf"&nbsp' which looks odd in display text.

It adds html tags for quotes and spaces etc..

But my equivalent query returns normal text as expected. I would like my report also display the normal text. How can i change it?

9 answers



permanent link
Scott Sherwood (5624) | answered Mar 26 '13, 4:41 p.m.
We also get html tags and & showing up in our raw data.  This happens mostly when people copy paste from Excel or Word into a string or html field.  Description is a common built in attribute, but we also have many custom Attributes of type String or HTML.  What we have done is used Dynamic Text.   This defaults to a Content Type of HTML.  Then we bind the data set and subsequent value to the Dynamic Text.  The advantage of this technique is that the data renders in the report exactly like it does in the browser UI.

Comments
Alex Fitzpatrick commented May 21 '13, 3:27 p.m.
JAZZ DEVELOPER

 This is the right way to do it. We had the same questions, and solutions, when we added support for HTML comments in UML models with RSA.


permanent link
Rafik Jaouani (5.0k16) | answered Nov 10 '10, 11:25 a.m.
JAZZ DEVELOPER
Which table is your report using?

permanent link
Sridhar Kuna (1602117) | answered Nov 10 '10, 11:51 a.m.
Which table is your report using?


I am using "com.ibm.team.workitem.WorkItem" and "com.ibm.team.workitem.Category" tables under LIVE_SNAPSHOT.

permanent link
Rafik Jaouani (5.0k16) | answered Nov 10 '10, 1:54 p.m.
JAZZ DEVELOPER
LIVE_SNAPSHOT exposes the raw repository data. So you are getting the data as it is stored in the DB.

permanent link
Sridhar Kuna (1602117) | answered Nov 11 '10, 5:45 a.m.
Thanks Rafik. Actually most of my reports uses LIVE_SNAPSHOT only. So, Is there any workaround or any thoughts to eliminate these tags while displaying report result?

permanent link
Rafik Jaouani (5.0k16) | answered Nov 11 '10, 11:32 a.m.
JAZZ DEVELOPER
Add a computed column to your data set that is defined using the following expression:

(new java.lang.String(row)).replaceAll("<*>", "");

The above should remove all the HTML tags.

permanent link
Sridhar Kuna (1602117) | answered Nov 12 '10, 4:46 a.m.
Thanks Rafik. I will check it.

By the way, will it impact performance of the report since it will validate all the rows one by one before display?

permanent link
Rafik Jaouani (5.0k16) | answered Nov 12 '10, 11:32 p.m.
JAZZ DEVELOPER
It may impact performance, if you are displaying a lot of summaries. But my instincts tell me not by very much.

permanent link
Sridhar Kuna (1602117) | answered Nov 14 '10, 10:19 p.m.
Thanks a lot Rafik

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.