dynamically changing the column values color [message #286552] |
Sat, 08 December 2007 03:42 |
udaytapal
Messages: 6 Registered: December 2007 Location: Navi Mumbai
|
Junior Member |
|
|
Hi All,
Right now i am doing R&D on Oracle Application Express. In that i am generating Report using SQL Query.
My question is for a particular column values, i want to set different color based on the value i get.
for example:
if the column value is < 0 then i want to display the value in 'red' color else if the column value is > 100 and < 500 i want to set/display the value in 'blue' color else the column value should be displayed in 'green'. how can i achieve this
I am able to set the color for entire column to given color
In Report Attributes Tab--> Column Attributes --> Column Formatting --> HTML Expression = <font color='blue'>#myColumn#</font>
Thanks in advance.
Regards
Uday
[Updated on: Sat, 08 December 2007 03:43] Report message to a moderator
|
|
|
|
Re: dynamically changing the column values color [message #286566 is a reply to message #286563] |
Sat, 08 December 2007 05:15 |
udaytapal
Messages: 6 Registered: December 2007 Location: Navi Mumbai
|
Junior Member |
|
|
Hi Patrik,
Thanks for your valuable reply. I got the solution what i was looking from few days. but as i am new to ORACLE Application Express, i just want to know where to write the query. Bit confused i hope it should be written in Region Definition > Source
if yes ,then there i have already written a query to return values. for your reference i am just pasting bit of query below which i have written for thatcolumn and tell me if anything need to change in that else i want to write the query somewhere else ? waiting for your valuable reply
[CODE]
(Sum(decodeyr(Trunc(date03),:p2_year, nvl(qty02,0)+ nvl(qty05,0)) )/
Decode(Sum(decodeyr(Trunc(date03),:p2_year,Nvl(qty01,0))),0,1,Sum(decodeyr(Trunc(date03),'2007', Nvl(qty01,0)))) ) * 100 "rate",
[CODE]
Regards
Uday
|
|
|
|
|
Re: dynamically changing the column values color [message #308217 is a reply to message #286668] |
Sat, 22 March 2008 07:41 |
udaytapal
Messages: 6 Registered: December 2007 Location: Navi Mumbai
|
Junior Member |
|
|
Hi I am Uday.
I have one requirement in Oracle Application Express. In that i am generating Report using SQL Query.
For example:
I am generating one report based on EMP table.EMP table has SAL column. If the SAL column value is < 1000 then my report is displaying the SAL column value in 'red' color else if the SAL column value is > 1000 report is displaying the value in 'green' color.And this report has "Export to Excel" option.
Now my question is,When i am clicking on "Export to Excel" i am getting EMP table data into excel sheet. But i am not getting the colors into that excel sheet. When i click on "Export to Excel" i want to show that SAL column values with colors based on that given condition in exel sheet also. How can i achieve this.Can we maintain the color and formatting when we export the report data into excel.
Thanks in advance.
Regards
Uday
|
|
|
|
|