Coloring a column in APEX
Hi,
How do we set the background color of a column in a report? I have four columns in the table and I want to display the data of each column with different color.
Can you help?
regards
VJ
Vikas, thanks for the reply.
"background-color:red" works but only for the text background. I want to color the whole cell in which the text is displayed. Please help.
regards,
VJ
Similar Messages
-
Hi,
I am new to APex.
I am trying to color a column in a report. I am using the <Td> tag. Something like
<TD BGCOLOR="#00FF00">. It is coloring the cell as I want but it is coloring the next column and the values are posted in the next column. The whole table gets shifted to right from that column. I am using Apex3.0.
I am using IE7, I don't know if that matters.
Any help is appreciated.
ThanksVikas, thanks for the reply.
"background-color:red" works but only for the text background. I want to color the whole cell in which the text is displayed. Please help.
regards,
VJ -
Background color for column heading
Hi,
I have 5 columns in my report and I would like to have different background color for column headings. How can I do this in report templates?
I was looking at Column heading section-
<th class="t10ReportHeader"#ALIGNMENT# id="#COLUMN_HEADER_NAME#">#COLUMN_HEADER#</th>
How can I specify backgrund colors for all columns here?
Thanks in advanceG'day Karen,
Thanks for ur reply.
I have seen this note before, its not that the header colors have changed after latest SP was applied in our systems. Also the ABAP and JAVA stacks are in sync.
Scenario is that we are trying to set up a new Portal theme for Enterprise Reporting with some specific color codes (hex codes).
What i have observed is Characterstics Header background color is set up using the element "Background Color of Level 1 Column Heading ".
While the Background color for Key Figures header is using element "Background Color of Level 2 Column Heading ".
But the problem is element "Background Color of Level 2 Column Heading " is also used as the Background color for Standard Characterstics cell, so if we make it same the whole report of the same color, which we dont want.
Requirement is to get the same Background color for Header cells (both Char. and Key Figure headers).
Any further suggestions will be appreciated.
Thanks
CK -
How to change color of column in advanced table
Hi Guys
I need to change the color of column in advanced table.
Please help me .
Thanks
SubramanianHi
Can you please give the sample code for this
I created advancedtable
under this advancedtable , I created columngroup
under this columngroup
I created column1 and column2
Here I need change the color for entire column1.
Thanks
Subra -
DataGrid alternating row colors per column
Is there a way to set different alternating colors to each
column in a DataGrid. I have a datagrid where I want two of the
columns to have different alternating row colors, one column (red
and light red) and the other (green and light green).
Many thanksYou can simply set the DataGridColumn property to the
approprate colors.
ex.
<mx:DataGrid y="0" x="0" width="100%">
<mx:columns>
<mx:DataGridColumn id="col1" backgroundColor="0x640000"
dataField="col1"/>
<mx:DataGridColumn id="col1" backgroundColor="0xFF0000"
dataField="col1"/>
<mx:DataGridColumn id="col1" backgroundColor="0x006600"
dataField="col1"/>
<mx:DataGridColumn id="col1" backgroundColor="0x33CC33"
dataField="col1"/>
</mx:columns>
</mx:DataGrid>
or you can use the setStyle:
col1.setStyle("backgroudColor", 0x640000) -
Set Background color of columns in JTable
Hi,
I would like to set the background color of columns, which are not editable, to a grey color.
I have a JTable with 8 columns where the first is not editable (set through a TableModel.
Regards
Thomasone can use a most efficient method of changing looks of table data by overidding prepareRenderer() method of JTable. this method returns a component which JTable uses to display a cell. a solution could be
public class mytable extends JTable
public component prepareRenderer(.......)
component c = super.prepareRenderer(....);
if ( not_my_column )
return c;
c.setBackground(Color.grey);
return c;
} -
Bring Color to Column Headings of downloaded ms-excel file
Hi,
Iam downloading report output to MS-Excel sheet using MS_EXCEL_OLE_STANDARD_DAT ...but what i want is how can i bring specific color to column heading of that downloaded Ms-excel file..using ole u can do it ...
<b>just copy nad paste this example...</b>&----
*& Report ZNEGI17 *
REPORT ZNEGI17 NO STANDARD PAGE HEADING.
this report demonstrates how to send some ABAP data to an
EXCEL sheet using OLE automation.
INCLUDE OLE2INCL.
handles for OLE objects
DATA: H_EXCEL TYPE OLE2_OBJECT, " Excel object
H_MAPL TYPE OLE2_OBJECT, " list of workbooks
H_MAP TYPE OLE2_OBJECT, " workbook
H_ZL TYPE OLE2_OBJECT, " cell
H_F TYPE OLE2_OBJECT. " font
TABLES: SPFLI.
DATA H TYPE I.
table of flights
DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
*& Event START-OF-SELECTION
START-OF-SELECTION.
read flights
SELECT * FROM SPFLI INTO TABLE IT_SPFLI UP TO 10 ROWS.
display header
ULINE (61).
WRITE: / SY-VLINE NO-GAP,
(3) 'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(4) 'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(8) 'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
ULINE /(61).
display flights
LOOP AT IT_SPFLI.
WRITE: / SY-VLINE NO-GAP,
IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
ENDLOOP.
ULINE /(61).
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-007
EXCEPTIONS
OTHERS = 1.
start Excel
CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
PERFORM ERR_HDL.
SET PROPERTY OF H_EXCEL 'Visible' = 1.
CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'
PERFORM ERR_HDL.
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-008
EXCEPTIONS
OTHERS = 1.
get list of workbooks, initially empty
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
PERFORM ERR_HDL.
add a new workbook
CALL METHOD OF H_MAPL 'Add' = H_MAP.
PERFORM ERR_HDL.
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-009
EXCEPTIONS
OTHERS = 1.
output column headings to active Excel sheet
PERFORM FILL_CELL1 USING 1 1 1 'Flug'(001).
PERFORM FILL_CELL1 USING 1 2 0 'Nr'(002).
PERFORM FILL_CELL1 USING 1 3 1 'Von'(003).
PERFORM FILL_CELL1 USING 1 4 1 'Nach'(004).
PERFORM FILL_CELL1 USING 1 5 1 'Zeit'(005).
LOOP AT IT_SPFLI.
copy flights to active EXCEL sheet
H = SY-TABIX + 1.
PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
ENDLOOP.
changes by Kishore - start
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTING #1 = 2.
PERFORM ERR_HDL.
add a new workbook
CALL METHOD OF H_MAPL 'Add' = H_MAP EXPORTING #1 = 2.
PERFORM ERR_HDL.
tell user what is going on
SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-009
EXCEPTIONS
OTHERS = 1.
output column headings to active Excel sheet
PERFORM FILL_CELL1 USING 1 1 1 'Flug'(001).
PERFORM FILL_CELL1 USING 1 2 0 'Nr'(002).
PERFORM FILL_CELL1 USING 1 3 1 'Von'(003).
PERFORM FILL_CELL1 USING 1 4 1 'Nach'(004).
PERFORM FILL_CELL1 USING 1 5 1 'Zeit'(005).
LOOP AT IT_SPFLI.
copy flights to active EXCEL sheet
H = SY-TABIX + 1.
PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
ENDLOOP.
changes by Kishore - end
disconnect from Excel
CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'C:\SKV.XLS'.
FREE OBJECT H_EXCEL.
PERFORM ERR_HDL.
FORM FILL_CELL *
sets cell at coordinates i,j to value val boldtype bold *
FORM FILL_CELL1 USING I J BOLD VAL.
data : color(5) type x value 'H80000008'.
CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
PERFORM ERR_HDL.
SET PROPERTY OF H_ZL 'Value' = VAL .
PERFORM ERR_HDL.
GET PROPERTY OF H_ZL 'Font' = H_F.
PERFORM ERR_HDL.
SET PROPERTY OF H_F 'Bold' = BOLD .
PERFORM ERR_HDL.
SET PROPERTY OF H_F 'ColorIndex' = 3 .
PERFORM ERR_HDL.
ENDFORM.
*& Form ERR_HDL
outputs OLE error if any *
--> p1 text
<-- p2 text
FORM ERR_HDL.
IF SY-SUBRC <> 0.
WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
STOP.
ENDIF.
ENDFORM. " ERR_HDL
*& Form FILL_CELL1
text
-->P_H text
-->P_1 text
-->P_0 text
-->P_IT_SPFLI_CARRID text
form FILL_CELL using I J BOLD VAL.
CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
PERFORM ERR_HDL.
SET PROPERTY OF H_ZL 'Value' = VAL .
PERFORM ERR_HDL.
GET PROPERTY OF H_ZL 'Font' = H_F.
PERFORM ERR_HDL.
endform. " FILL_CELL1 -
Interactive Report, issue with backgroud color of Column Heading.
Hi,
I am using Theme -16
and there is a Interactive Report with the following columns Headings
Employee Name Employee No DOB
Now, the label of the first column is changed from Employee Name to Employee<br>name.
The column heading is now displayed as follows.
Employee Employee No DOB
Name problem is when I add a break in any of the column heading..the background color of the column headings is different than the first one (little bit darker).
Why the background ground of the column heading is different in both these cases??.
Thanks,
DeepakWhy the background ground of the column heading is different in both these cases??.The report heading background is controlled by the CSS rule
.apexir_WORKSHEET_DATA th {
background: #4e4e4e;
font-weight: bold;
color: #fff;
border-top: 1px #ccc solid;
border-bottom: 1px #aaa solid;
white-space: nowrap;
vertical-align: center;
letter-spacing: 1;
font-size: 8pt;
background-image: url(../ws/report_bg.gif);
background-repeat: repeat-x;
}This uses a [gradient image|http://apex.oracle.com/i/ws/report_bg.gif] that is repeated horizontally to provide a shaded background from light to dark grey. As the background image doesn't repeat vertically, when the height of the heading is more than the height of the image the gradient is replaced by the underlying background colour (#4e4e4e). This is what's happening when the break is inserted into the header text: the height of the heading increases, causing more of the darker area of the background image/underlying colour to be visible. -
How to color single column cells with different colors in classic report based different conditions
Hi ,
Am working on Oracle Apex 4.2 version. Am trying to generate a classic report with different cell colors based on the conditions.
I tried the solution provided in the below link.
https://forums.oracle.com/message/9518723#9518723.
I tried the same query given in that link.
SELECT e.*,
CASE
WHEN sal < 1000
THEN 'red'
WHEN sal BETWEEN 1000 AND 2000
THEN 'yellow'
WHEN sal > 2000
THEN 'green'
END the_color
FROM emp e
And, I hidded the column 'the_color' in Report Attributes,
the Column Template1 has the code , <td #ALIGNMENT# headers="#COLUMN_HEADER_NAME#">#COLUMN_VALUE#</td>.
After this, what are the steps did I miss here. Because am not getting the report which I need.
Kindly do provide solution.
Thanks,
yashu.SAL column values should visible with different color based on the conditions. Same way i did in my report it was working for me. Please refer the below links for more information,
https://forums.oracle.com/thread/1047891
http://dbswh.webhop.net/htmldb/f?p=BLOG:READ:0::::ARTICLE:351800346145832
Thanks
Lakshmi -
Error while renaming column in Apex 3.2.1
Hi,
I am getting the following error while renaming column in Oracle Apex 3.2.1 through SQL workshop:
"ORA-24344: success with compilation error"
Interestingly, it only gives an error when I rename the column again to its original name. For example, if I renaming the column X to X1 (no problem) but renaming back to X, I get this error. Same is true for X to X1 to X2 without any issues but renaming back from X2 to either X1 or X, I get the same error.
Any insight into this issue would be very helpful and greatly appreciated.
Thanks,
MilaanI've moved a step ahead, getting the new apex screen at http://127.0.0.1:8080/apex/ and can also login to my application. However there is no image for Application Express on http://127.0.0.1:8080/apex/ and I cannot click on the Login button. Hitting http://127.0.0.1:8080/i/ does list down the images. Any clue on what could be the problem?
For others reference: I'm not sure what was wrong, but I tried the entire steps again, with the 2 changes: shutdown the listener and job process ( in step 3.1) before running 'apexins' and second that I installed on SYSAUX and not USERS (in step 4)
1. Downloaded apex_3.2.1.zip to C:\Software
2. unzip apex_3.2.1.zip to C:\Software\apex
3. started command prompt and set these variables
set ORACLE_HOME=C:\oraclexe\app\oracle\product\10.2.0\server
set ORACLE_SID=xe
set ORACLE_PATH=C:\oraclexe\app\oracle\product\10.2.0\server\bin
set LD_LIBRARY_PATH=C:\oraclexe\app\oracle\product\10.2.0\server\lib
3.1 Shutdown the listener and job services
4.
sqlplus /nolog
CONNECT SYS as SYSDBA
@apexins SYSAUX SYSAUX TEMP /i/
5.
sqlplus /nolog
CONNECT SYS as SYSDBA
@apxchpwd
6.
Stopped and Started the Database, also the listener and job processes
7.
sqlplus /nolog
connect sys as sysdba
@apxldimg.sql c:\software
8.
sqlplus /nolog
connect sys as sysdba
exec dbms_xdb.setListenerLocalAccess (l_access => FALSE); -
How to change colors of columns in a chart view
Hi experts,
I've a chart view which chart type is column. I have put 3 data series and I want to change the colors of them.
By default, the 3 columns are displayed in blue, green and yellow and I wish put them in green, orange, and red. Is it possible?
I've tried to change the color scheme but I have only 3 propositions (Straight, Reverse and Snake) that not correspond to my wish.
Any idea?
Thanks for help
RonanHi Kiran,
no its not possible through Theme editor also ,because these colors are coming from Compiler which u are using.
Regards,
Govindu -
How to display images from BLOB column via APEX 4.0
Hello,
I did the following in order to display images of two Oracle records on the APEX page. I am using APEX Version : 4.0.1.00.03 , Oracle DB Version : 10.2.0.4.0.
1. Created An oracle table TEST_FORM
with 3 columns
( ID number, MIME_TYPE varchar2(255) , Image BLOB )
2. Inserted two records
10001, image/gif, ( actual image1)
10002, image/gif, ( actual image2)
3. created an Oracle procedure
CREATE OR REPLACE PROCEDURE show_my_form ( p_image_id IN test_form.id%type) AS
l_mime test_form.mime_type%type;
l_length NUMBER;
l_file_name VARCHAR2 (2000);
lob_loc test_form.IMAGE%type;
BEGIN
SELECT mime_type, IMAGE
, DBMS_LOB.getlength (IMAGE)
INTO l_mime, lob_loc, l_length
FROM test_form
WHERE id = p_image_id;
owa_util.mime_header(l_mime, false);
htp.p ('Content-length: ' || l_length);
owa_util.http_header_close;
wpg_docload.download_file (lob_loc);
END show_my_form ;
4. In Apex 4.0
step1. Created an interactive report on a new APEX page
step2. Specified the following in the Region Source
select id, mime_type, '<img src="#OWNER#.show_my_form ?p_image_id=#ID#" />' photo
from TEST_FORM
The column result shows as <img src="CCS.show_my_form?p_image_id=#ID#" />
I am unable to display the column image as a link to a proper image photo.
Could you please advise me if I missed anything ?
Thanks a lot.
Regards
Susanna
Edited by: user10318332 on 13/12/2010 15:51
Edited by: user10318332 on 13/12/2010 20:10Maybe the space you have before the ? is causing issues. there shouldn't be any space.
Your procedure looks to be much the same of one that I have.
Have you granted execute on your procedure?
Also, what version DB are you running? This could be another issue: http://daust.blogspot.com/2006/04/xe-calling-stored-procedures.html
But anyway, you don't need to create your own procedure these days. You could do the following:
in your query, have a column: dbms_lob.getlength(blob) photo ; save, then in column attributes for that column, apply a format mask. There is usually a link below the text box for the format mask - BLOB Download Format Mask, which will help you build the format mask. But it is documented here: http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/advnc.htm#BCGGJHEF
Ta,
Trent -
Using HTML,how to change the color of column data in an interactive report?
Hi,
I want to change the color of data of a column in an interactive report.
I want to do it by HTML.
I have tried the code
<style type="text/css">
#apexir_EMP_MANID{color:blue;}
</style>
But it changes the color of the heading of column only. Not the data.
Plz can anyone suggest me something ?
Thanks in advanceHi Vaibss!
Is it that what you're looking for?
Color Coding (Post number 5)
regards -
Hi All,
Wanted to know if I can give colors in a column:
For eg if i have a column for number of projects (values from 1 to 100) Can I display another column where I could just give colors like 1- 25 projects red color, 26-50 blue. 51-75 green and 76-100 as yellow ...
how to do this, I assume I will have to write a formula for color column but how . What would i call this technically?
Thanks,
Candie1. Insert the project number in the report and then next to it insert a text box.
2. Right click on the text box and then on Format Text.
3. In the pop up window, click on the Border tab and then on the x+2 button across from 'Background'.
4. In the formula workshop, type
select {db.project.nbr}
// {db.project.nbr} is the project number field
case 1 to 25:
crred
case 26 to 50:
crblue
case 51 to 75:
crolive
case 76 to 100:
craqua
default:
crnocolor;
// change the color constants or use color codes as desired
5. Save and close.
In the report the text box background should now change colors depending on the project number.
Edited by: Sanjay Kodidine on Jun 2, 2010 1:25 PM -
What is Maximum No. of columns in APEX 3.2 Interactive Report
Hi All,
Is there any limitation on maximum number of columns in a APEX (3.2) Interactive Report page, I have a report containing more than 200 columns. I am tyring to add another 25 new columns and found this error msg: ORA-06502: PL/SQL: numeric or value error: character string buffer too small.
I can add 5-6 new columns and it's runing okay but after that the msg. is coming.A query 225 columns wide? Is that not a bit excessive? I can't imagine that being particularly user-friendly. Perhaps it might be worth considering some sort of master->detail type report with the relevant filters for content - that should give your users something a mite bit more manageable.
Maybe you are looking for
-
Flash site working on some computers and not others?
hi my flash site is working perfectly on most computers but now i'm getting reports back that its not working on everyones i'm really boggled with this one can anyone suggest what the problem is i assume its something in my html code thats causing th
-
Creating a report in Web dynpro using OOPS concept
Hi all, Iam new to web Dynpro, i need to create a report in Web Dynpro using oops concept. can any one guide me regarding it. Regads, Easter
-
How do I get my ipod to stop making me log into my account?
My new ipod has been asking me to log in to my apple account. When I do, using the correct passwrod, as it tells me when my password is incorrect, the ipod immediately asks me to do it again. I can't do anything on the thing. Why is it doing this and
-
I am working with existing solution that I am too familiar with. The solution when is run by MSBuild copies some files from one location to another. How can see where exactly that copy has been set? Thanks
-
I found this on intenet and meets my needs, except I want to add Title // set random # variables - each must be 0 for first 'while' loop below var randomNum = 0; var randomNumLast = 0; // parent container var container_mc = this.createEmptyMovieClip(