Transforming xml data to cross tab in rtf template

Hi everyone,
Here is my requirement, I need the following output
-------------------------------------------Date
Territory-------District------Office---1/3/2011----1/10/2011---1/17/2011------Grand Total(Header row)
Central ----------Chicago---Buffalo-- 100.0---------99.0-----------100.0-------------299.0
----------------------------------arora-----100.0---------100.0----------100.0-------------300.0
-------------------chicago total---------200.0----------199.0----------200.0-------------599.0
--------------------Dallas------arlington-100.0----------99.0-----------100.0-------------299.0
---------------------------------irving------100.0----------100.0----------100.0-------------300.0
-------------------Dallas total-------------200.0----------199.0----------200.0-------------599.0
Teritory total----------------------------400.0-----------398.0---------400.0--------------1198.0
the values under dates are the sum of Item_Count field for each office for that date
and below is my xml
<ROWSET>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/03/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Chicago</DISTRICT_NAME>
<OFFICE_NAME>Buffalo</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/03/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Chicago</DISTRICT_NAME>
<OFFICE_NAME>Buffalo</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/10/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Chicago</DISTRICT_NAME>
<OFFICE_NAME>Buffalo</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>49</ITEM_COUNT>
<DATE>01/10/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Chicago</DISTRICT_NAME>
<OFFICE_NAME>Buffalo</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/17/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Chicago</DISTRICT_NAME>
<OFFICE_NAME>arora</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/17/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Chicago</DISTRICT_NAME>
<OFFICE_NAME>arora</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/03/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Chicago</DISTRICT_NAME>
<OFFICE_NAME>arora</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/03/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Chicago</DISTRICT_NAME>
<OFFICE_NAME>arora</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/10/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Chicago</DISTRICT_NAME>
<OFFICE_NAME>arora</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>49</ITEM_COUNT>
<DATE>01/10/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Chicago</DISTRICT_NAME>
<OFFICE_NAME>arora</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/17/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Chicago</DISTRICT_NAME>
<OFFICE_NAME>arora</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/17/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Chicago</DISTRICT_NAME>
<OFFICE_NAME>arora</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/03/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Dallas</DISTRICT_NAME>
<OFFICE_NAME>arlington</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/03/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Dallas</DISTRICT_NAME>
<OFFICE_NAME>arlington</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/10/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Dallas</DISTRICT_NAME>
<OFFICE_NAME>arlington</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>49</ITEM_COUNT>
<DATE>01/10/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Dallas</DISTRICT_NAME>
<OFFICE_NAME>arlington</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/17/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Dallas</DISTRICT_NAME>
<OFFICE_NAME>arlington</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/17/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Dallas</DISTRICT_NAME>
<OFFICE_NAME>arlington</OFFICE_NAME>
</ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/03/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Dallas</DISTRICT_NAME>
<OFFICE_NAME>irving</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/03/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Dallas</DISTRICT_NAME>
<OFFICE_NAME>irving</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/10/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Dallas</DISTRICT_NAME>
<OFFICE_NAME>irving</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>49</ITEM_COUNT>
<DATE>01/10/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Dallas</DISTRICT_NAME>
<OFFICE_NAME>irving</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/17/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Dallas</DISTRICT_NAME>
<OFFICE_NAME>irving</OFFICE_NAME>
</ROW>
<ROW>
<ITEM_COUNT>50</ITEM_COUNT>
<DATE>01/17/2011</DATE>
<TERRITORY>CENTRAL</TERRITORY>
<DISTRICT_NAME>Dallas</DISTRICT_NAME>
<OFFICE_NAME>irving</OFFICE_NAME>
</ROW>
</ROWSET>
Greatly apprciate any help
Thanks in Advance

Have you tried creating a Pivot Table and tweaking the table to get the desired output?
I can send you the RTF if you provide me an email address or send me an email at [email protected]
Thanks!
I have sent you the template based on your email. Take a look.
Edited by: BIPuser on Jan 21, 2011 1:52 PM

