Color to the column details in report
Is it possible to apply color to the column details of a particular column in Interactive report ?
Yogesh
Edited by: yogeshyl on Jan 27, 2010 10:32 AM
I assume you mean a different table header colour.
There is a class that it uses:
.apexir_WORKSHEET_DATA th {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:#4E4E4E url(../ws/report_bg.gif) repeat-x scroll 0 0;
border-bottom:1px solid #AAAAAA;
border-top:1px solid #CCCCCC;
color:#FFFFFF;
font-size:8pt;
font-weight:bold;
letter-spacing:1px;
white-space:nowrap;
}So you make changes to this to suit what you want - i.e. you could add that style with your own implementation to overwrite the built in design, in a header region of your page.
Ta,
Trent
Similar Messages
-
To make different colours for the columns of ALV report in Grid display.
Hai Friends,
I have created an ALV report in grid display method by using the call function reuse_alv_grid_display.
I have obtained the report.In that report i want to change the colour of each column.Plz provide the answer with a sample program.
Thank u.hi i had a program for the rows with diff colors....do the same thing for the columns..
REPORT zdemo_alvgrid .
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,
line_color(4) type c, "Used to store row color attributes
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.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
form build_fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = '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-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).
Set layout field for row attributes(i.e. color)
gd_layout-info_fieldname = 'LINE_COLOR'.
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
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
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.
data: ld_color(1) type c.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
from ekpo
into table it_ekko.
*Populate field with color attributes
loop at it_ekko into wa_ekko.
ld_color = ld_color + 1.
Only 7 colours so need to reset color value
if ld_color = 8.
ld_color = 1.
endif.
concatenate 'C' ld_color '10' into wa_ekko-line_color.
wa_ekko-line_color = 'C410'.
modify it_ekko from wa_ekko.
endloop.
endform. " DATA_RETRIEVAL
regards,
venkat -
Select the column details for table in one column as varchar2(32000)
Oracle Version: ORACLE 10G R 2
Problem : Select the column details for some tables and want to store the same in VARCHAR2(32000) separated by ||
Example:
TABLE_NAME COLUMN_NAME DATA_TYPE
EMP EMPNO NUMBER
EMP ENAME VARCHAR2
EMP JOB VARCHAR2
EMP MGR NUMBER
EMP HIREDATE DATE
EMP SAL NUMBER
EMP COMM NUMBER
EMP DEPTNO NUMBER
EMP RN NUMBER
Want to store
COLUMNS (empno||ename||job||mgr||hiredate||sal||comm||deptno||rn);SQL> var cur refcursor
SQL> declare
ctx number;
begin
ctx := dbms_xmlgen.newcontext('select * from emp');
dbms_xmlgen.setNullHandling(ctx, dbms_xmlgen.empty_tag);
open :cur for select * from xmltable('for $i in ROW return string-join($i/*, "||")' passing dbms_xmlgen.getxmltype(ctx).extract('ROWSET/ROW'));
end;
PL/SQL procedure successfully completed.
SQL> print cur
COLUMN_VALUE
7369||SMITH||CLERK||7902||17.12.1980 00:00:00||800||||20
7499||ALLEN||SALESMAN||7698||20.02.1981 00:00:00||1600||300||30
7521||WARD||SALESMAN||7698||22.02.1981 00:00:00||1250||500||30
7566||JONES||MANAGER||7839||02.04.1981 00:00:00||2975||||20
7654||MARTIN||SALESMAN||7698||28.09.1981 00:00:00||1250||1400||30
7698||BLAKE||MANAGER||7839||01.05.1981 00:00:00||2850||||30
7782||CLARK||MANAGER||7839||09.06.1981 00:00:00||2450||||10
7788||SCOTT||ANALYST||7566||19.04.1987 00:00:00||3000||||20
7839||KING||PRESIDENT||||17.11.1981 00:00:00||5000||||10
7844||TURNER||SALESMAN||7698||08.09.1981 00:00:00||1500||0||30
7876||ADAMS||CLERK||7788||23.05.1987 00:00:00||1100||||20
7900||JAMES||CLERK||7698||03.12.1981 00:00:00||950||||30
7902||FORD||ANALYST||7566||03.12.1981 00:00:00||3000||||20
7934||MILLER||CLERK||7782||23.01.1982 00:00:00||1300||||10
14 rows selected. -
How to freeze the columns in Classical reports using vertical scroll
Hi All,
I am facing one problem that when i am scrolling down the page in the report output ,the columns in the report are moving upward.I want to freeze those columns . Please give me the solution for to freeze the columns in classical report when i scroll vertically.
With Regards,
R.P.SastryPut ur colum headers in TOP-OF-PAGE Event.
this will sole ur problem.
reward if useful.
Regards,
Vimal -
Average of the column in ALV report
Hi,
I am working on an ALV report and for one of the column, i am calculating the average with fieldcatalog property do_sum = 'C'.
I am sorting the output table for 2 fields and whenever I am expanding/compressing the sorted fields the average of the column is changing. Please let me know how do I get this average calculated constant. It should not change when the user collapses/expands on the sorted field.
Regards
RashmiThe same question has been asked in this thread:
Compute average of a report column
I have offered a solution but as I've said it's not great but it may meet your needs.
Or another forum user may review and be able to suggest a better solution.
Does the average need to be part of the report?
Could you calculate it and display it within a page item below the report instead? -
Hide the column from ssrs report
Hello,
I am creating matrix report , I want to hide the column in which Data Field is null. I did tried by writing this expression
=IIF(IsNothing((Fields!test_name.Value,
"matrix1_category")),true,false)
but problem with this expression is it hide the column on first page,It does not do it on rest of the pages, I have multiple pages grouped on one column and added page break on that group.
Please give me some solution
Column 1 -ChildGroup-> Column 2 -ChildGroup-> Coulmn 3 | Column 4 |
|
Data |
Added Page Break on Column 1 and Column 2
Thank-you!Hi Piyush,
If I understand correctly, you want to hide the entire column, when it has NULL value of the specify field. We can configure the Column Visibility.
Please refer to the following steps:
1. Right click the column, select Column Visibility option.
2. Select “Show or hide based on an expression” with above expression.
If there are any misunderstanding, please feel free to let me know.
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
Different column detail webi report
Dear experts,
Is it possible to have a webi report with the following columns' layout:
Country | Average 2009 | Jan 2010 | Feb 2010 | .... | Dec 2010 | Average 2010
I've created a variable directly in the webi report but I'm not able to have detail by month in 2010 and a column with the 2010 total.
Any ideas?
thank you!
Best,
Inês SantosHey Inês,
Country | Avg 2009 | Jan10 | Avg 2010 | Feb 2010 | Avg 2010 | .... | Dec 2010 | Avg 2010.
You're correct foreach Month-Year it will append one column, yesterday I didn't find enough time to see this.
Solution:
1. just drag Cross-tab from templates.
2. In Column section(far left) Drop object.
3. In Rows Just right-click on it and Say Insert row above.
4. on Newly inserted row, Drag object
Note: object should contain only years only like 2009, 2010 etc...,
5. In below row , just drag object (which has Jan10,Feb10 etc...,)
6. Now Click on object and say Insert column right
Here, use formuls to calculate Avg(2009) == See my earlier post
7. Now on Object , the top one (row), apply Break.
8. It will append two columns for you. One is exact size with Column and one more with small size(white background). Here you can remove small one.
9. Now on newly added/appended column , write Avg(2010) formula.
10. On object (top one== row), go to properties == Make Text and Back ground color to White and Width and height to 0(Zero- it will take 4 pixels== which is default)
Now you can see exact report, what you are trying to achieve.
I tried and tested. Hope it should work for you.
Thank You!!
Sent from iPhone -
Displaying different colors for cells/columns in Interactive Report
Hi,
I have a requirement to display just the 'cells' in the Interactive Report columns with different colors.
There are 3 columns in the Interactive report.
The color coding for all the 3 different columns should be such that:
<40% - red color
40-70-orange
greater than 70%-green
I tried the highlight option in the report and saved the report as default, but still the color condition ended up getting displayed to the end user. I dont want this.
Can someone suggest a better way to handle this requirement?Perhaps explore similar solutions described here
Background Colour of Report Cell Issues.
Scott -
Do sum in ALV based on the color of the column
Hi ,
I have one column in ALV which has color red or green based on the whether to consider it in summationn or not based on some condition. Now I want to do 'Total' of this column, but not all the values should be considered. Instead of that only those values which have color green should be considered. Whether it is possible by capturing the do sum event or something like that? If yes, Please tell me the steps
Thanks in advance,
Rgds,
MadhuriHi,
Try this :
IT_FIELDCAT-DATATYPE = 'CURR' .
IT_FIELDCAT-CFIELDNAME = 'WAERS' " internal table field.
IT_FIELDCAT-CTABNAME = 'IT_TAB'. " internal table name
IT_FIELDCAT-FIELDNAME = 'NETPR'." internal table of nettpr field
IT_FIELDCAT-DO_SUM = 'X'.
Regards,
Prashant -
How to remove the append "/1 CAD" in the column of drilldown report
Hi Expert,
We have a report for "AGED TRIAL BALANCE for AP" in local currency and column heading are printing fine.
Example of column header "0 - 30" and its automatically appending "/1 CAD":
Sample output:
0 - 30 | 31 -60 |
1 CAD | 1 CAD |
Now I am creating the same report but in document currency which i want to remove the auto append "/1 CAD".
On the form I am using the characteristics "Due date analysis".
How can i remove this currency "1CAD" thing.
Thanks in advance.Hi,
this has to do with the scaling and formating you are using.
If you are using an automatic Scaling mode and you X-values have the display format "Time", DIAdem switches to the scaling type "Date/Time".
By default, DIAdem is using an automatic formating with two lines. The upper is for the Ticks and the lower for a larger step. It looks as if your time-data is only holdig the seconds of the day, but not the date itself. So DIAdem assumes a year 0 and the 1 is for the first day of the year. If your data spans over several days, you will see the number of the day below the 12:00 for each day. Depending on the X-values, the automatic scaling will show seconds, minutes, hours or dates and years.
You just need to go to the X-Axis - numbers tab and change the format. "#hh:nn" would do the job with leading zeros and "#HH:nn" without leading zeros. -
How to deselect the column in a report
While creating a report, i had selected the id which is a primary key column, now can i deselect that? is it possible? Whne i update something, record is getting created twice.
Regards,
PallaviHi Pallavi,
you can always modify the SQL statement which is created by the wizard. Just go onto the
-) "Region Definition" tab of your report region and change the SQL statement or
-) uncheck the "Show" checkbox on the "Report Attributes" tab of your report.
Patrick
Check out my APEX-blog: http://inside-apex.blogspot.com
Check out the ApexLib Framework: http://apexlib.sourceforge.net -
Changing the color of the column in a JTable based on the selection (mouse)
Hi,
I want to change the color of all the cells in a column based on the mouse clicked event.
I have managed to select the entire column. And, even, I have found a working example in the internet. But I don't understand why in my case it doesn't work.
This is the code (an inner class for a TableCellRenderer):
class MCTableCellRenderer extends JLabel implements TableCellRenderer {
private static final long serialVersionUID = 1L;
@Override
public Component getTableCellRendererComponent(JTable table,
Object value, boolean isSelected, boolean hasFocus, int row,
int column) {
setFont(table.getFont());
if(value instanceof Double){
setHorizontalAlignment(SwingConstants.RIGHT);
DecimalFormat numberFormat = (DecimalFormat) NumberFormat.getInstance();
numberFormat.applyPattern("#######.#");
String val = numberFormat.format(value);
setText(val);
if(isSelected){
setBackground(Color.RED);
System.out.println("is selected");
else{
setBackground(Color.BLACK);
System.out.println("is not selected");
return this;
}I have set opacity to true for the contentPane, but without any result.
Any advice will be very apreciated.Problem solved.
My Renderer should have extended the abstract class DefaultTableCellRenderer.
class MCTableCellRenderer extends DefaultTableCellRenderer { -
Background color to the column
How to add background colour to the aggregate total in interactive report?
YogeshHi,
Then I think you need jQuery. Place something like below to page HTML header.
<script>
$(function(){
$('.apexir_AGGREGATE_VALUE').each(function(i){
if($(this).children().length > 0){
$(this).css('background-color','red');
</script>Remember load jQuery library. You can use it from Google like
<script src="http://www.google.com/jsapi"></script>
<script>
google.load("jquery", "1.3.2");
</script>Br, Jari -
Hi ,
would I be able to change the complete column color
dynamically (it does'nt work using the Advanced Datagrid --
styleFunction property) I am able to change the color of the
text of a specific column dynamically (
http://livedocs.adobe.com/flex/3/html/help.html?content=advdatagrid_04.html#230321)
but not the background color of the column.
Can any body provide some help on this (changing the
background color of the column dynamically)
thanks"nash99" <[email protected]> wrote in
message
news:gfhuls$s1c$[email protected]..
> Hi ,
> would I be able to change the complete column color
dynamically (it
> does'nt work using the Advanced Datagrid --
> styleFunction property) I am able to change the color of
the text of a
> specific column dynamically
> (
http://livedocs.adobe.com/flex/3/html/help.html?content=advdatagrid_04.html#230
> 321) but not the background color of the column.
>
> Can any body provide some help on this (changing the
background color of
> the
> column dynamically)
Just look and see what column it is and change its background
color... -
How to resize the columns in the report
Hi
I want to resize the columns in my report to make them smaller so that they don't overlap, but after resizing the columns still overlap so that some columns headings are under the other ones.
ThanksYou can do it either by, going to the property palette of the column and then change the horizontal elasticity to 'Variable', this way it will shrink or enlarge the size automatically. Or, you can do in manually in the layout model, click the column then click the edge of the field and drag it to make it longer or shorter.
-Marilyn
Maybe you are looking for
-
How to manage resource inside JVM8i
I am writing a Java Stoted Procedures. I encouter an error: The following JDBC error occurred: IoException: End of TNS data channel The source code is : import java.io.*; public class DisBytes { public static void enter1() throws IOException { File i
-
Add comment with special character on column
Hi everyone, I am currently in a database project, and needs to insert comment into the table's columns by using the syntax e.g. comment on column TEST_INT.MY_INTEGER is 'within comment'. The question is: there is no way to add special characters int
-
Hi I am trying to get some images (10 frames per second) from a webcam so that later I can detect the moving objects.. My code is the following but I dont know how to change it so that I can get 10 frames per second.Any help? package video; import ja
-
Problem with reading data from textEdit (htmlB)
Hi Guys, I am not able to read text entered into the TextEdit box. Here is the code which I am using. TextEdit TE1 = (TextEdit) this.getComponentByName("TextEdit1"); strTE1 = TE1 .getText(); On the second line I get a null pointer exception. Thanx,
-
Mac mini won't connect to my wireless router!
I just bought my mac mini server then connected it to wifi, then after 2 weeks I had to go abroad for a week so I just turned off the switch connecting to my mac, without switching off my mac mini server. then when I get back home my mac mini won't c