Development notes, tips and tricks for Oracle's HTML DB

Monday, July 12, 2004

Highlight rows in report based on column values.

You will have to create a report template for this one.
Let's say you have a report based on "SELECT * FROM emp" and you want to highlight the rows where the salary is greater than 2000.
Create a report template (i usually just copy an existing one and modify it.)
For Row Template 1, specify the look for your highlighted row: <td bgcolor="yellow" #ALIGNMENT#><b>#COLUMN_VALUE#</b></td>
Here i made the background yellow and also made the text bold.
In Row Template 1 Expression enter the PL/SQL expression that determines the condition for using row template 1:
#SAL# > 2000
(Note that column substitution variables are enclosed by '#' -- see side bar on the right side of report template wizard.)
Now, in Row Template 2 specify the look for your un-highlighted rows (i just left out the bgcolor and bold tags):
<td #ALIGNMENT#>#COLUMN_VALUE#</td>
Now enter the condition for displaying the second template:
#SAL# <= 2000.

In your report page, navigate to the Report Attributes tab and select your newly created report template in the 'Layout and Pagination' section.

That's it.

1 Comments:

Anonymous Anonymous said...

Bfonln [url=http://hermeskelly.finniwolf.com][b]hermes bags for sale[/b][/url] hermes trim bag http://hermeskelly.finniwolf.com Pxetot Ltttbr hermes handbags

11:30 PM

 

Post a Comment

<< Home