The attached sample uses a Regular Expression to parse a text field and update the formatting for a specific string. The string in this case is a user-supplied parameter. <br />
<br />
The report features a single table with three columns. The first two columns use Data Items to get the values displayed. The third column (description) uses a Text Item. The Text Item is built using an expression. The expression is the application of a RegEx agains the Product description field.
regExp = new RegExp (params["pHLText"].value, "gi");
row["PRODUCTDESCRIPTION"].replace(regExp, "<span style="font-family:courier new; color:red; font-size:20px">" + params["pHLText"].value + "</span>");
<br />
The above expression will take the Keyword supplied in the "pHLText" parameter and turn it to a span with Red text in Courier and a size of 20. The supplied parameter need not only be a term. It can be any valid string that can be evaluated by a RegEx engine.<br />
<br />
View Live Example<br />
<br />
The sample is built on BIRT 2.3.2 and uses Classic Models data. No external dependencies.<br />
<br />
Enjoy!