Reputation: 65
From Oracle DB, I'm fetching records and displaying it in Interactive report. In that I want to highlight specific text.
For example, "Here is the Mango" is the value retrieved from DB, I want to highlight the text "Mango" alone. I dont want to highlight the whole text.
The column value "Here is the " is same for all records. Only the next part needs to be highlighted/Formatted
Upvotes: 2
Views: 8911
Reputation: 697
HTML Expression is good approach in your case since "Here is the " text is same for all records and you want to highlight remaining part.
Enter this in your column formatting,
Here is the #COLUMN_NAME#
Screenshot
Upvotes: 2
Reputation: 5170
One way to do it, is by doing conditional styling in your report. Below is emp table, where when the job title is president
, the text is highlighted in bold.
I achieved this as follows:
Add condition html to your query:
select EMPNO,
ENAME,
CASE WHEN UPPER(JOB) = 'PRESIDENT' THEN '<span>This is a <b>'||JOB||'</b></span>' ELSE JOB END JOB,
MGR,
HIREDATE,
SAL,
COMM,
DEPTNO
from EMP
Plain Text
, and set the option Escape special characters
to NO
. If you are on previous edition, specifically using the component view, then you can set the column type to Standard Report Column
Upvotes: 2