Similar Messages

  • Problem with Cross-tab report (RTF Template) null values, current-group()

    Hi, experts!
    I generate Cross-tab report using RTF Tamlpate and I have problem with grouping.
    My XML file have to be with one group only because I want to using dynamic regrouping inside the RTF template.
    Here is my data structure (XML file):(Look the images for details)
    http://img156.imageshack.us/img156/3997/xmlstructureay9.jpg
    =======================
    WITH GROUPS
    =======================
    Here is my RTF template:
    http://img151.imageshack.us/img151/2951/resultcrosstabbycustomehf8.jpg
    When I'm using grouping and I want to have for each group cross-tab report I have the following problem: (Look the images for details)
    http://img156.imageshack.us/img156/8786/resultcrosstabbycustomect9.jpg
    And this is my code I'm using inside the RTF template with groups:(Look the images for details)
    http://img156.imageshack.us/img156/4253/fieldbrowserxb7.jpg
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    =======================
    WITHOUT GROUPS
    =======================
    Here is my RTF template:
    http://img151.imageshack.us/img151/9545/resultcrosstabwithoutgrzg7.jpg
    When I generate one cross-tab there is no problem: (Look the images for details)
    http://img156.imageshack.us/img156/7030/resultcrosstabwithoutgrsr1.jpg
    This is my code I'm using inside the RTF template WITHOUT groups:(Look the images for details)
    http://img151.imageshack.us/img151/7030/fieldbrowserwithoutgrours8.jpg
    Can someone give me a hand to deal with this?
    Thank you!

    Pitson,
    better to ask this question in the BI Publisher Forum than here in the Oracle Reports Forum:
    BI Publisher
    Regards
    Rainer

  • Problem with Cross-tab report (RTF Template)

    Hi, experts!
    I generate Cross-tab report using RTF Tamlpate and I have problem with grouping.
    My XML file have to be with one group only because I want to using dynamic regrouping inside the RTF template.
    Here is my data structure (XML file):(Look the images for details)
    http://img156.imageshack.us/img156/3997/xmlstructureay9.jpg
    =======================
    WITH GROUPS
    =======================
    Here is my RTF template:
    http://img151.imageshack.us/img151/2951/resultcrosstabbycustomehf8.jpg
    When I'm using grouping and I want to have for each group cross-tab report I have the following problem: (Look the images for details)
    http://img156.imageshack.us/img156/8786/resultcrosstabbycustomect9.jpg
    And this is my code I'm using inside the RTF template with groups:(Look the images for details)
    http://img156.imageshack.us/img156/4253/fieldbrowserxb7.jpg
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    =======================
    WITHOUT GROUPS
    =======================
    Here is my RTF template:
    http://img151.imageshack.us/img151/9545/resultcrosstabwithoutgrzg7.jpg
    When I generate one cross-tab there is no problem: (Look the images for details)
    http://img156.imageshack.us/img156/7030/resultcrosstabwithoutgrsr1.jpg
    This is my code I'm using inside the RTF template WITHOUT groups:(Look the images for details)
    http://img151.imageshack.us/img151/7030/fieldbrowserwithoutgrours8.jpg
    Can someone give me a hand to deal with this?
    Thank you!

    Pitson,
    better to ask this question in the BI Publisher Forum than here in the Oracle Reports Forum:
    BI Publisher
    Regards
    Rainer

  • Transforming XML Data with XSLT in a servlet

    Trying to transform XML data using XSLT. The following code works fine outside of a servlet. But in a servlet it gives the following error :
    * Transformer Factory error
    javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXException: Namespace not supported by SAXParser
    javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXException: Namespace not supported by SAXParser
         at org.apache.xml.utils.DefaultErrorHandler.fatalError(DefaultErrorHandler.java:257)
         at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:813)
         at TransformationApp.XSLTTransformServlet.MyTransform(XSLTTransformServlet.java:79)
         at TransformationApp.XSLTTransformServlet.doGet(XSLTTransformServlet.java:39)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Thread.java:484)
    Several articles hinted at setting the factory namespace attribute to TRUE. I have tried that but same results. Here is the code :
    static Document document;
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
    //factory.setNamespaceAware(true);
    //factory.setValidating(true);
    try {
    File stylesheet = new File(argv[0]);
    File datafile = new File(argv[1]);
    DocumentBuilder builder = factory.newDocumentBuilder();
    document = builder.parse(datafile);
    // Use a Transformer for output
    TransformerFactory tFactory =
    TransformerFactory.newInstance();
    StreamSource stylesource = new StreamSource(stylesheet);
    Transformer transformer = tFactory.newTransformer(stylesource);
    DOMSource source = new DOMSource(document);
    StreamResult result = new StreamResult(System.out);
    transformer.transform(source, result);
    } catch (TransformerConfigurationException tce) {
    // Error generated by the parser
    System.out.println ("\n** Transformer Factory error");
    System.out.println(" " + tce.getMessage() );
    // Use the contained exception, if any
    Throwable x = tce;
    if (tce.getException() != null)
    x = tce.getException();
    x.printStackTrace();
    } catch (TransformerException te) {
    // Error generated by the parser
    System.out.println ("\n** Transformation error");
    System.out.println(" " + te.getMessage() );
    // Use the contained exception, if any
    Throwable x = te;
    if (te.getException() != null)
    x = te.getException();
    x.printStackTrace();
    } catch (SAXException sxe) {
    // Error generated by this application
    // (or a parser-initialization error)
    Exception x = sxe;
    if (sxe.getException() != null)
    x = sxe.getException();
    x.printStackTrace();
    } catch (ParserConfigurationException pce) {
    // Parser with specified options can't be built
    pce.printStackTrace();
    } catch (IOException ioe) {
    // I/O error
    ioe.printStackTrace();
    Any help would be greatly appreciated.

    I don't know that this is true, but i think the problem is the classpath.
    The runtime has his own parser. This parser is befor your xalan.lib in the classpath and the
    parser from the runntime don't support namespace.
    Try Tomcat 4.
    Regard Dietmar

  • Unable to get cells for the columns which have no data in cross-tab report

    Hi friends,
    I am developing a cross-tab report.
    Let's take an example to explain the problem.
    Here is the XML file i am using
      <?xml version="1.0" ?>
    - <!--  Generated by Oracle Reports version 6.0.8.11.3
      -->
    - <MODULE1>
    - <LIST_G_SCHEMECODE>
    - <G_SCHEMECODE>
      <SCHEMECODE>171091</SCHEMECODE>
      <AMOUNT>0</AMOUNT>
      <ASSET_TYPE>Govt Guarantee</ASSET_TYPE>
      <MARGIN>0</MARGIN>
      <AMOUNT_SECURED>0</AMOUNT_SECURED>
      <VALUE_OF_SECURITY>0</VALUE_OF_SECURITY>
      </G_SCHEMECODE>
    - <G_SCHEMECODE>
      <SCHEMECODE>171091</SCHEMECODE>
      <AMOUNT>0</AMOUNT>
      <ASSET_TYPE>Loans To Govt</ASSET_TYPE>
      <MARGIN>0</MARGIN>
      <AMOUNT_SECURED>0</AMOUNT_SECURED>
      <VALUE_OF_SECURITY>0</VALUE_OF_SECURITY>
      </G_SCHEMECODE>
    - <G_SCHEMECODE>
      <SCHEMECODE>171093</SCHEMECODE>
      <AMOUNT>0</AMOUNT>
      <ASSET_TYPE>Govt Guarantee</ASSET_TYPE>
      <MARGIN>120</MARGIN>
      <AMOUNT_SECURED>0</AMOUNT_SECURED>
      <VALUE_OF_SECURITY>0</VALUE_OF_SECURITY>
      </G_SCHEMECODE>
    - <G_SCHEMECODE>
      <SCHEMECODE>171093</SCHEMECODE>
      <AMOUNT>0</AMOUNT>
      <ASSET_TYPE>Loans To Govt</ASSET_TYPE>
      <MARGIN>0</MARGIN>
      <AMOUNT_SECURED>0</AMOUNT_SECURED>
      <VALUE_OF_SECURITY>0</VALUE_OF_SECURITY>
      </G_SCHEMECODE>
    - <G_SCHEMECODE>
      <SCHEMECODE>*171095*</SCHEMECODE>
      <AMOUNT>0</AMOUNT>
      <ASSET_TYPE>Govt Guarantee</ASSET_TYPE>
      <MARGIN>100</MARGIN>
      <AMOUNT_SECURED>0</AMOUNT_SECURED>
      <VALUE_OF_SECURITY>0</VALUE_OF_SECURITY>
      </G_SCHEMECODE>
      </LIST_G_SCHEMECODE>
      </MODULE1>Now I want SCHEMECODE in rows and ASSET_TYPE in columns.
    And the each ASSET_TYPE column is to be divided into 2 sub-columns (MARGIN,AMOUNT_SECURED).
    I am able to achevie this.
    The problem is that ,for the schemecode 171095, since there is no data for ASSET_TYPE "Loans To Govt",no cells are generated for this SCHEMECODE and ASSET TYPE.
    But the requirement is to generate blank cells.
    If needed i will send the template at xml files also.

    try this, there must be simpler one i guess...
    1. take a form field, and make its type as number. Paste the below one <?xdoxslt:set_variable($_XDOCTX,'v1',2)?>
    2. now take a table with as below,
    A l B |
    C l D1 l D2 l E1 l E2 l
    observe that i. A, C are in one column
    ii. cell B is on top of D1, D2
    iii. we have no cell on top of E1 and E2 cells
    iv. 'l' represents the wall of the cell :)
    A: <?horizontal-break-table:1?> SCHEMECODE
    B: <?for-each-group@column:G_SCHEMECODE;ASSET_TYPE?> <?ASSET_TYPE?> <?end for-each?>
    C: <?for-each-group:G_SCHEMECODE;SCHEMECODE?> <?xdoxslt:set_variable($_XDOCTX,'v1',2)?> <?SCHEMECODE?>
    D1: <?for-each-group@cell:current-group();ASSET_TYPE?> <?MARGIN?> <?xdoxslt:set_variable($_XDOCTX,'v1',xdoxslt:get_variable($_XDOCTX,'v1')-1)?>
    D2: <?AMOUNT_SECURED?> <?end for-each?> <?end for-each?>
    E1: <?for-each@column:xdoxslt:foreach_number($_XDOCTX,1,xdoxslt:get_variable($_XDOCTX,'v1'),1)?>
    E2: <?END FOR-EACH?>
    3. If you are confused gimme your email id, i will pass the template. But you should add credits to me.. :)

  • How to correct XML Output in Cross Tab Template for sum function?

    I have designed a Cross Tab Template to summarize R12 Account Analysis data by Period by Party_name. The template is doing what I want it to do with the exception of amount. I have a function in the sum(accounted_net) field and it will only display 0.00 even though I know there are actual amount. Can someone help in looking at my template to see what I have done wrong?
    Here is the sum funciton.
    <?if:count(current-group()[CCID_SOURCE=$ABC])?><?sum(current-group()[CCID_SOURCE=$ABC]/ACCOUNTED_NET)?> <?end if?>
    CCID_SOURCE is an element I created in XML to concatnate CCID and Party_name for grouping. $ABC is a variable that I defined for "CCID_SOURCE" to check if there is null value for a specific ccid_party. If it's null, it won't do the sum function, otherwise it will sum the accounted_net for the period_name, party_name.
    Thank you for your help.
    Stacey

    Figured this out on our own

  • Detail-Data in Cross-Tab

    Hi,
    i would like to add additonal data to the row-label in a cross-tab.
    ....................... C1    C2    C3
    Customer1
    .... add.Data1
    Customer2
    .... add.Data2
    Customer3
    .... add.Data3
    How can i do that?
    The link between the Customer-Table and the Extra-Data is the customer-id and a Date-Field (parameter of the report - used for filtering on a date-basis).
    Table for extra data:
    customer-id     date     amount
    DATE is a parameter of the report.
    Is there any way to do this?
    (I use CR XI).
    Result should look like this:
    Selected Date (Parameter): 2009-02-02
    ...................................................... C1    C2    C3
    Customer1 +
    ....amount on 2009-02-02 for C1
    Customer2 +
    ....amount on 2009-02-02 for C2
    Customer3 +
    ....amount on 2009-02-02 for C3
    THX in advance,
    Markus

    Hi,
    Lets phrase it differently again
    i have a second table from which i would like to add additional information to the row-information in a cross-tab.
    customer.... date ... amount
    Cust1....2009-02-01....   10
    Cust1....2009-03-01....   15
    Cust1....2009-04-01....   77
    Cust2 ........
    Cust3 ........
    I need ONLY the first amount from the starting-date in the CROSS-Tab.
    The starting-date is a parameter in the report.
    If i put there the linked amount-field i get a row for each different date.
    I need only one row per customer with the first amount from date 1. (the parameter-date-value)
    So if i enter 2009-03-01 as the parameter, i would like a cross tab with a row-name of:
    "Customer1 + ChrW(13) + 15 "
    It works with a SQL-Expression (named "StartSaldo") like:
    (Select Saldo from Goldbeck_Saldo where D_Date = '20090301'
    and "Goldbeck_Saldo"."I_PERSID"="BaseTable"."I_PERSID")
    and a row name of "Customer.Name + ToText({%StartSaldoSQL})
    However the Date "20090201" is hard-coded there.
    I can find no way to make the Date from the SQL-Expression soft-coded (pass the parameter to the scalar SQL-Expression). According to another forum-post this is not possible.
    THX
    Markus
    Edited by: Cumulus7 on Apr 27, 2009 4:25 PM

  • Data binding cross tab in Crystal 2008 with Xcelsius swf file

    I've created a visualisation in Xcelsius and want to bind it to a cross tab in CR2008.   The labels appear correctly in the swf visualisation but I get no data.   The format of the table in Xcelsius and the cross tab I believe to be the same, covering data formats.   I have placed the Xcelsius visualisation in page header "a" with the cross tab in page header "b".   The Xcelsius table has been defined in terms of column and row headers as well as data area, so I've done everything that I understand to be correct.   In CR2008 I have specified that I use the existing named cross tab.
    Does anyone have any idea what I may have missed.
    tia
    Neil

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly

  • Calculations based on Summarized data in Cross Tab

    First off, I'm pretty experienced with Crystal.
    I've run accross something that seems like it should be realy easy to do, and the sort of thing you would expect to do  in a cross tab... so maybe I'm missing something totally obvious.
    I'm doing a year over year comparison of some financial data broken down by month and by quarter.
    So, my Rows are Quarter, and a field called 'YEARMONTH' (calculated field, YYYYMM, for ease of sorting)
    My column is Year, and for summarized fields, I have the data field I'm interested in which is a float. Let's call it 'Dollars' for sake of argument.
    What I want to do is create a summary field (next to the total field) called 'Difference' or 'Delta' that calculates for reach row the difference between my two years (2008, and 2009)
    The only solution I can come up with is to dummy in a record from the datasource with a year value of 'Difference' and some other dummy values so that it will show up as a column on the cross tab, and then somehow use the currentrowcolum function or some such creature to mask the output in the column. but now that I type it out here, I'm not sure it's going to work. I also don't think it's going to export the way I want it to either.
    I'd really prefer it to be in a cross tab, and not in some manually created cross-tab emulation using manual running totals, but I'll go there if I have to.
    Thanks a ton!

    This is what I did in my report to get the difference
    my crosstab looks like this
                        2004     2005    Total
    Total              T1         T2         T
    USA               A          B          C
    INDIA              X          Y          Z
    right click on T1 and go to format field and write the suppress condition like this
    numberVar d:=0;
    currencyVar array arr1;
    currencyVar array arr2;
    numberVar e;
    if GridRowColumnValue('year')=2004 then
    (e:=e+1;
    redim preserve arr1[e];
    arr1[e]:=CurrentFieldValue)
    else
    (e:=e+1;
    redim preserve arr2[e];
    arr2[e]:=CurrentFieldValue);
    false
    right click on T and go to format field and write the Display string condition like this
    currencyVar array arr1;
    currencyVar array arr2;
    totext(arr1[1]-arr2[1])
    right click on A and go to format field and write the suppress condition like this
    currencyVar array four;
    currencyVar array five;
    numberVar d;
    if GridRowColumnValue('year')=2004 then
    (d:=d+1;
    redim preserve four[d];
    four[d]:=CurrentFieldValue)
    else
    (d:=d+1;
    redim preserve five[d];
    five[d]:=CurrentFieldValue);
    false
    right click on C and go to format field and write the Display string condition like this
    currencyVar array four;
    currencyVar array five;
    numberVar g;
    g:=g+1;
    ToText(four[g]-five[g])
    Note: Please select the option "column totals on top" for crosstab in customize style
    Hope this helps!
    Raghavendra

  • Problem in transforming xml data to HTML

    Hai all,
    I am new to J developer, I have generated XML data to transform to HTML.
    Below is my xsql file with the name 'simpleqry.xsql'
    <?xml version='1.0' ?>
    <page xmlns:xsql="urn:oracle-xsql" connection="java:comp/env/jdbc/testDS">
    <xsql:query max-rows="-1" tag-case="lower" null-indicator="no">SELECT EMPNO,ENAME,SAL FROM EMP WHERE SAL &gt;= 5000</xsql:query>
    </page>
    it is producing the XML datas
    Further I need to convert it into HTML
    so I generated xsl stylesheet in under META-INF with the name 'EmpDetails.xsl'
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output encoding="ISO-8859-1" method="text/html" />
    <xsl:template match="/page">
    <html>
    <head>
    <title>Employee Results</title>
    </head>
    <body>
    <H2> EMPLOYEE QUERY RESULTS</H2>
    <h5><em> Following demonstrates XSQL query</em></h5>
    <table border="1" cellspacing="1" align="center">
    <tr bgcolor=" #F9F0C1">
    <th>EMP ID</th>
    <th>EMPLOYEE NAME</th>
    <th>SALARY</th>
    </tr>
    <xsl:for-each select="ROWSET/ROW">
    <tr>
    <td><xsl:value-of select="EMPNO"/></td>
    <td><xsl:value-of select="ENAME"/></td>
    <td><xsl:value-of select="SAL"/></td>
    </tr>
    </xsl:for-each>
    </table>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    next I have added the following to simpleqry.xsql
    <?xml-stylesheet type="text/xsl" href="EmpResults.xsl" ?>
    so my simpleqry.xsql file look like this
    <?xml version='1.0' ?>
    <?xml-stylesheet type="text/xsl" href="C:\JDeveloper\mywork\Application1\querysql\public_html\WEB-INF\EmpDetails.xsl" ?>
    <page xmlns:xsql="urn:oracle-xsql" connection="java:comp/env/jdbc/testDS">
    <xsql:query max-rows="-1" tag-case="lower" null-indicator="no">SELECT EMPNO,ENAME,SAL FROM EMP WHERE SAL &gt;= 5000</xsql:query>
    </page>
    when I rerun my simpleqry.xsql file it not generating the output .
    My J developer version is 'Oracle IDE 11.1.2.0.38.60.17'
    I know I made it lengthy. I made it clear so that you can understand my problem clearly. Please explain me how to solve the above mentioned problem(To generate HTML from XML data)
    Thanks in advance.
    Regards,
    Uraja

    next I have added the following to simpleqry.xsql
    +<?xml-stylesheet type="text/xsl" href="EmpResults.xsl" ?>+
    so my simpleqry.xsql file look like this
    +<?xml version='1.0' ?>+
    +<?xml-stylesheet type="text/xsl" href="C:\JDeveloper\mywork\Application1\querysql\public_html\WEB-INF\EmpDetails.xsl" ?>+
    What is added is different from what is listed in the XSQL, the xsl is different, the path to xsl is different.
    Specify relative path for xsl.

  • How to Convert internal table data into xml and xml data into internal tab

    Hi Guys,
          I have a requirement  that  i have to convert the internal table data into xml format and viceversa . for my requirement  i came to know that i have to use Transformations concept.  i done the converting the data from internal table into xml data by using standard Tranformations. My Question is 
    1) Can i use same Transformation to convert the xml data into abap internal table. if it is possible then how ???
    2) Is it possible using the standard Transformation  or I have to go for XSLT approach
    Please help me out from this guys,
    Thanks and Regards
    Koti

    Hi Koti,
    This is possible. There is a link. With the help of this link you can convert ABAP data to XML and vice versa.
    Link: http://www.heidoc.net/joomla/index.php?option=com_content&view=article&id=15:sapxslt&catid=22:sap-xslt&Itemid=31

  • Transforming XML data into SVG line charts using XSLT

    Hi
    I am trying to transform revenue data from an XML file into an SVG line chart. The problem is that I am quite new to XPath and XSLT and whereas I can draw the grid for my chart I struggle drawing the lines using the data from the XML doc.
    The XML look something like the one below, and I would like to have one chart for each product and in each chart having the time on the x-axis and chart the revenue by regions.
    Any help on this is much appreciated.
    Thanks
    Peter
    <?xml version="1.0"?>
    <revenue>
    <caption>
    <heading>My title</heading>
    </caption>
    <date name="01/01/2003">
    <region name="Asia">
    <product_a>30</product_a>
    <product_b>12</product_b>
    <product_c>301</product_c>
    </region>
    </date>
    <date name="02/01/2003">
    <region name="Asia">
    <product_a>32</product_a>
    <product_b>12</product_b>
    <product_c>301</product_c>
    </region>
    <region name="America">
    <product_a>57</product_a>
    <product_b>31</product_b>
    <product_c>457</product_c>
    </region>
    </date>
    <date name="03/01/2003">
    <region name="Asia">
    <product_a>38</product_a>
    <product_b>12</product_b>
    <product_c>301</product_c>
    </region>
    <region name="America">
    <product_a>31</product_a>
    <product_b>9</product_b>
    <product_c>357</product_c>
    </region>
    </date>
    <date name="04/01/2003">
    <region name="Asia">
    <product_a>33</product_a>
    <product_b>12</product_b>
    <product_c>301</product_c>
    </region>
    <region name="America">
    <product_a>43</product_a>
    <product_b>16</product_b>
    <product_c>430</product_c>
    </region>
    </date>
    <date name="05/01/2003">
    <region name="Asia">
    <product_a>36</product_a>
    <product_b>12</product_b>
    <product_c>301</product_c>
    </region>
    <region name="America">
    <product_a>54</product_a>
    <product_b>1</product_b>
    <product_c>561</product_c>
    </region>
    </date>
    </revenue>

    You could try Jeni's XSLT utilities for SVG :
    http://www.jenitennison.com/xslt/utilities/svg-utils.html
    Specifically, the sample code provided, when a couple of SVG charts are being generated from XML data :
    http://www.jenitennison.com/xslt/utilities/svg-example.html
    Hope that helps.

  • Transforming XML data into SVG line charts

    Hi
    I am trying to transform revenue data from an XML file into an SVG line chart. The problem is that I am quite new to XPath and XSLT and whereas I can draw the grid for my chart I struggle drawing the lines using the data from the XML doc.
    The XML look something like the one below, and I would like to have one chart for each product and in each chart having the time on the x-axis and chart the revenue by regions.
    Any help on this is much appreciated.
    Thanks
    Peter
    <?xml version="1.0"?>
    <revenue>
    <caption>
    <heading>My title</heading>
    </caption>
    <date name="01/01/2003">
    <region name="Asia">
    <product_a>30</product_a>
    <product_b>12</product_b>
    <product_c>301</product_c>
    </region>
    </date>
    <date name="02/01/2003">
    <region name="Asia">
    <product_a>32</product_a>
    <product_b>12</product_b>
    <product_c>301</product_c>
    </region>
    <region name="America">
    <product_a>57</product_a>
    <product_b>31</product_b>
    <product_c>457</product_c>
    </region>
    </date>
    <date name="03/01/2003">
    <region name="Asia">
    <product_a>38</product_a>
    <product_b>12</product_b>Long postings are being truncated to ~1 kB at this time.

    Instead of using SVG charting can I suggest that you look into digital charts. This service creates charts on the fly and is very easy to integrate with web applications.
    Christopher
    www.billboard.net

  • Display Data in Cross Tab Format...Per Quarter

    Hi Team,
    I have following issue...which i am struggling to solve...
    My current report format is
    Material Technology -  Q1(Qty) Q2(QTY) Q3(QTY) Q4(QTY) - Q1(Pirce) Q2(Pirce) Q3(Pirce) Q4(Pirce) - Q1(Rate) Q2(Rate) Q3(Rate) Q4(Rate)
    I have generated cross tab report...in which i am getting following display...
    Material Technology Q1(Qty) Q1(Price) Q1(Rate)  and so on...
    Is there any way i can get the required format...please assist..
    Q1 to Q4 - Quarter 1 to 4...
    regards
    nic

    Hi Nic,
    The problem is you have 3 measure objects available: qty, price and rate.
    If you put them in a vertical table then you will have 3 columns. As soon as you put in the quarter to create the crosstab BO will the for each quarter display the qty, price and rate.
    To solve your problem is to not create a cross-tab, but a vertical table.
    For each measure object you crreate 4 new variables (type measure) using the the formula:
    E.g. for the quantity in the first quarter you create variable like: qty_q1
    =<qty> Where (<quarter> = 1)
    The same you do for the quantities for the other quarters.
    And you do the same for the price and rate.
    Ending up with 12 new variables which you can put in a vertical table in any order you like.
    Regards,
    Harry

  • Restricting data in cross tab report

    Hi
    I am creating a cross tab report.In that I want to restrict the column dynamically.The column depends upon the parameter field.
    say for example if i enter the parameter as 2007,it should display field from 2004-2007 only rather than displaying all years.
    Thanks in Advance,
    Eswari

    Hi,
    You can use a formula. e.g
    < Basic format>
    Select case year({Command.tradeDate})
        case 2005 to 2007
            formula = 1
        Case else
            formula = 0
    end select
    Then on the crosstab column group options, choose "specified order" and on the "Other" tab choose "Discard all others"
    Hope this helps
    Regards
    Dotun.

