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 PM

I 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>

Similar Messages

  • How to do Grouping of Workbooks using XSL in Discoverer Viewer?

    Hello Discoverer Experts,
    My question is related to grouping of workbook names using XSL in Discoverer Viewer. This is a sample xml data file which contains 6 workbooks.
    <eul>
         <workbooks>
              <workbook>
                   <wb_name>Purchasing Workbook 1</wb_name>
                   <worksheets>
                        <worksheet>
                             <ws_name>A</ws_name>
                        </worksheet>
                        <worksheet>
                             <ws_name>B</ws_name>
                        </worksheet>
                   </worksheets>
              </workbook>
              <workbook>
                   <wb_name>Purchasing Workbook 2</wb_name>
                   <worksheets>
                        <worksheet>
                             <ws_name>C</ws_name>
                        </worksheet>
                        <worksheet>
                             <ws_name>D</ws_name>
                        </worksheet>
                   </worksheets>
              </workbook>
              <workbook>
                   <wb_name>Manufacturing Workbook 1</wb_name>
                   <worksheets>
                        <worksheet>
                             <ws_name>E</ws_name>
                        </worksheet>
                        <worksheet>
                             <ws_name>F</ws_name>
                        </worksheet>
                   </worksheets>
              </workbook>
              <workbook>
                   <wb_name>Manufacturing Workbook 2</wb_name>
                   <worksheets>
                        <worksheet>
                             <ws_name>G</ws_name>
                        </worksheet>
                        <worksheet>
                             <ws_name>H</ws_name>
                        </worksheet>
                   </worksheets>
              </workbook>
              <workbook>
                   <wb_name>CEO Workbook 1</wb_name>
                   <worksheets>
                        <worksheet>
                             <ws_name>I</ws_name>
                        </worksheet>
                        <worksheet>
                             <ws_name>J</ws_name>
                        </worksheet>
                   </worksheets>
              </workbook>
              <workbook>
                   <wb_name>CEO Workbook 2</wb_name>
                   <worksheets>
                        <worksheet>
                             <ws_name>K</ws_name>
                        </worksheet>
                        <worksheet>
                             <ws_name>L</ws_name>
                        </worksheet>
                   </worksheets>
              </workbook>
         </workbooks>
    </eul>
    The XSL is generating a List of Workbooks in <table> by using <xsl:for-each select="eul/workbooks/workbook">
    <table>
    <tr><td>Purchasing Workbook 1</td></tr>
    <tr><td>Purchasing Workbook 2</td></tr>
    <tr><td>Manufacturing Workbook 1</td></tr>
    <tr><td>Manufacturing Workbook 2</td></tr>
    <tr><td>CEO Workbook 1</td></tr>
    <tr><td>CEO Workbook 2</td></tr>
    </table>
    Now my question is:
    1. The client want to see this report in Groups i.e
    <table>
    <tr><th>Group Name: Purchasing</th></tr>
    <tr><td>Purchasing Workbook 1</td></tr>
    <tr><td>Purchasing Workbook 2</td></tr>
    </table>
    <table>
    <tr><th>Group Name: Manufacturing</th></tr>
    <tr><td>Manufacturing Workbook 1</td></tr>
    <tr><td>Manufacturing Workbook 2</td></tr>
    </table>
    <table>
    <tr><th>Group Name: CEO</th></tr>
    <tr><td>CEO Workbook 1</td></tr>
    <tr><td>CEO Workbook 2</td></tr>
    </table>
    How can I achieve this grouping using XSL ? Has anybody tried customizing the XSL file to achieve grouping of workbooks by name?
    Any help is highly appreciated.
    Thanks in advance.
    Warm Regards,
    Pranav Desai

    Hi Friends..
    This is not the reply.
    I have also some question..
    Some related topic I found on this.
    That's why I am posting the same question here also..
    Dear friends..
    I need help to customize our discoverer viewer.
    We are creating work sheets in arial font size 8.
    But, when it's viewing through discoverer viewer it's coming big size.
    If we saw the source code by right click, it's taking some style sheets where
    the font size is mentioned as 8. not 8px.
    How I can modify the work sheets in viewer.
    Exactly which tag I should modify for this.
    And the other thing is the heading section is coming something as
    jung.
    Like this...
    &nb12.09.52 PM 27-OCT-02; 27-OCT-02 &n12.09.52 PM12.09.52 PM
    From: 01-JAN-2002 To: 30-DEC-2002o Page :1 / 1
    How we will correct this ?
    Please reply me as the earliest.
    With Thanks & Regards,
    Sheeja
    [email protected]

  • How  to do standard form modification using NACE

    hi gurus
    can any one suggest me
    how to modify standard form layout using NAce
    please send any examples if possible.
    thank you
    regards
    kals.

    Hi,
    goto NACE
    there depending on the functionality  select the  application.
    for Sales u have Application V1
    for purchase order u have application EF
    select one application and click on output types pushbutton
    for an example select EF application and click on output types
    now u get different output types select NEU new PO printout
    and double click on the processing routine folder on the left hand side of the screen
    Now u get the different processing routines .
    in that u have print output there u can see form routine and FORM .
    HERE U CAN GIVE UR OWN FORM WHICH IS CREATED IN SE71 BY DELETING THE STANDARD FORM.
    reward if helpful
    raam

  • 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 advice

    Hi 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

  • How to convert to ' ' in xml using xsl.

    Hi all,
    I have a string downloaded which has the following string
    String= text1 <I> text2 </I&it;
    I have italics tag in my xml file. But my browser does not identifies italics. So i decided to comment out italics tag in my xml using xsl
    So what i need is
    String = text1 <!--I-->text2<!--I-->
    basically to comment out italics tag alone.
    How can i replace <I> to <!--I-->?
    Is there any way in xsl to do the above in a string?
    or
    Any other ways where i can just remove <I> in my out xml file using xsl?
    Thanks in advance.
    Menaga.

    Hi,
    The ultimate solution would be that you also install also a cocoon server (http://cocoon.apache.org/), but that might be overkill.
    Have a look at /people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp for detailed info on creating PDF from BSP.
    If you want to use XSL(-FO), you might have a look at things like http://alt-soft.com/products_xml2pdf.jsp to be called as external command.
    Eddy

  • How to change InputField background color using Java Code

    Hi,
    In my application use will enter some set of Cost Centers in a table and submits request.
    In return i will get a list of invalid cost centers which i need to display in a table with input field
    In that table all cost centers will displayed, but invalid cost centers should be highlighted or background color should some other color. like red or yellow.
    Is it possible using java code to change a input field color.
    Please help me.
    Thanks

    Hi,
        declare a error message in message pool and declare a method say "checkCostCenters " and in this method, u can check whether it is a valid cost center .. if it is invalid cost center , then throw the erro message using the below code :
    wdComponentAPI.getMessageManager().reportContextAttributeMessage(
                        inputfieldattibutePointer, IMessageProgramPlanComp.ur error message,
                        new Object[] );
    for getting pointer and label use the below code:
    IWDAttributePointer inputfieldPointer = URNODEELEMENTElement
                        .getAttributePointer(URNODEELEMENT.ATTRIBUTENAME);
              String inputfieldLabel = wdContext.nodeURVALUENODE.getNodeInfo()
                        .getAttribute(URNODELEMENT.ATTRIBUTE).getSimpleType()
                        .getFieldLabel();
    hope it helps..
    Thanks and Regards

  • How to display xml to html using xsl?

    hi all...may i know how to display xml to html page?
    i ve included <xsl:output method="html" indent="yes" /> inside my xsl file. i clicked on output.xml file and everything is displayed correctly but the format is xml instead of html. is there anyway to transform it to html?
    below are my xsl and xml codes:
    // xsl file
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" indent="yes" />
    <xsl:template match="/">
    <html>
    <body>
    <h2>Document Contents</h2>
    <table border="1">
    <tr bgcolor="#9acd32">
         <th align="center">Document Name</th>     
         <th align="center">Document ID</th>          
         <th align="center">Owner</th>               
    </tr>
    <xsl:for-each select="Document/Contents">
    <tr>
    <td><xsl:value-of select="DocumentName"/></td>
    <td><xsl:value-of select="DocumentID"/></td>
    <td><xsl:value-of select="Originator"/></td>
    </tr>
    </xsl:for-each>
    </table>
    </body>
    </html>
    // xml file
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="xsltStyleSheet.xsl"?>
    <Document>
         <Contents>
              <DocumentName>register</DocumentName>
              <DocumentID>1</DocumentID>
              <Originator>hhh</Originator>
         </Contents>
    </Document>
    </xsl:template></xsl:stylesheet>

    your XSL transforms to HTML (in fact XHTML): what more do you expect? did you expected anything different from the following output? if yes: what and why?
    <html>
         <body>
              <h2>Document Contents</h2>
              <table border="1">
                   <tr bgcolor="#9acd32">
                        <th align="center">Document Name</th>
                        <th align="center">Document ID</th>
                        <th align="center">Owner</th>
                   </tr>
                   <tr>
                        <td>register</td>
                        <td>1</td>
                        <td>hhh</td>
                   </tr>
              </table>
         </body>
    </html>

  • How would you launch an applet using xsl and some xml data?

    Is is possible?

    Thanks for your input but I got it working with the correct CDATA syntax. The concept is to launch a database driven system using xml instead, so the applet piece is completely modular and can be added to any other application that can call a url. No databases need to be created. Its not crazy if the amount of info int he database is managebable.

  • Formatting output using XSL

    Hi All,
    Here is my XML output from an XSQL file.
    <ROWSET>
    - <ROW num="1">
    <EMP_NAME>Employee A</EMP_NAME>
    <WEEK_NUM>3</WEEK_NUM>
    <NOOFDAYS>5</NOOFDAYS>
    </ROW>
    - <ROW num="2">
    <EMP_NAME>Employee A</EMP_NAME>
    <WEEK_NUM>4</WEEK_NUM>
    <NOOFDAYS>5</NOOFDAYS>
    </ROW>
    - <ROW num="3">
    <EMP_NAME>Employee A</EMP_NAME>
    <WEEK_NUM>5</WEEK_NUM>
    <NOOFDAYS>5</NOOFDAYS>
    </ROW>
    - <ROW num="4">
    <EMP_NAME>Employee B</EMP_NAME>
    <WEEK_NUM>4</WEEK_NUM>
    <NOOFDAYS>5</NOOFDAYS>
    </ROW>
    - <ROW num="5">
    <EMP_NAME>Employee B</EMP_NAME>
    <WEEK_NUM>7</WEEK_NUM>
    <NOOFDAYS>5</NOOFDAYS>
    </ROW>
    - <ROW num="6">
    <EMP_NAME>Employee B</EMP_NAME>
    <WEEK_NUM>9</WEEK_NUM>
    <NOOFDAYS>4</NOOFDAYS>
    </ROW>
    - <ROW num="7">
    <EMP_NAME>Employee C</EMP_NAME>
    <WEEK_NUM>3</WEEK_NUM>
    <NOOFDAYS>2</NOOFDAYS>
    </ROW>
    - <ROW num="8">
    <EMP_NAME>Employee C</EMP_NAME>
    <WEEK_NUM>4</WEEK_NUM>
    <NOOFDAYS>5</NOOFDAYS>
    </ROW>
    - <ROW num="9">
    <EMP_NAME>Employee C</EMP_NAME>
    <WEEK_NUM>7</WEEK_NUM>
    <NOOFDAYS>4</NOOFDAYS>
    </ROW>
    So I am getting XML in form of:
    Employee A: Week 3: Noofdays : 5
    Employee A: Week 4: Noofdays : 5
    Employee A: Week 5: Noofdays : 5
    Employee B: Week 4: Noofdays : 5
    Employee B: Week 7: Noofdays : 5
    Employee B: Week 9: Noofdays : 4
    Employee C: Week 3: Noofdays : 2
    Employee C: Week 4: Noofdays : 5
    Employee C: Week 7: Noofdays : 4
    And now I need to generate and output in Cross tab format where Employee is in X-axis and Week is in Y axis. Now my XML does'nt contain information for all the weeks and I want to display 0 in the cell wherever the week is not applicable and the appropriate noofdays in the cell where information is there.
    So my output looks like this:
    Empl Name 1 2 3 4 5 6 7 8 9 10
    Emp A 0 0 5 5 5 0 0 0 0 0
    Emp B 0 0 0 0 5 0 5 0 4 0
    Emp C 0 0 2 5 0 0 4 0 0 0
    How can I generate such output using XSL. I even tried <xsl:key> but its not working fine. Can anyone have any ideas for generating such output using xsl.
    Any help in this will be highly appreciated. Its bit urgent...
    Thanks

    Hi All,
    Well I got the solution for this. The exact XSL for generating Crosstab report is as follows:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:key name="x" match="ROW" use="ROWS"/>
    <xsl:template match="/page">
    <html>
    <center>
    <body bgcolor="#FFFFFF" text="#000000">
    <table width="75%" border="1" style="background-color:#F5DEB3">
    <th style="background-color:#BBBBBB">Employee Name</th>
    <xsl:for-each select="ROWSET/ROW/COLH">
    <th style="background-color:#BBBBBB">
    <xsl:value-of select="."/>
    </th>
    </xsl:for-each>
    <xsl:for-each select="//page/ROWSET/ROW[generate-id()=generate-id(key('x',ROWS))]">
    <xsl:variable name="currow" select="ROWS"/>
    <tr>
    <td><xsl:value-of select="$currow"/></td>
    <xsl:for-each select="//page/ROWSET/ROW/COLH">
    <xsl:variable name="curcol" select="."/>
    <td align="center">
    <xsl:for-each select="/page/ROWSET/ROW[ROWS=$currow]">
    <xsl:if test="$curcol=COLS">
    <xsl:value-of select="CELLS"/>
    </xsl:if>
    </xsl:for-each>
    </td>
    </xsl:for-each>
    </tr>
    </xsl:for-each>
    </table>
    Back
    </body>
    </center>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    I hope this will help others.
    Thanks
    null

  • Duplicating the "Standard, Alternating Rows Colors" report template

    The built-in theme 5 comes with a report template called "Standard, Alternating Rows Colors". This theme's template type is defined as "Generic Columns". I need to create a duplicate of this report template that has a template type of "Named Columns" instead of "Generic Columns".
    I've tried to create a brand new report template using the "Named Columns" template type and then copy/paste the appropriate HTML code from the original to the new one. Obviously there are some options in the "Generic Columns" template type that are not in the "Named Columns" template type, and vice versa, but I copied over what I thought was appropriate.
    No matter what I do, I don't seem to come close to having my copy look like the original. I've looked over the Report Template section of the User Guide, but that hasn't helped. Any suggestions on how to accomplish what I'm trying to do?

    Hi Jackie,
    There must be some issues the apex_4_1.min.js file, try to reload it. In apex.oracle.com the tabular form with "Standard, Alternating Row Colors" just works fine.
    Regards,
    Natarajan

  • Report Template - Standard, Alternating Row Colors

    I'm using APEX 4.1.0 and theme 22 on Oracle 10g.
    I have some tabular forms in my application. For 2 of those, row deletions are allowed and I have the usual select box column to manage the row deletions. Also my users like the "Standard, Alternating Row Colors" report template and would like to see the alternating row colors whenever possible. Unfortunately I get the "Error on page." browser error in IE when I check a row selector box using this template. When I use a different report template I don't get this error.
    The tabular form functions correctly so this error is harmless, but I would like to know what it is for. I'm sure my users would rather not see that error.
    By the way, in Firefox the firebug error count increases and I get the following error in the console:
    TypeError: can't convert undefined to object
    [Break On This Error]      
    ...ovedColor)}gLastRowMoved=b}function html_RowUp(e,d){var c=$x_UpTill(e,"TR");ie_R...
    apex_4_1.min.js (line 18)Because all of the whitespace has been helpfully removed :) it's hard to see which expression is undefined and why.
    Any ideas?

    Hi Jackie,
    There must be some issues the apex_4_1.min.js file, try to reload it. In apex.oracle.com the tabular form with "Standard, Alternating Row Colors" just works fine.
    Regards,
    Natarajan

  • 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 Detect Color using my application

    Hi Friends,
    Iam sachin, working as a iphone mobile application developer.K coming to my question is it possible to
    detect colors using our application if yes Kindly guide me how to proceed .
    Thanks in advance ,

    you need to ask this in the developers forum - this is a formum mostly for end users not developers

  • Table's  Properties "row color"[standard;alternating;trans.] doesn't work?

    Table's  Properties "row color"[standard;alternating;transparent] doesn't work?
    Upgraded VC to 7.01 with sp1, the table's grid color not change with the row color set.
    But set the nested  iview to show on the layer,the "row color" worked.
    But Why? why doesn't work in the primary iview.

    Hi
    Once this happened to me also. I deleted the table & created whole thing again & it worked.
    Just try to create whole thing again atleast that table. it may work.
    Regards
    Sandeep

  • How to create transport request for standard text created using SO10.

    Hi,
    How to create transport request for standard text created using SO10?
    Regards
    Ramakrishna L

    Hi,
    For the Standard text created in SO10,
    please go to transaction SE78 -> FORM GRAPHICS->STORED AS TEXT->STANDARD TEXTS->
    Double click on ADRS or ST or what ever your type of text->
    Enter your standard text name
    Click on transport button->SHIFT+f6-> It will ask you for a transport request.
    Best regards,
    Siva

