Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Highlight "parameter value" in the data cell value text
aparandekar
Hi,
Is it possible to highlight part of the text in a data cell value?
I have a parameter wherein the user enters a search word. The report queries the database and returns the results in a table. I can highlight the entire data cell text that matches the parameter value but I would like to highlight just the search word.
For example if the parameter value is 'machine' and the result returned from the database is 'Planting machines, agricultural' - I would like to highlight just the word machine in the cell value and not the entire value. How can I accomplish this?
Thanks.
Find more posts tagged with
Comments
mwilliams
You could use a dynamic text box to build your data value and insert <b></b> around your parameter text in the string, if it exists. Let me know your BIRT version, if you'd like an example.
aparandekar
Thanks for the suggestion. An example will save me tons of time. BIRT version is 3.7.2 and Actuate BIRT Designer is 11.0.4
--Alka
mwilliams
Take a look at this example.
aparandekar
Thanks for the example. Since the parameter value can also be a phrase (for eg. 'machine tools' or 'grinding machines')I wrote a JavaScript function which uses a RegExp object, finds the indices of the matched parameter text and then use the <span> tag to make the text/phrase red in color. It works well.
Thanks again. I appreciate your prompt replies.
-Alka
mwilliams
You're welcome. Always glad to help, when I can!
Let us know whenever you have questions!