Maybe you are looking for

  • ADF Faces components are not rendered in Jdeveloper visual editor

    Hi! I'm using Jdeveloper 1013 Developer Preview. I found that the components of ADF Faces EA16 are not shown on the visual editor in Jdeveloper, but the ADF Faces EA15 components are shown. I'm just wondering if this is normal, and there is anything

  • Initial and Minimum Pool Size

    in j2ee admin console, i set the parameter to 8. I go to oracle and from sql*plus i execute the following command select * from v$session However, when i run my sample program I only see a session from my computer. Is it right? or I am supposed to se

  • I can't watch Trailers!!

    It's exasperating! Ever since I upgraded from QT 6.something to 7 I can't watch movie trailers on Safari anymore. Before this last upgrade 7.4.1 (14) the movie trailer in question would download into my safari window if I refreshed the page, which wa

  • JPA 2.0

    has there been any word on when JPA 2.0 might be available in an "early access" capacity. reason i ask, we are moving forward with migrating from one ORM to another, and i would like to use upcoming "Criteria" based JPA rather than doing direct vendo

  • XML Form Error.

    While creating aan XML Form, I am getting this error. "Control is connected to the data schema and to an item property." Please Suggest. Message was edited by:         Rishit Sinha Message was edited by:         Rishit Sinha