Alternating colors in a table
I am putting together a page that displayes dynamically
generated HTML tables.
There are three tables on the page that are generated from
the same database however I cannot seem to find a way to generate
alternating row colors. I try to use:
<CFOUTPUT QUERY="GetTableData">
<TR BGCOLOR="###IIF(GetTableData.currentrow MOD 2, DE
('E6E6E6'), DE('C0C0C0'))#">
but the row colors are being grouped so that 2 or 3 rows are
the same color and then maybe 5-6 are the other color. There is no
consistency.
Anybody have any ideas on how to resolve this?
Create 2 css classes that represent you're alternating row
colors and use this UDF and it will adapt to missing rows from the
query.
<style>
.ResultSetA {
background-color: #FFFFFF;}
.ResultSetB {
background-color: #D7DBFF;}
</style>
used like : <tr
class="#alternateRow('ResultSetB,ResultSetA')#">
// alternateRow(styleList[,clear])
// @styleList (list - classes to cycle through)
// @clear (string - anything)
// returns a CSS class
// Example #alternateRow('ResultSetA,ResultSetB')#
function alternateRow(styleList)
var class = "";
if (not isDefined("styleNumber") OR arraylen(arguments) GT
1) {
styleNumber = 1;
class = listGetAt(styleList,styleNumber);
if (styleNumber EQ listLen(styleList)) {
styleNumber = 1;
} else {
styleNumber = styleNumber + 1;
return class;
}
Similar Messages
-
How can i set the alternating colors for a table rows
Dear All,
Please any one help me how can i set the Alternating colors for Table Rows.
i created a theam there i set the background alternating color to brown and i set the table design properity to alternating. but it is not reflecting.Hi,
The design property in Table properties should work for your requirement. Select "alternating" value for design.
Please see the API below:
design
Determines the appearance of the table. The property design can take the following values and is represented by enumeration type WDTableDesign.
alternating - The table rows are displayed alternately in a different color.
standard - The table background has one color. The individual table rows are displayed with grid net lines.
transparent - The table background is transparent. The individual table rows are displayed without grid net lines.
Check whether you have changed the right property or not? Also table should contain more than one rows to test this scenario.
Regards,
Jaya.
Edited by: VJR on Jun 17, 2009 6:43 PM -
Alternating color runs in a table
I have a bean that returns a few ArrayLists. I am displaying the results in a jsp in a table. What is the best way in jsp for me to get the colors of the <tr> to alternate?
This works - I think adding the values into the pageContext is key:
<%@ page language="java" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%
List payPeriods = new ArrayList();
for (int index = 0; index < 10; ++index)
payPeriods.add(new Integer(index*index));
pageContext.setAttribute("payPeriods", payPeriods);
%>
<center>
<h3>Alternating Color Test</h3>
<table border="1">
<tr bgcolor="#ffad00">
<th>Row Number</th>
<th>Value</th>
</tr>
<c:forEach items="${payPeriods}" var="payPeriod" varStatus="status">
<c:choose>
<c:when test="${(status.count % 2) == 0}">
<tr bgcolor="#77ccff">
</c:when>
<c:otherwise>
<tr bgcolor="#ffffff">
</c:otherwise>
</c:choose>
<td>
<c:out value="${status.count}"/>
</td>
<td>
<c:out value="${payPeriod}"/>
</td>
</tr>
</c:forEach>
</table>
</center>It's not exactly your case, but it does show the alternating colors. I'll leave the changes to you. -
How to set table alternating color
how do i set the properties of table with alternating color
properties :
design : alternating
it is like normal table , although i have change the properties of design to alternating.....
pls adviceHi Yzme,
When you change the Table Design propety to "<b>alternate</b>", change the <b>readOnly </b>property to <b>"true</b>". Then the table will display the alternate colors but the table will be read only.
Refer to the following thread also:
Re: Problem with table design in 2004s
Regards,
Jhansi -
Getting alternative colors in output list
Hi Frnds,
I have to provide alternative colors for each row for my report which i m unable to do.
Actually i am getting colors in my header but i need alternative colors for each row in my output.
below i am providing my code.
<code>
REPORT ZVVK_DOWNLOAD.
TYPE-POOLS RSDS.
DATA : IT_TABLEKEY LIKE COND_FLDS OCCURS 0 WITH HEADER LINE,
IT_TABLEDAT LIKE COND_FLDS OCCURS 0 WITH HEADER LINE,
IT_PRICING LIKE COND_RECS OCCURS 0 WITH HEADER LINE,
IT_RANGE TYPE RSDS_FRANGE_T,
IT_KNUMH LIKE COND_KNUMH OCCURS 0 WITH HEADER LINE .
DATA : IT_KONH LIKE KONHDB OCCURS 0 WITH HEADER LINE,
IT_KONP LIKE KONPDB OCCURS 0 WITH HEADER LINE,
IT_KONM LIKE COND_KONM OCCURS 0 WITH HEADER LINE,
IT_KONW LIKE COND_KONW OCCURS 0 WITH HEADER LINE,
IT_BAPI_COND_RECS LIKE BAPICONDCT OCCURS 0 WITH HEADER LINE,
IT_BAPI_KEY_FIELDS LIKE BAPICONDDD OCCURS 0 WITH HEADER LINE,
IT_BAPI_DATA_FIELDS LIKE BAPICONDDD OCCURS 0 WITH HEADER LINE,
IT_COND_HEADER LIKE BAPICONDHD OCCURS 0 WITH HEADER LINE,
IT_COND_ITEM LIKE BAPICONDIT OCCURS 0 WITH HEADER LINE,
IT_COND_QUANTITY_SCALE LIKE BAPICONDQS OCCURS 0 WITH HEADER LINE,
IT_COND_VALUE_SCALE LIKE BAPICONDVS OCCURS 0 WITH HEADER LINE,
IT_T682I LIKE T682I OCCURS 0 WITH HEADER LINE.
DATA : WA_RANGES LIKE LINE OF IT_RANGE,
WA_SELOPT LIKE LINE OF WA_RANGES-SELOPT_T.
*Data declarations for displaying downloaded file into application server in output list
TYPES: BEGIN OF T_VARINFO,
FLAG TYPE C,
OLENGTH TYPE X,
LINE LIKE RALDB-INFOLINE,
END OF T_VARINFO.
DATA:TABLES TYPE TRDIR-NAME OCCURS 0 WITH HEADER LINE ,
INFOTAB TYPE T_VARINFO OCCURS 0 WITH HEADER LINE.
SELECT-OPTIONS SO_DATE FOR SY-DATUM.
PARAMETERS : P_CONTAB TYPE T681-KOTABNR OBLIGATORY,
FILENAME(128) DEFAULT '/usr/sap/tmp/' LOWER CASE.
*start-of-selection
START-OF-SELECTION.
IF NOT SO_DATE[] IS INITIAL.
WA_RANGES-FIELDNAME = 'DATBI'.
LOOP AT SO_DATE.
MOVE-CORRESPONDING SO_DATE TO WA_SELOPT.
APPEND WA_SELOPT TO WA_RANGES-SELOPT_T.
ENDLOOP.
APPEND WA_RANGES TO IT_RANGE.
ENDIF.
*--For Datarevin for condition table
CALL FUNCTION 'SELECT_RECORDS_FROM_COND_TABLE'
EXPORTING
I_KVEWE = 'A'
I_KOTABNR = P_CONTAB
I_BLOCKSIZE = 0
I_RANGES = IT_RANGE
TABLES
T_COND_TABLES_KEY_FIELDS = IT_TABLEKEY
T_COND_TABLES_DATA_FIELDS = IT_TABLEDAT
T_COND_RECORD_PRICING = IT_PRICING
EXCEPTIONS
INVALID_USAGE = 1
INVALID_TABLE = 2
DIFFERENT_PARAMETERS_IN_BLOCK = 3
LASTBLOCK_ALREADY_SENT = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SELECT * INTO TABLE IT_T682I
FROM T682I
WHERE KOTABNR = P_CONTAB.
LOOP AT IT_PRICING.
IT_KNUMH-KNUMH = IT_PRICING-KNUMH.
APPEND IT_KNUMH.
ENDLOOP.
CALL FUNCTION 'SELECT_PRICES_DETAILS'
TABLES
T_KNUMH = IT_KNUMH
T_KONH = IT_KONH
T_KONP = IT_KONP
T_KONM = IT_KONM
T_KONW = IT_KONW.
CALL FUNCTION 'CRS_MAP_COND_INTO_BAPISTUCTURE'
EXPORTING
I_OPERATION = '005'
TABLES
TI_COND_RECS = IT_PRICING
TI_KEY_FIELDS = IT_TABLEKEY
TI_DATA_FIELDS = IT_TABLEDAT
TI_KONHDB = IT_KONH
TI_KONPDB = IT_KONP
TI_VKONM = IT_KONM
TI_VKONW = IT_KONW
TO_BAPI_COND_RECS = IT_BAPI_COND_RECS
TO_BAPI_KEY_FIELDS = IT_BAPI_KEY_FIELDS
TO_BAPI_DATA_FIELDS = IT_BAPI_DATA_FIELDS
TO_COND_HEADER = IT_COND_HEADER
TO_COND_ITEM = IT_COND_ITEM
TO_COND_QUANTITY_SCALE = IT_COND_QUANTITY_SCALE
TO_COND_VALUE_SCALE = IT_COND_VALUE_SCALE.
IF SY-SUBRC <> 0.
ENDIF.
For displaying filename and number of records downloaded in application server
DATA:VAR_INFO TYPE TABLE OF RSVARADMIN WITH HEADER LINE ,
VAR_NAME TYPE TABLE OF RSVARRANGE WITH HEADER LINE .
CALL FUNCTION 'RS_VARIANT_ADMIN_DATA'
EXPORTING
CURR_REPORT = SY-REPID
TABLES
VARIANT_INFO = VAR_INFO
VARIANT_NAMES = VAR_NAME.
CALL FUNCTION 'PRINT_SELECTIONS'
EXPORTING
MODE = TABLES
RNAME = SY-REPID "program name
RVARIANTE = VAR_INFO-VARIANT "varient name
TABLES
INFOTAB = INFOTAB.
LOOP AT INFOTAB.
WRITE / INFOTAB-LINE.
ENDLOOP.
WRITE:/1(80) SY-ULINE .
WRITE:/1 SY-VLINE ,
3 'The output filename:' COLOR 7,
49 sy-vline,
50 'no of records downloaded:' COLOR 6 ,
80 SY-VLINE.
WRITE:/1(80) SY-ULINE .
Where used
PERFORM DATA_DWNLD TABLES IT_T682I USING P_CONTAB 'WHERE_USED' 'DAT' 'xls'.
*IT_BAPI_COND_RECS
PERFORM DATA_DWNLD TABLES IT_BAPI_COND_RECS USING P_CONTAB 'COND_RECS' 'BIN' 'txt'.
IT_BAPI_KEY_FIELDS
PERFORM DATA_DWNLD TABLES IT_BAPI_KEY_FIELDS USING P_CONTAB 'KEY_FIELDS' 'ASC' 'txt'.
KEY_FIELDS
PERFORM DATA_DWNLD TABLES IT_BAPI_KEY_FIELDS USING P_CONTAB 'KEY_FIELDS' 'DAT' 'xls'.
*DATA_FIELDS
PERFORM DATA_DWNLD TABLES IT_BAPI_DATA_FIELDS USING P_CONTAB 'DATA_FIELDS' 'BIN' 'txt'.
*COND_HEADER
PERFORM DATA_DWNLD TABLES IT_COND_HEADER USING P_CONTAB 'COND_HEADER' 'BIN' 'txt'.
*COND_ITEM
PERFORM DATA_DWNLD TABLES IT_COND_ITEM USING P_CONTAB 'COND_ITEM' 'BIN' 'txt'.
*COND_QUANTITY_SCALE
PERFORM DATA_DWNLD TABLES IT_COND_QUANTITY_SCALE USING P_CONTAB 'QUANTITY_SCALE' 'BIN' 'txt'.
*COND_VALUE_SCALE
PERFORM DATA_DWNLD TABLES IT_COND_VALUE_SCALE USING P_CONTAB 'VALUE_SCALE' 'BIN' 'txt'.
*& Form DATA_DWNLD
text
FORM DATA_DWNLD TABLES P_TAB
USING P_CONTAB TYPE ANY
P_TABNAME TYPE ANY
P_FILETYPE TYPE CHAR10
P_EXT TYPE ANY.
DATA: L_FILE TYPE STRING,
V_LINES TYPE I .
DESCRIBE TABLE P_TAB LINES V_LINES.
CONCATENATE 'ORG' P_CONTAB P_TABNAME
INTO L_FILE SEPARATED BY '_'.
CONCATENATE FILENAME L_FILE '.' P_EXT INTO L_FILE.
CONDENSE L_FILE.
FIELD-SYMBOLS : <FS_DATA> TYPE ANY.
OPEN DATASET L_FILE FOR OUTPUT IN BINARY MODE .
IF SY-SUBRC NE 0.
EXIT.
ELSE.
LOOP AT P_TAB ASSIGNING <FS_DATA>.
TRANSFER <FS_DATA> TO L_FILE .
ENDLOOP.
ENDIF.
CLOSE DATASET L_FILE.
For displaying filename and number of records downloaded in application server
WRITE:/1 SY-VLINE ,
3 L_FILE ,
49 sy-vline,
50 v_lines,
80 SY-VLINE.
WRITE:/1(80) SY-ULINE .
ENDFORM. " DOWNLOAD_FILE
</code>Hi Satya,
Try this .
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.
Populate color variable with colour properties
Char 1 = C (This is a color property)
Char 2 = 3 (Color codes: 1 - 7)
Char 3 = Intensified on/off ( 1 or 0 )
Char 4 = Inverse display on/off ( 1 or 0 )
i.e. wa_ekko-line_color = 'C410'
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
For more info ,
http://www.sapdev.co.uk/reporting/alv/alvgrid_color.htm
Regards,
Chitra -
How to Replicate Standard Alternating Colors using XSL-FO??
Hi All
I am using Apex_3.1, Apache fop and Standard Report Printing to produce PDF reports. We would like to replicate the theme 12 (Blue) standard alternating colors in our PDF output.
I do realise that this involves modifying the xsl-fo and have tried putting color attributes in the xsl-fo (Generic Columns). I know I can just put the color in the apex print settings but that doesn't give me the alternating colors.
Edited by: Keith Jamieson on Oct 22, 2009 4:04 PMI believe this is the section of the xsl template that needs modified.
<fo:table-body>
<xsl:for-each select=".//ROW">
<fo:table-row >
#PRN_TEMPLATE_BODY_ROW#
</fo:table-row>
</xsl:for-each>
</fo:table-body>and I have found this example which appears to do what I require.
<xsl:template name="table.row.properties">
<xsl:variable name="tabstyle">
<xsl:call-template name="tabstyle"/>
</xsl:variable>
<xsl:variable name="bgcolor">
<xsl:call-template name="dbfo-attribute">
<xsl:with-param name="pis" select="processing-instruction('dbfo')"/>
<xsl:with-param name="attribute" select="'bgcolor'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="rownum">
<xsl:number from="tgroup" count="row"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$bgcolor != ''">
<xsl:attribute name="background-color">
<xsl:value-of select="$bgcolor"/>
</xsl:attribute>
</xsl:when>
<xsl:when test="$tabstyle = 'striped'">
<xsl:if test="$rownum mod 2 = 0"
<xsl:attribute name="background-color">#EEEEEE</xsl:attribute>
</xsl:if>
</xsl:when>
</xsl:choose>
</xsl:template>Every time I try and add that section to the code, I end up breaking it and not getting any pdf output :(
eg my latest attempt
<?xml version = '1.0' encoding = 'utf-8'?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink">
<xsl:variable name="_XDOFOPOS" select="''"/>
<xsl:variable name="_XDOFOPOS2" select="number(1)"/>
<xsl:variable name="_XDOFOTOTAL" select="number(1)"/>
<xsl:variable name="_XDOFOOSTOTAL" select="number(0)"/>
<xs1:variable name="rownum" />
<xsl:choose>
<xsl:when test="$bgcolor != ''">
<xsl:attribute name="background-color">
<xsl:value-of select="$bgcolor"/>
</xsl:attribute>
</xsl:when>
<xsl:when test="$tabstyle = 'striped'">
<xsl:if test="$rownum mod 2 = 0">
<xsl:attribute name="background-color">#EEEEEE</xsl:attribute>
</xsl:if>
</xsl:when>
</xsl:choose>
<xsl:attribute-set name="padding">
<xsl:attribute name="padding-bottom">0.25pt</xsl:attribute>
<xsl:attribute name="padding-top">0.25pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="text">
<xsl:attribute name="text-align">start</xsl:attribute>
<xsl:attribute name="orphans">2</xsl:attribute>
<xsl:attribute name="start-indent">0.0pt</xsl:attribute>
<xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
<xsl:attribute name="padding-top">0.0pt</xsl:attribute>
<xsl:attribute name="end-indent">0.0pt</xsl:attribute>
<xsl:attribute name="padding-bottom">0.0pt</xsl:attribute>
<xsl:attribute name="height">0.0pt</xsl:attribute>
<xsl:attribute name="widows">2</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="align-left">
<xsl:attribute name="text-align">left</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="align-center">
<xsl:attribute name="text-align">center</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="align-right">
<xsl:attribute name="text-align">right</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="footer">
<xsl:attribute name="text-align">right</xsl:attribute>
<xsl:attribute name="start-indent">5.4pt</xsl:attribute>
<xsl:attribute name="end-indent">5.4pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="text_2">
<xsl:attribute name="start-indent">5.4pt</xsl:attribute>
<xsl:attribute name="end-indent">23.4pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="text_20">
<xsl:attribute name="height">13.872pt</xsl:attribute>
<xsl:attribute name="end-indent">5.4pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="text_0">
<xsl:attribute name="end-indent">5.4pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="page-header">
<xsl:attribute name="color">#PAGE_HEADER_FONT_COLOR#</xsl:attribute>
<xsl:attribute name="font-family">#PAGE_HEADER_FONT_FAMILY#</xsl:attribute>
<xsl:attribute name="white-space-collapse">false</xsl:attribute>
<xsl:attribute name="font-size">#PAGE_HEADER_FONT_SIZE#pt</xsl:attribute>
<xsl:attribute name="font-weight">#PAGE_HEADER_FONT_WEIGHT#</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="page-footer">
<xsl:attribute name="color">#PAGE_FOOTER_FONT_COLOR#</xsl:attribute>
<xsl:attribute name="font-family">#PAGE_FOOTER_FONT_FAMILY#</xsl:attribute>
<xsl:attribute name="white-space-collapse">false</xsl:attribute>
<xsl:attribute name="font-size">#PAGE_FOOTER_FONT_SIZE#pt</xsl:attribute>
<xsl:attribute name="font-weight">#PAGE_FOOTER_FONT_WEIGHT#</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="body-font">
<xsl:attribute name="height">12.0pt</xsl:attribute>
<xsl:attribute name="font-family">#BODY_FONT_FAMILY#</xsl:attribute>
<xsl:attribute name="white-space-collapse">false</xsl:attribute>
<xsl:attribute name="font-size">#BODY_FONT_SIZE#pt</xsl:attribute>
<xsl:attribute name="font-weight">#BODY_FONT_WEIGHT#</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="page-number">
<xsl:attribute name="height">13.872pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="header-font">
<xsl:attribute name="height">#HEADER_FONT_SIZE#pt</xsl:attribute>
<xsl:attribute name="font-family">#HEADER_FONT_FAMILY#</xsl:attribute>
<xsl:attribute name="white-space-collapse">false</xsl:attribute>
<xsl:attribute name="font-size">#HEADER_FONT_SIZE#pt</xsl:attribute>
<xsl:attribute name="font-weight">#HEADER_FONT_WEIGHT#</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="border">
<xsl:attribute name="border-top">#BORDER_WIDTH#pt solid #BORDER_COLOR#</xsl:attribute>
<xsl:attribute name="border-bottom">#BORDER_WIDTH#pt solid #BORDER_COLOR#</xsl:attribute>
<xsl:attribute name="border-start-width">#BORDER_WIDTH#pt</xsl:attribute>
<xsl:attribute name="border-start-color">#BORDER_COLOR#</xsl:attribute>
<xsl:attribute name="border-start-style">solid</xsl:attribute>
<xsl:attribute name="border-end-width">#BORDER_WIDTH#pt</xsl:attribute>
<xsl:attribute name="border-end-color">#BORDER_COLOR#</xsl:attribute>
<xsl:attribute name="border-end-style">solid</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="cell">
<xsl:attribute name="background-color">#BODY_BG_COLOR#</xsl:attribute>
<xsl:attribute name="color">#BODY_FONT_COLOR#</xsl:attribute>
<xsl:attribute name="padding-start">5.15pt</xsl:attribute>
<xsl:attribute name="vertical-align">top</xsl:attribute>
<xsl:attribute name="padding-top">0.0pt</xsl:attribute>
<xsl:attribute name="padding-end">5.15pt</xsl:attribute>
<xsl:attribute name="number-columns-spanned">1</xsl:attribute>
<xsl:attribute name="height">0.0pt</xsl:attribute>
<xsl:attribute name="padding-bottom">0.0pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="header-color">
<xsl:attribute name="background-color">#HEADER_BG_COLOR#</xsl:attribute>
<xsl:attribute name="color">#HEADER_FONT_COLOR#</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="master0" margin-left="66.6pt" margin-right="66.6pt" page-height="#PAGE_HEIGHT#pt" page-width="#PAGE_WIDTH#pt" margin-top="36.0pt" margin-bottom="36.0pt">
<fo:region-before region-name="region-header" extent="54.0pt"/>
<fo:region-body region-name="region-body" margin-top="54.0pt" margin-bottom="54.0pt"/>
<fo:region-after region-name="region-footer" extent="54.0pt" display-align="after"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="master0">
<xsl:variable name="_PW" select="number(#PAGE_HEIGHT#)"/>
<xsl:variable name="_PH" select="number(#PAGE_WIDTH#)"/>
<xsl:variable name="_ML" select="number(72.0)"/>
<xsl:variable name="_MR" select="number(72.0)"/>
<xsl:variable name="_MT" select="number(90.0)"/>
<xsl:variable name="_MB" select="number(90.0)"/>
<xsl:variable name="_HY" select="number(36.0)"/>
<xsl:variable name="_FY" select="number(36.0)"/>
<xsl:variable name="_SECTION_NAME" select="string('master0')"/>
<fo:static-content flow-name="region-header">
<fo:block xsl:use-attribute-sets="text text_2 text_0 #PAGE_HEADER_ALIGNMENT#">
<fo:inline xsl:use-attribute-sets="page-header">#PAGE_HEADER#</fo:inline>
</fo:block>
</fo:static-content>
<fo:static-content flow-name="region-footer">
<fo:block xsl:use-attribute-sets="text footer">
<fo:inline xsl:use-attribute-sets="body-font page-number">
<fo:page-number/>
</fo:inline>
</fo:block>
<fo:block xsl:use-attribute-sets="text text_2 #PAGE_FOOTER_ALIGNMENT#">
<fo:inline xsl:use-attribute-sets="page-footer">#PAGE_FOOTER#</fo:inline>
</fo:block>
</fo:static-content>
<fo:flow flow-name="region-body">
<fo:block xsl:use-attribute-sets="padding">
<fo:table start-indent="0.0pt">
<xsl:variable name="_XDOFOPOS2" select="number(1)"/>
<xsl:variable name="_XDOFOTOTAL" select="number(1)"/>
#PRN_TABLE_CELLS#
<fo:table-header>
<fo:table-row>
#PRN_TEMPLATE_HEADER_ROW#
</fo:table-row>
</fo:table-header>
<fo:table-body>
<xsl:for-each select=".//ROW">
<xs1:choose>
<xs1:when> test = ".//ROW mod 2 = 0"
<fo:table-row bgcolor=#EEEEEE>
#PRN_TEMPLATE_BODY_ROW#
</fo:table-row>
</xs1:when>
<xs1:when> test = ".//ROW mod 1 = 0"
<fo:table-row bgcolor=#DDDDDD>
#PRN_TEMPLATE_BODY_ROW#
</fo:table-row>
</xs1>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:block>
<fo:block xsl:use-attribute-sets="text text_2 text_20">
<fo:inline id="{concat('page-total-', $_SECTION_NAME, $_XDOFOPOS)}"/>
<fo:inline id="{concat('page-total', $_XDOFOPOS)}"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet> -
Alternating Color Subreport details
I've created a subreport with detail lines that can be suppressed if the value of my database field is zero. So on some reports I could have 7 lines.. and some I could have three (for example) depending on the data. I have to make this table an alternating color table. So if the first line has a white background, the next line needs to have a silver background.. if the line before a line has a silver background.. that line needs to have a while background.
Example of report with 5 detail lines showing:
White
Silver
White
Silver
White
Example with 8 detail lines showing:
White
Silver
White
Silver
White
Silver
White
Silver
There are only 10 detail lines available and the first one is always white. I've been trying to write a formula in the background color properties in my section expert for each detail line that would do this for me.. I was going for something like:
If previous value is crWhite then
formula = crSilver
else
formula = crWhite
end if
I know this is wrong because I can't find a function that will do it for me. Does anyone know a simple way to do this?
Thanks!Is this in a detail format or group header/footer? Is the format conditionally suppressed? These will change the formula. If it's in a group header/footer, use (basic syntax):
global toggleColor as number
toggleColor = 1 - toggleColor
if toggleColor = 0 then
formula = crSilver
else
formula = crWhite
end if
If records are conditionally suppressed, use the formula above, but add an IF statement around the toggleColor = toggleColor - 1 line with the condition "NOT (whatever your suppression formula is)".
HTH,
Carl -
Creating vertical reports with alternating colored rows
I wanted to create a vertical report with alternating colored rows. Creating a vertical report template was not a problem but I am not able to use different bgcolor for alternating rows.
As I mentioned above, I used the follwoing code to generate the vertical report BUT i could not get the alternating rows in a diffrent color:
Before Rows:
<table class="default2">
Before Each Row:
OMIT
Column Template 1
<tr><td bgcolor="#CCCC99" width="200"><font color="#336699" #ALIGNMENT#><b> #COLUMN_HEADER#</td> <td width="500">#COLUMN_VALUE#</td></tr>
Column Template 1 Condition
Use for Odd rows
Column Template 1
<tr><td bgcolor="#CCCC99" width="200"><font color="#336699" #ALIGNMENT#><b> #COLUMN_HEADER#</td> <td bgcolor="#FFFFFF" width="500">#COLUMN_VALUE#</td></tr>
Column Template 1 Condition
Use for Even rows
After Each Row
OMIT
After Rows
</table> -
Change the background color of a table created by ADDT (Login)
I am trying to change the background color of a table in the login form created by the developer's toolbox. I then go and select the table and change the background color. But it has no effect. The only insight I have is when I delete this "" from the Action in the form, then the table's background color changes. As far as I can tell this line of code is only return the url of the page.
I am not understanding something.
Does anyone have any insight?
Thanks!the table is linked using a CSS rule..
the CSS rules comes from something called Skins..
see mxkollection2.css.
KT_XXX are the class ID's for table names.
if u change this rule it will effect all the tables which use that rule in ur whole website.
u can try switching skins from ADDT control panel.
KT_tngtable is the tables css rule name defined in skins /Skinname/tng.css
hope this helps u ..
mohnkhan
http://www.mohitech.com -
Color transparency in table cells
Hi;
Is there any way to adjust the opacity of the background
color of a table
cell ?
Thanks;
PatThanks Murray. I'll give it a try.
Pat
"Murray *ACE*" <[email protected]> wrote
in message
news:fb44ib$6r1$[email protected]..
> No - not background color. But you can make a PNG image
with adjusted
> opacity and use that image as a cell background - be
aware that unadjusted
> IE6 and earlier doesn't support PNG transparency. A
google search will
> reveal workarounds for you, though.
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
>
http://www.dreamweavermx-templates.com
- Template Triage!
>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
>
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
> ==================
>
>
> "Pat Jones" <[email protected]> wrote in
message
> news:fb447e$6cf$[email protected]..
>> Hi;
>>
>> Is there any way to adjust the opacity of the
background color of a table
>> cell ?
>>
>> Thanks;
>>
>> Pat
>>
>
> -
Hi,
I am new to the Jdeveloper and also for the adf components.Actually i am working with the project which has already designed.Now i have to change the look n feel.
I want to change the color of the table colums.So could u tell me in which file i have to change and how.
I put in the jdeveloper.css like this ......
column.cell-number-band{
color :Teal
And in the adf-faces-config.xml i had only "oracle" type of skin.
I have to finish the work tomarrow itself......
So anybody helps me it will be greatfull me.Hi Frank,
Thanks for the reply .I will try to create custom skin file.And one thing i tried to change the columns properties.I can see the changes on the Jdeveloper editor.But when i run on the server,I could't see the changes.....is there any way to change the column colors at run time????????
I appreciate ur response......
Thanks -
Alternatives of HR obsolete tables
Hi all,
There are few HR tables of 4.7 which are obsolete in ecc6.0.
i want the alternatives of all these tables.
TABLE
PA9008
PA9044
PA9009
PA9046
PB9005
PA9005
PA9006
PA9040
PB9008
PB9046
PA9029
PA9999
PB9017
PA9002>
gautham chakraverthi wrote:
> These r not standard tables provided by sap,but created manually due to addition of new infotypes in ur system.> so u have to create them again and also the enhancements r also had to be copied manually.
You don't need to (re)create them, when you Upgrade! All custom objects will be automatically carried over to the new system.
~Suresh -
Different color lines in tables?
Hi
I want to create a predefined table (tag) with lines of different colors. The table header is dark blue and I want to make the inside column lines white. But only in the header. The table body cells are white with black column lines. I don't want to insert a table first and then use the "custom ruling&shading..." every time I want to insert this table in my document.
Has anyone any solution to this?
BR/BjörnCan Frame save colored table rules and shading?
Hi,
Are there any Frame 10 users who can tell me whether Frame will save a table with colored rules or shading in Table Designer? I'm on Frame 7.2 and I've got the hang of the clunky UI. I designed a table layout with colored rules and shading, then used it to create a new table format. When I inserted a new table using that format, all the color reverted to black.
This is an ablility that Adobe should have implemented by now. If it does, then that gives me one more reason to get Frame 10 in this shop.
Yours,
Michael F
======= -
Change background color of a table based on table cell values quickly.
Is there a more effecient way to change the background color of a table based on the cell values of the table?
I can do this cell-by-cell using the property node, but it is very slow. It helps a little by deferring panel update, but it is still slow. Is there a better way?
Thanks.
IanIf you want to color each cell according to the value, you need to do it one cell at a time and the above answers don't apply.
You can dramatically speed up things by defering front panel updates for the duration of the operation.
(sample code can be seen in the top picture here)
EDIT: I noticed you tried this already. Can you show us your code?
How many cells need to be colored on average? If there are not that many, first write the background color using -2,-2, the only write the few cells to be colored, skipping the rest.
How big is the table? If it is much bigger than the table indicator, all you need is to color the visible parts whenever the data or the scroll position changes.
LabVIEW Champion . Do more with less code and in less time . -
Alternating colors with drilldown groups not showing in the primary group.
Hi all,
Not sure if it is possible in SSRS but... My alternating colors work in my row groups of the drilldown group, but I also want the primary group (in my screenshot category) to be colored as well. Is this possible at all when my structure is like below?Hi Yvanlathem,
According to your description, you want to set the textbox background color only for the even rows within child group. Right?
In this scenario, we can put expression into Fill tab in Textbox Properties. We can use IIF() and RowNumber() to make the background color only apply on the even rows. Try the expression below:
=IIF(RowNumber("Parent Group Name") mod 2=0,"Color1","Color2")
We have tested in our local environment. It looks like below:
If you have any question, please feel free to ask.
Best Regards,
Simon Hou
Maybe you are looking for
-
How do I delete does file from the list ? they are not on the Hard Disk any more. How do I make the organizer open in all the screen. when i will bay the box version (its not out in ISRAEL yet ...) and uninstall the trill version all my TAG and Albu
-
Branch Office DC Demand Dial VPN connection keeps failing
here is me issue Our Branch Office DC is connected to Main Office DC with a Demand Dial Connection in RRAS Everything is connected fine for a little bit then its like the connection just gives out, it stays connected but i cannot ping the branch offi
-
Customer sales report by customer category
Hi to all, as we have maintained a price lists customer wise and the attached the customer according to its category.so when i apply a price change to a specific category it ill automatically applicable to all the customer under this category. now my
-
Why can't I export a Libray file from Lr to Hard drive? I keep getting a notice that 'Some export operations were not performed' As far as I know I am doing nothing different and cannot see what I am doing wrong. Any ideas?
-
I/o slave wait ???
What does i/o slave wait event means(apart from idle wait event class), what it is doing? I see some times when i run query, this thing appears in wait events, and doesn't goes off, why/for what it is waiting? Appreciate for clear cut description on