Maybe you are looking for

  • Open as Project question

    Hello, When I have a Multitrack project open, and control click "Select all occurrences of..." of a clip, then control click Open as Project, will the changes I make in the waveform editor affect all occurences that were selected? If not, is there wa

  • What is the build version for Sharepoint 2013 Server including trial version there is one?

    Hello Community     When using WS2012 and Sharepoint 2013 Server, what build version for a Sharepoint 2013 Server farm should be applied and where do you get the cumulative update for it (trial version also if there is one)?     Thank you     Shabeau

  • Flash will not work in safari 5.0

    I have a problem with Flash. I have a Mac Pro Safari 5.5.8 OS X10.5.8 I have downloaded from adobe site.  Installed, uninstalled the 10.3.??? It is showing in the preference panel. Works fine in Firefox. HELP PLEASE.   I have no idea what to do at th

  • Nokia Pc Suit problem

    I have Windows xp servic pack 2 (sp2) And Nokia Pc Suit 7.1 ( the last version i downloaded it on 11.04.)  and i use USB cabal .... my pc suit don't let me choose (when i try to make a new connecion with my 5230) if i want infrared ,bluetooch or usb

  • FM to import a hierarchy selection...?

    Gurus, I need to advice the BW team with a FM.I have to write a routine to call a function module that imports a hierarchy selection and uses that selection as a criteria to filter on transactional data from an BW infocube.  That data will then be co