Coloring a column in report
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.
Thanks
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
-
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 -
Additional Lead Column in Report painter
Hi Gurus
Please guide me how to add an additional Lead column in Report painter
Thanks
HirenHi HIren,
There can be only one lead column in report painter.
However within the one lead column you can identify more than one characteristic - e.g. cost center and cost element. You can then identify that both characteristics should be exploded.
If you go Edit > Rows > Explode, you have the opportunity of identifying which characteristic takes presidence over the other, and how they expand. So in this example, Cost center will be 1 and cost element will be 2.
The output will be dependant upon your report layout, but you should have the layout so that you have:
Cost Center A:
- Cost Element A
- Cost Element B:
- Cost Element C:
Cost Center B:
- Cost Element A:
- Cost Element B:
- Cost Element C:
And to distinguish the cost centers from the cost elements, you can format the cost center row "Color for Totals"
Regards,
Gaurav -
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 -
Can we add a new column in report which is not in table.
Hi All,
Can we create a new column in report which is not in table.
I have two columns in my table completion_date, manufacture_date. If the difference between the completion_date and manufacture_date is 0, -1, 1 then the new column of the report will say on time against each record or else will display late. Any suggestion how to proceed on this
Regards
Edited by: User_Apex on May 16, 2011 5:54 AMStandard report then, NOT an interactive report (which if you were using, you could build a computation and report on that)..
Then the adding a column in the query would be your best best...
Thank you,
Tony Miller
Webster, TX
There are two kinds of pedestrians -- the quick and the dead.
If this question is answered, please mark the thread as closed and assign points where earned.. -
How to use the procedure column in reports
Hi all
How to call the procedure in reports as source.. If possible how to use columns of procedure in the layout column of report????Hi,
Your query is not clear.
1. In subject are you asking total column.
A. Edit pivot view and go to Rows and click Total BY option here you can find option like (none,before,after) the you can select after it will display total all culms.
2. I want use the columnC in columnD ? -- Am not understand.
A. What my understand is you want to see the report only C and D values only.
If it is correct we can apply filter in report level click column filed and apply not equal to A then it will show only C and D only.
If it is wrong pleas post me correct one with example. Will try to help out this.
I am not sure this is what your looking so far.
Award points it is useful.
Thanks,
Satya -
How to set value of a column in report region
Hi,
I have a report region based on a query.In this my first column is selectlist "select row" having to values "yes" & "No".
I have two buttons on top of the region "Check all" and "uncheck all".
My requirement is when I click check all button all rows corresponding to "select row" column gets selected to Yes and when I click No all rows gets selected to "No".
Thanks
VikramActully I want to set the value of a column in report region.
There are replies in the forum but in those the item is in form but not in the report region.
I am generating report region by using htmldb_item.selectlist and i dont know how to set value in these type of items. -
How to include variable in the text column in report painter?
Dear Expert,
Would like to seek for your help to include How to include variable in the text column in report painter?Please advice.
Thank you.
Regards,
Karen
Edited by: Karen Swee Ping Ho on Jun 17, 2011 2:48 AMHi,
Thank you for the promt reply.
1) How I include the variable in the column header to display fiscal year which I have selected from the selection screen?
which variable should i use?
2) Where can i find more information about the characteristic and which variable to be use base on the characteristic?
For example: I would like to display the fiscal year from the selection screen/input screen when execute the report which also will reflected to the element definition and will display the fiscal year also in the column text?
3) Kindly advise base on question 2, the variable that i use in element definition it will also display in selection screen?
4) When execute the report the first selection screen input parameter it obtain from where it is from element definition?
5) Please advice how to be done when report execute with first screen input selection will also reflect the element definition of column and rom with the selection of the fiscal year?
Please help.
many thanks
Edited by: KH on Jun 18, 2011 7:18 AM -
How to add new column in report painter
Hi Experts,
I want to add new column in report painter which as to calculate the previous column . value in the new column should be the precentage of previous column existing on left side...HI Pradeep,
Goto the transaction code (Change Report) GR32.
Give you library name and report name
And click on the column (application tool bar or F7) button then place the curser on the screen where you want column (please note you have to keep curser on the header section u2013Red column text) right click and insert element. Then you select formula as selection element and enter. You will get the enter formula box. Then you can type your formula and continue. This will add new column to the report.
How to enter formula: you can see the formula components in that id and description.
Id is columns that are present and description indicates explanation of that column.
Enter formula according your requirement.
Examples:
Enter formula screen:
ID : des
X001 amount
X002 pt000
X003 test
1. Enter formula as: ( X001 u2013 X002)
The above formula is for fist column u2013 second column.
2. ( ( X001 u2013 X002) / X003) * 100
First column u2013 second column and devide by third column after that multiple with 100.
Hope this will help you
Regards
Manohar -
I want to hide a column in report 6i
hi
I want to hide a column in report 6i,
I used this code
function F_col_qty3FormatTrigger return boolean is
begin
if :color3 is null then
return (false);
else
return (TRUE);
end if;
end;
plz note that COL_QTY3 and COLOR3 both are from different table
and resulting gave this error
REP-1314 Format trigger 'F_col_qty3' reference column 'color3' at wrong frequency.You can format fields from a lower level group using fields from an upper level field, but not vice versa. This is because for the same upper level field there may exist several values of the lower level field. If this can not happen in your situation, there is no reason to place the fields in different groups.
-
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 -
How do I set individual properties for a column in report layout at runtime
How do I set individual properties for a column in report layout at runtime? I need to change this based on a user's input. This is for v10g.
I need to change either the "Read from File" attribute or the "File Format" attribute for one column based on the user's input. IS this possible?
Thanks in advance!Hi,
define 2 columns and use format triggers to show the one or the other column.
Regards
Rainer -
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) -
How to display top 2 countries in 2 columns in Report Designer
Hello Gurus ,
I have a requirement where top 2 countries has to be displayed in two different columns in Report Designer.
is there are way to do that, i tried many differetn ways but was not successfull, apart from creating text variables and writing customer exit.
I appreciate your help
Thanks,
KumarHi,
I am not sure what version you are, from version 9.3 I think there is a "Top" function, just highlight the row, tick the option for "Top", set the number and the column
Failing that if you need to use rank could you not hide the column.
Cheers
John
http://john-goodwin.blogspot.com/ -
Sorting based on two columns in report
Hi,
we have one issue on sorting based on two columns in report.
In the report we are doing sorting on two columns(week_id and stage_name). I have attached the screen shot for the same. The sorting is first done on the week_id and then on the stage_name. The issue comes when we have no data for the stage 1 - Prospect in W1. The stage goes to the second position.
Please suggest if there is any work around to show the 1 - Prospect stage in W1.
Regards,
Ambika Nanda.what is w1? where is screenshot? and is stage seoncd sort? if so what is the issue?
Maybe you are looking for
-
Hi All, Can you please let me know the Process of How to Create a VariantBOM? Preferebly Step-by-Step Process? Highly appreciate for your valuable inputs. Thanks and Regards, Venkat Edited by: venkat Korada on Jan 3, 2008 10:14 AM
-
Upload xml file from aplication server using read dataset, parser error.
Hi, I would like to upload xml file from app. server but parser failed. If I upload this xml file from workstation (using ws_upload) it is correct. For uploading xml file from app. server I use open dataset... read dataset. In loop section I remove '
-
when i plug in my ipod why do i get a box that says apple mobile device service is not started?
-
HT2293 How do I get the sensor out of my shoe
I just got a pair of Nike free run 3's. I just need to know how to get the sensor out of my shoe to activate it
-
Hi Everyone, Our client wants to send Electronic Fund Transfers using Idocs/EDI What are the steps involved in configuring fbzp for EDI? What are the steps involved in setting Idocs and EDI to achieve the task? Thanks and Regards, Genie