Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

BIRT report shows HTML tags in the WI summary

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?

1 vote



9 answers

Permanent link
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.

3 votes

Comments

 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
Which table is your report using?

0 votes


Permanent link
Which table is your report using?


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

0 votes


Permanent link
LIVE_SNAPSHOT exposes the raw repository data. So you are getting the data as it is stored in the DB.

0 votes


Permanent link
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?

0 votes


Permanent link
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.

0 votes


Permanent link
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?

0 votes


Permanent link
It may impact performance, if you are displaying a lot of summaries. But my instincts tell me not by very much.

0 votes


Permanent link
Thanks a lot Rafik

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Nov 09 '10, 7:32 a.m.

Question was seen: 10,366 times

Last updated: May 21 '13, 3:27 p.m.

Confirmation Cancel Confirm