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
Similar Messages
-
How to print alternative colors in detail records in BI publisher?
Hi,
i have child or detail records. But i want to print them first record in red color,then second record in green color. Again third record color again in red color and fourth record again in green color.
Thanks,
laxHave two form fields after the grouping form field and use the following code in the first conditional form field:
<?if@row:number(position() mod 2)=0?><?attribute@incontext:background-color;'red'?><?end if?>
Include this in the second conditional format field.
<?if@row:number(position() mod 2)!=0?><?attribute@incontext:background-color;'green'?><?end if?>
Thanks,
Bipuser -
Alternating background color in details section
I am attempting to use the alternating color feature in the details section for a listing of data, where you can alternate the color based on a condition. What my client wants is to have the color change based on the first letter of the names, which are in alphabetical order. At first I thought this was simple: I just put an if statement cycling through, using every other letter of the alphabet. This worked fabulously until I realized that if there were no names for a particular letter (such as Q), that it would not alternate in that instance - the "P" and the "R" would both be white. Does anyone have a solution to this? Is there a way I can change it based on everytime the first letter changes? Thanks in advance!
This should do the trick for you...
Global NumberVar x := IF RecordNumber = 1 THEN 1 ELSE x;
Global StringVar l := IF RecordNumber = 1 THEN LEFT({TableName.LastName}, 1) ELSE l;
x := IF l = LEFT({TableName.LastName}, 1) THEN x ELSE x + 1;
l := LEFT({TableName.LastName}, 1);
IF x MOD 2 = 1 THEN crSilver ELSE crNoColor;
HTH,
Jason -
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 -
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> -
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> -
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. -
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 -
Alternating Background color for Detail Records
Post Author: jbecker
CA Forum: Formula
I have found other posts concerning thing similar to this but not quite the same. I have an 8.5 report that needs to have everyother record in the detail section to be a different color. The problem is that it is counting all the records not the ones that are filtered out and displayed in the details section. I have played around with the "If RecordNumber Mod 2 = 0 Then crSilver Else crNoColor" formula but it doesn't work right. I am thinking that my formula needs to be applied last but how do I accomplish that? Any and all help will be greatly appreciated. Thanks,JerryPost Author: jbecker
CA Forum: Formula
What I mean, excuse my newbiness, is the formula is in the formatting of the detail section which is being applied on the first pass. The bottom of the report shows the record count on the first pass and the report is showing about half as many. Does that make sense? So my question is, how do I use your suggestion? I am somewhat of an inexperienced user and need all the help someone can offer.
Thanks,
Jerry -
Change colors, in detail
I found that selecting a high contrast Theme is the only way to change some details of each of the different colors (Hyperlinks, Disabled text, Selected text, etc.) of a window. When a high contrast screen is selected, I can search for "change
color" and select "change the color of your taskbar and window borders" and I'll get to a "Color and Appearance" screen that is not available for any non-high contrast theme. However, even this added ability to customize the
screen colors falls far short of complete control.
My custom Yahoo! page looses the text coloration differences to show stocks that are going up (green) vs. going down (red). I also seem to have very little control of Outlook coloration. As I am on my PC for most of every working day, I need
the ability to provide good contrasting colors on all my window screens. I am disappointed that Microsoft has not fine tuned this feature by now. Most everything else about 8.1 I like quite a bit.
William FearnYou're no longer allowed to customize the colors to the extent you used to be able to do so. Microsoft has reduced our ability to make the desktop easier to use by configuring or "theming" it with something more pleasing than the (IMO)
fairly broken theme they provide. I personally find the loss of drop shadows tremendously reduces utility.
I believe it's a plot by Microsoft Marketing to try to get people to dislike using the desktop so that they can get more support for Metro/Modern.
It ain't working!
There are folks who have figured out how to "hack" the OS to enable better theme support, and one who's even re-implemented the Aero Glass effects. Some of them hang out at
msfn.org. These things can be employed to make it easier on the eyes (I've managed some improvement).
As far as Outlook 2013 / 365 goes... There's little hope, since even a theme replacement doesn't affect it. The Office team rolled their own UI, probably to help their Marketing department out. On the Microsoft forum elsewhere
is
a thread with something like 700 responses from people who claim their eyes are bleeding from trying to use the latest version of Office. Most claim Office 2010 was far better.
Here's the really disturbing part: Microsoft isn't releasing stuff by accident. They're actively making the desktop harder to use - on purpose. And their marketing is trying to turn it into an "Emperor's New Clothes"
situation with concepts/terms like "digitally authentic" and "skeuomorphism is bad".
Yes, it stinks for those of us who work with the desktop day in and day out. You're not alone. But you won't find many folks who'll stand up and agree with you, because pragmatism is not
fashionable.
-Noel
Detailed how-to in my eBooks:
Configure The Windows 7 "To Work" Options
Configure The Windows 8 "To Work" Options -
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;
} -
Crystal report subreport details
hi ...
i have created a c# windows application and i have used crystal report tool for reporting purpose , i have a work order report that preview the work order details and it's own production details , this work order report has a sub report for production details
but i have faced a problem when organize this sub report , this final form for this report that i want is like to this picture
my two problems is :
1- i want to display sub report data horizontally report have much data , i have configured to layout of the details section to preview it across then down and it succeeded to preview but if i try to preview it in 'down then across' mode it preview them
in another page if report have much data .
2- if i set the details section of sub report to preview data in 'down then across' mode the summary will displayed on the first column but i want to display summary at the end of data .
thanks for attentionHi,
I’m sorry for the issue that you are hitting now.
This crystal report has been removed after the Visual Studio 2010.For this issue, I recommended to consult the report provider directly, I think they can give more precise troubleshooting.
http://www.crystalreports.com/
Thanks for your understanding.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Using alternative color profiles in Aperture
I have used many RAW Programs in the past. Now it is Aperture's turn. I have been a Mac user since 1994 and I am glad to see a program like Aperture.
My question is about Alternate Color Profiles. I have not figured out how to use an alternate color profile for the images in Aperture. This can be done in PhotoShop, Capture One, and DPP for Canon. I have many wide gamut profiles I like to work with.
My work around it to export the image to PhotoShop and apply the wider gamut profile to the image. I noticed that Aperture exports the image in Adobe RGB (1998). By doing so Aperture has already pared down the size of the color gamut of the image.
How can I set Aperture to work in or export images in a wider gamut color profile?
Thanks,
Rob EckertThis may be of help:
http://support.apple.com/kb/ht2026
Setting your colorspace in Aperture
In contrast with Adobe Photoshop, you don't have to set your "workspace." Instead, Aperture will always work in a wide gamut, except for when you apply Onscreen Proofing, which shows you how your work should look in final output.
Perhaps the Onscreen Proofing feature will do what you want.
And this for an overview:
http://documentation.apple.com/en/aperture/usermanual/index.html#chapter=A%26sec tion=1%26tasks=true
Maybe you are looking for
-
Can't load purchased items on iPhone or iPad
Purchased items will not appear. iTunes crashes when attempting load.
-
Import a CSV-file into a new table?
hi, im trying to import a csv file into a new tabel, but i just cant make it work :-O. what are the steps to do that? im using sql developer version1.1.2.25. thanks for helping :-)
-
How to use temporary interface in another interface as derived table in 10g
Hi , Can somebody please tell me how to use temporary interface in another interface as derived table in 10g. I have an option in odi 11g to this task.But i am working on odi 10g for my project.So that please help me to do this task. I can able to cr
-
The following code takes more execution time..How can we reduce the execution time through performance tuning.. SELECT DISTINCT bebeln AS bktxt bebelp amblnr avgart bbwart bmatnr bwerks blifnr bmenge bebeln b~erfmg INTO CORRESPONDING FIELDS OF TABLE
-
Oracle Auditing: capturing changed password terminal id
ORACLE 10.2.0.4 I wrote the following code to display email notifications for any user account that had an invalid login attempt. select USERNAME, timestamp, terminal from dba_audit_session where returncode = 1017 and timestamp > sysdate - 62/(24*60)