Change color of data in a column
Hello experts,
i am trying to change the color of data being displayed in a column based on the condition that it the value is 0 then it should be in red
i have tried the following but it does not work.
when-validate-item trigger on data block level
if forecast_cnt = 0 then
SET_ITEM_PROPERTY('FORECAST_CNT',foreground_color,'R255g0b0');
end if;Am i doing something wrong?
Hello,
Might be the value you are checking is having null. How about trying like this?
if NVL(:forecast_cnt,0) = 0 then
SET_ITEM_PROPERTY('FORECAST_CNT',foreground_color,'R255g0b0');
else
SET_ITEM_PROPERTY('FORECAST_CNT',foreground_color,'R0g0b0');
end if;-Ammad
Similar Messages
-
View Panel : Change color of data values in channel table
Hi,
Is there a way wherein I can change the color of a particular data value or data block in a channel in the VIEW panel and can this be done programtically? I am using DIAdem 2010.
Looking forward for your response
Thanks in advance
PriyaHi Pria,
There is no way to change the color of various cells in a VIEW table. This can be done (for the text color, not the cell background) in a REPORT table with the help of a customer-defined UserCommand. I can send you an example of this if having the display in REPORT would help.
If you had a newer version of DIAdem, you could embed a SUDialog in a VIEW area, and this SUDialog could have an XTable control that would enable you to show this type of display-- not easy, and not with DIAdem 10.2, but at least something to consider.
Brad Turpin
DIAdem Product Support Engineer
National Instruments -
Changing color of report result in column
I've seen a number of examples in these forums to use a CASE statement to return the result from a select into a CSS mark up structure to change the display attributes of the result depending on a particular condition.
I've not seen a way to make it work when assigning the CASE statement to a plsql VARCHAR2. Any suggestions on how to fix this (I think it's issues with quoting)? The APEX error I get is; +"Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. "+
The problem only occurs with the CASE structure in place. If replaced with i.QUANTITY_AVAILABLE (to just get the value), it works just fine.
Here is the code.
declare
l_query varchar2(4000) := '';
begin
l_query := '
select i.INVENTORY_ID,
io.ORDER_QUANTITY,
CASE
WHEN i.QUANTITY_AVAILABLE=0
THEN ''<span style="color:red;"> ''|| i.QUANTITY_AVAILABLE ||''</span>''
ELSE i.QUANTITY_AVAILABLE
END,
i.QUANTITY_AVAILABLE qty_avail_hold,
i.STRAIN_CODE,
i.STRAIN_NAME,
i.GENOTYPE,
i.AGE,
i.SEX,
(lower(substr(i.ROOM_NUMBER,1,instr(i.ROOM_NUMBER,''-'',1,1)-1))) ROOM_NUMBER
from SM_INVENTORY i,
SM_INVENTORY_ORDER io
where io.ORDER_ID (+)= :F111_MODIFYING_ORDER
and io.INVENTORY_ID (+)= i.INVENTORY_ID';
return l_query;
end;Many Thanks!
Paul
Edited by: pgtaviator on Nov 3, 2009 10:24 AM
Edited by: pgtaviator on Nov 3, 2009 10:24 AMHi,
Try
declare
l_query varchar2(4000) := '';
begin
l_query := '
select i.INVENTORY_ID,
io.ORDER_QUANTITY,
CASE
WHEN i.QUANTITY_AVAILABLE=0
THEN ''<span style="color:red;"> ''|| i.QUANTITY_AVAILABLE ||''</span>''
ELSE TO_CHAR(i.QUANTITY_AVAILABLE)
END,
i.QUANTITY_AVAILABLE qty_avail_hold,
i.STRAIN_CODE,
i.STRAIN_NAME,
i.GENOTYPE,
i.AGE,
i.***,
(lower(substr(i.ROOM_NUMBER,1,instr(i.ROOM_NUMBER,''-'',1,1)-1))) ROOM_NUMBER
from SM_INVENTORY i,
SM_INVENTORY_ORDER io
where io.ORDER_ID (+)= :F111_MODIFYING_ORDER
and io.INVENTORY_ID (+)= i.INVENTORY_ID';
return l_query;
end; -
Change Color of Dates in Calendar
This is a follow-up question to the following thread: http://discussions.apple.com/thread.jspa?threadID=1175451&tstart=208
The original question from that thread was never answered and I was having the same problem.
Some of the big number dates in my calendar are red and some are black (those with events are red), but I want all of the numbered dates in the calendar to be the same color. In iPhoto06 I was able to fix this by making the font color red for all of the dates, but I cannot figure out how to do the same in iPhoto08. How do I fix this? Thanks
Message was edited by: Apples&OrangesI asked this question in my local Apple store and was told that I would have to start my calender again without importing events. Not the answer I wanted!
-
Changing color for data in sql developer
I have recently seen some one have modified the setting in SQL developer to show certain color for the cells that have null values. Couldn't find where to set that property. Does anyone know how to default a color for a cell with null values in SQL developer?
-appGo to Tools|Preferences|Database|Advanced. There is an option to set the null value background color.
Ashley
SQL Developer Team -
How to change colors of individual column bar in the same data series
in mac numbers, how to change colors of individual column bar in the same data series. The entire column series gets selected in the column bars and cannot select to change colors of specifc bars.
Hi Kiran,
no its not possible through Theme editor also ,because these colors are coming from Compiler which u are using.
Regards,
Govindu -
I need help highlighting cells on my Numbers '09 spreadsheet. I want the cell text/fill to change color when the date is 180 days or less from the current date. I already have a cell with the current date in it. I also know how to change the fill/text colors. All the cells have been formatted to show date only. I am having trouble with the formula. I can get to the Conditional Formatting menu and select "With Dates" but after that I am lost. Can anyone help?
Thank you for any assistance.
BSet a Conditional Format rule as shown in the illustration below. The rule has been applied to all dates in column B of the table.
Regards,
Barry -
how do change color of a column in ALV.
Hi
The below abap program shows how to change the colour of individual ALV cells /fields. Only a small number of changes are required from a basic ALV grid which include adding a new field to ALV data declaration table(it_ekko), populating this field with the field name identifier and colour attributes and finally adding an entry to layout control work area. These changes are highlighted in bold below.
REPORT zdemo_alvgrid .
REPORT ZALV_CELLCOLOR.
TABLES: ekko.
type-pools: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
CELLCOLOR TYPE LVC_T_SCOL,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid,
gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform set_cell_colours.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
form build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but can
also allow you more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such as
total. You may need to provide more information than if you were
simply displaying the result
I.e. Field type may be required in-order for
the 'TOTAL' function to work.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-do_sum = 'X'.
fieldcatalog-datatype = 'CURR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
gd_LAYOUT-coltab_fieldname = 'CELLCOLOR'. "CTAB_FNAME
endform. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
is_variant = z_template
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
from ekpo
into CORRESPONDING FIELDS OF TABLE it_ekko.
endform. " DATA_RETRIEVAL
Form TOP-OF-PAGE *
ALV Report Header *
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
endform. "top-of-page
*& Form SET_CELL_COLOURS
Set colour of individual ALV cell, field
FORM SET_CELL_COLOURS .
DATA: WA_CELLCOLOR TYPE LVC_S_SCOL.
DATA: ld_index TYPE SY-TABIX.
LOOP AT IT_EKKO into wa_ekko.
LD_INDEX = SY-TABIX.
Set colour of EBELN field to various colors based on sy-tabix value
WA_CELLCOLOR-FNAME = 'EBELN'.
WA_CELLCOLOR-COLOR-COL = sy-tabix. "color code 1-7, if outside rage defaults to 7
WA_CELLCOLOR-COLOR-INT = '1'. "1 = Intensified on, 0 = Intensified off
WA_CELLCOLOR-COLOR-INV = '0'. "1 = text colour, 0 = background colour
APPEND WA_CELLCOLOR TO wa_ekko-CELLCOLOR.
MODIFY it_ekko from wa_ekko INDEX ld_index TRANSPORTING CELLCOLOR.
Set colour of NETPR field to color 4 if gt 0
if wa_ekko-netpr gt 0.
WA_CELLCOLOR-FNAME = 'NETPR'.
WA_CELLCOLOR-COLOR-COL = 4. "color code 1-7, if outside rage defaults to 7
WA_CELLCOLOR-COLOR-INT = '0'. "1 = Intensified on, 0 = Intensified off
WA_CELLCOLOR-COLOR-INV = '0'. "1 = text colour, 0 = background colour
APPEND WA_CELLCOLOR TO wa_ekko-CELLCOLOR.
MODIFY it_ekko from wa_ekko INDEX ld_index TRANSPORTING CELLCOLOR.
endif.
Set colour of AEDAT field text to red(6)
WA_CELLCOLOR-FNAME = 'AEDAT'.
WA_CELLCOLOR-COLOR-COL = 6. "color code 1-7, if outside rage defaults to 7
WA_CELLCOLOR-COLOR-INT = '0'. "1 = Intensified on, 0 = Intensified off
WA_CELLCOLOR-COLOR-INV = '1'. "1 = text colour, 0 = background colour
APPEND WA_CELLCOLOR TO wa_ekko-CELLCOLOR.
MODIFY it_ekko from wa_ekko INDEX ld_index TRANSPORTING CELLCOLOR.
ENDLOOP.
ENDFORM. " SET_CELL_COLOURS -
Want to change backgroung of Date Column
Hi Guys,
I want to change background of Date Column of table but condition is if date is greater than today then it should be in Red otherwise no.Do i need to do this from beam ?
Thanks,
RaulHave a look at this:
http://andrejusb.blogspot.ie/2010/04/changed-row-highlighting-in-oracle-adf.html
http://www.techartifact.com/blogs/2009/05/conditionally-colouring-of-row-cell-in-adf.html
or
1. You can create a transient column to your VO with built in Groovy expressions like adf.currentDate.
2. and compare with you date column and change inlinestyle like #{row.myDate > row.currentDate ? 'background-color:red' : 'background-color:blue'}
Edited by: Lalit S on 7 Jun, 2013 10:59 AM -
My question is related to the Sales Data.xlsx template that comes with Excel 2013
IN this workbook is a sheet named Sales Data. It has, 3 shapes. One each for each of the tab sheets in the workbook. When I click on the 'Sales Report' shape it selects the sales report tab. When you do this the shape changes color and the 'Sales Data' shape
also changes color.
However I'm unable to figure out how the colors are changing.
I don't see any macros in the workbook/worksheet. Nor do I see any code for worksheet events. I don't see any modules in VBA either. I think what is happening is that there are 2 shapes. When you click on one, the one shape goes to the background and the
other one comes to the foreground.
I'm no sure how it's doing that.
Can someone look at this template, Sales Data.xlsx that comes with Excel and explain how this functionality works?
Thank You
Keith Aul
Keith AulThe shapes are exactly as I suspected, each of 3 sheets has 3 'navigation' shapes. The shape with the same name as the sheet has no hyperlink and is coloured differently to indicate it refers to the active sheet. The other two have hyperlinks linked to respective
sheets. 3x3 shapes, 9 in total, none of them ever change colour!
It's logical though not necessary to name each shape same as the sheet it links to, but they'd work just as well with their original default names.
For aesthetics, the shapes that refer to own sheet have a horizontal line on top, actually two shapes as a group.
If still confused copy each set of 3 shapes to a 4th sheet, or open two new windows so you can see all three sheets at the same time. -
How do i change the color of a JTable's column names
hai,
i'm very new to java and trying to customize the look of a JTable.
how do i change the color of a JTable's Column names. i know its very simple, i just couldn't figure out how to do it!!
thanx in advancetable.getTableHeader().setForeground(Color.RED);
-
Color Changes in Spry Data Fields
Hi All,
I'm new to Javascript & PHP programming. Currently I have coded neccesary apperances for the Web Page and also Spry Data Set to read an external XML date source file.
What I need to do is one of the fields, needs to have color based status changes based on certain data or criterias received.
For example,
I have a Spry Table displayed on my browser,
Name
Current Status
Lane
Jane
6 Mins
1
Peter
Boarding
2
Sally
Arriving
3
Alex
Delayed
4
With the above, what I need is when the current status show in minutes, the text color will be white (This has been coded with CSS Style)
For the Current Status color changes, when I received anything apart from minutes, the display will be as of below :-
Minutes = Black
Boarding = Red
Arriving = Green
Delayed = Yellow
My question is can this be coded with just Javascript, HTML and normal CSS
OR
This needs to be coded in PHP, ASP ?
I'm not familiar with ASP and only have very little knowledge of PHP. If anyone here have some experience with this, can offer some advice on how I can apply this theory into my existing. And if possible some code example would be great.
Thanks.I have tried many times on Ben's method and it didn't work.
I have also tried the method from Adobe's documentation site.
Method 1
<ul spry:region="dsStates" spry:if="{ds_RowCount} != 0" spry:repeat="dsStates" spry:test="'{name}'.match(/^[amn]/i);" spry:choose="choose">
<li spry:when="'{name}'.match(/^n/i);" style="color: red;">{name}</li>
<li spry:when="'{name}'.match(/^m/i);" style="color: blue;">{name}</li>
<li spry:when="'{name}'.match(/^a/i);" style="color: green;">{name}</li>
</ul>
Method 2
<div spry:region="dsStates" spry:if="{ds_RowCount} != 0">
<table border="1" spry:repeatchildren="dsStates" spry:test="'{name}'.match(/^[amn]/i);" spry:choose="choose">
<tr spry:when="'{name}'.match(/^n/i);" style="background-color: red;"><td>{name}</td></tr>
<tr spry:when="'{name}'.match(/^m/i);" style="background-color: blue;"><td>{name}</td></tr>
<tr spry:when="'{name}'.match(/^a/i);" style="background-color: green;"><td>{name}</td></tr>
</table>
</div>
Can anyone make it plain and simple of how the data source should look like ?
I'm posting my source code here to make things easy.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="SpryAssets/xpath.js" type="text/javascript"></script>
<script src="SpryAssets/SpryData.js" type="text/javascript"></script>
<script type="text/javascript">
var KomtarETA = new Spry.Data.XMLDataSet("KomtarETA.xml", "komtareta/bus", {useCache: false, loadInterval: 100});
</script>
</head>
<body>
<div spry:region="KomtarETA">
<table>
<tr>
<th>Route</th>
<th>Current</th>
<th>Destination</th>
<th>Next</th>
<th>Lane</th>
</tr>
<tr spry:repeat="KomtarETA">
<td>{route}</td>
<td>{current}</td>
<td>{destination}</td>
<td>{next}</td>
<td>{lane}</td>
</tr>
</table>
</div>
</body>
</html>
The above is the HTML file I start working with.
The {Current} field needs to have it's data periodically changing color & addition of flashing effect based on it's input from the XML data.
So my question is how do I work about ? I don't quite get the explanation above.
Thanks. -
Changing color of columns in CL_GUI_CHART_ENGINE
Dear Developers,
I am displaying a Columns Graph using class CL_GUI_CHART_ENGINE. My requirement is to change color of selected columns based on their height. For example if height of the column exceepds 10, then the color of that particular color is to be made red. Is that possible using CL_GUI_CHART_ENGINE ??
Thanks and Regards,
kartikHi,
Refer below link:
https://forums.sdn.sap.com/click.jspa?searchID=3958197&messageID=2474585
<b>Reward points</b>
Regards -
Style to change color of single column in list
Hi,
I need to get below functionality in results list. need to break part of sentence to another line with different color.
How to achieve this.
Thanks & Regards,
SivaHi
check this solution
https://social.msdn.microsoft.com/Forums/sharepoint/en-US/1f2f74b6-9260-4dc4-a093-a36947e1eb29/is-it-possible-to-add-colored-text-to-a-list-column-description?forum=sharepointgenerallegacy
Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you. -
Change color on Report Painter
Dear gurus.
Pls give idear about Report painter.
Now I am making comparson report between planned data and
actual data on report painter in order to check variance between them.
Column1: Planned data
Column2: Actual data
Column3: Variance between Column1 and 2
Then, I want to change the font color of Column3 only in
case that the variance over the criteria such as 10,000 $.
Do you know how to do it on report painter?
I don't care whether "Change color" or "make font Bold" or "Font blinking".
My purpose is to give warning to report's readers which record
they have to read carefully.
BR
yoshitadaDear Sadashivan
Thanks for your info.
I tried the way you mentioned.
However, the thing I want to do is not to change the font color of specified column.
The thing I want to do is to setup the threshhold such as percentage or amount
and emphasize the data which over the threshhold by changing the color
automatically.
Thanks anyway.
BR
Yoshitada
Maybe you are looking for
-
I used a partitioned HDD for time machine, using a partition already containing other data files. I am now no longer able to view that partition in Finder. Disk Utility shows it in grey and "not mounted". Any suggestions of how to access the files? D
-
DELETE DATAFILE (database) FROM ASM not using dbca
Hi All I have RAC(2 node) on Windows 2003 EE, Oracle 10g R2 How i can delete file from my asm instance? For example, i create database manualy then i want delete this database? how i can delete file from asm? dbca dont see this instance. a long time
-
OBIEE - table join across databases
Hi, I want to join two tables that are in different databases. I want to join these tables on some condition and then be able to see data from both of them in the reports. Table 1 - columns A1, B1, C1 Table 2 - columns A2, B2, D2 Currently what we tr
-
Help! IO error when trying to open .swf
Hi. I'm extremely new to Flash. I've inherited a website project. It appears as though the original developer bought a Flash template with the intention of modifying it to the client's needs. I've downloaded a trial version of Flash CS 5.5. When I op
-
No paper message for envelope print job
Printer C4680 "no paper" message when I try to print envelope. It worked before. Windows 65 bit. I've unplugged and restarted computer and printer. Doesn't help.