Help in cross tabs.

I have a cross tab defined.
can we show levels hierarchy in cross tabs?
I have a hierarchy described. I have a cross tab such a way that,
In th description on cross tab:
If value at Level4 = 'computers' this table gives us the all sublevels under level 4 i.e.level 5
But, even level 5 has a sublevel as Level6.
I need to dsiplay even level 6 in the outcome.
Its this way:
This is my cross tab:
http://img651.imageshack.us/img651/9179/76869600.jpg
and the code in box C: <?crosstab:c547;"//SQL_ROW[level4='computers']";"level5";"sum_date{,o=a,t=t}";"price";"sum"?>
This is my current output:
http://img64.imageshack.us/img64/3011/89739442.jpg
But I need this as outcome: how do I achieve this? Please help me :
http://img834.imageshack.us/img834/84/27269357.jpg

I am not clear of where to put the condition.
can anyone help me please.
This is my Cross tab:
http://img163.imageshack.us/img163/9575/78212975.jpg
This is my current out put:
http://img411.imageshack.us/img411/7033/55191078.jpg
But I need this Out put:
http://img834.imageshack.us/img834/84/27269357.jpg

Similar Messages

  • Help in Cross Tab!!!

    Hi All,
    I have a samll issue when creating a cross tab report with the format like this:
    Year (Group By Year)
    Quarter (repeats for every Year)
    Actual Budget Short
    customer name Quarter amounts
    TOTAL TOTAL AMOUNTS
    I have been able to create a cross tab report with only year...i am having difficulties putting in the quarters....
    any help is much appreciated.
    I can pass the rtf template created for the yearly data.
    Thanks,
    Madhavan G V

    Hi Vetsrini,
    No offence taken. I appreciate all the help i can get from this forum.
    Anyways, please find the the xml & code generated.
    XML:
    ====
    <ROWSET>
    <RESULTS>
    <INDUSTRY>Motor Vehicle Dealers</INDUSTRY>
    <YEAR>2005</YEAR>
    <QUARTER>Q1</QUARTER>
    <SALES>1000</SALES>
    </RESULTS>
    <RESULTS>
    <INDUSTRY>Motor Vehicle Dealers</INDUSTRY>
    <YEAR>2005</YEAR>
    <QUARTER>Q2</QUARTER>
    <SALES>2000</SALES>
    </RESULTS>
    <RESULTS>
    <INDUSTRY>Motor Vehicle Dealers</INDUSTRY>
    <YEAR>2004</YEAR>
    <QUARTER>Q1</QUARTER>
    <SALES>3000</SALES>
    </RESULTS>
    <RESULTS>
    <INDUSTRY>Motor Vehicle Dealers</INDUSTRY>
    <YEAR>2004</YEAR>
    <QUARTER>Q2</QUARTER>
    <SALES>3000</SALES>
    </RESULTS>
    </ROWSET>
    Code:
    ====
    <?variable:c297;xdoxslt:create_groups($_XDOCTX, RESULTS/node()[local-name()='YEAR' or local-name()='QUARTER'], 'YEAR;QUARTER', 'v')?><?horizontal-break-table:1?>
    <?for-each@cell:$c297?>
    <?for-each@cell:xdoxslt:get_groups($_XDOCTX,'v','YEAR',string(.))?>
    <?end for-each?><?end for-each?>
    <?for-each@column:$c297?>
    <?.?>
    <?for-each@column:xdoxslt:get_groups($_XDOCTX,'v','YEAR',string(.))?>
    <?xdoxslt:get_groups($_XDOCTX,'v','YEAR',string(.))?>
    <?.?>
    <?end for-each?><?end for-each?>
    <?for-each-group:RESULTS;./INDUSTRY?><?variable@incontext:G1;current-group()?>
    <?INDUSTRY?>
    <?for-each@cell:$c297?>
    <?sum ($G1[(./YEAR=current())]/SALES)?>
    <?for-each@cell:xdoxslt:get_groups($_XDOCTX,'v','YEAR',string(.))?>
    <?sum ($G1[(QUARTER=current())]/SALES)?> -- Problematic part. [i get the total of quarters rather than total of quarter on a year basis)
    <?end for-each?><?end for-each?>
    <?sum ($G1/SALES)?>
    <?end for-each-group?>
    <?variable@incontext:T;.//RESULTS?>
    <?for-each@cell:$c297?>
    <?for-each@cell:$c297?>
    <?for-each@cell:xdoxslt:get_groups($_XDOCTX,'v','YEAR',string(.))?>
    <?sum ($T[(./QUARTER=current())]/SALES)?>
    <?end for-each?><?end for-each?>
    <?sum ($T/SALES)?>
    Thanks,

  • Help with Cross-tab

    Hello everyone...
    Here is some quick background info on my project:
    1) I am attempting to write a Crystal Report (version 10) to automatically capture crime statistics for a previous time period based on a current time period entered into the Crystal Report parameter. The current date range to automatically be captured is the previous seven weeks. For example, if a user enters the date range of June 15, 2008 - August 2, 2008, the Crystal Report will automatically gather data for the two date ranges of April 27, 2008 - June 14, 2008 (the previous date range) and June 15, 2008 - August 2, 2008 (the current date range). The purpose of this is to automatically gather crime statistics for two equal date ranges to compare crime rates.
    2) I have been able to successfully construct a formula to gather the previous date range.
    3) I have constructed a cross-tab but I am having difficulties formatting the cross-tab to display data as I desire.
    With the background of my project now described I will move into the main problem I am experiencing. I am able to display the data for all the necessary weeks in the cross-tab; using the same date range above I am able to show data for the fourteen weeks of April 27, 2008 - August 2, 2008. However, I wish to have a single cross-tab display the grand totals for just the previous date range while having weekly totals and a grand total for the current date range.
    Using the same date ranges above as an example, the date range of April 27, 2008 - June 14, 2008 will show just the grand totals for all seven weeks of that period. Conversely, I would like to have the date range of June 15, 2008 - August 2, 2008 show weekly totals as well as grand totals for all seven weeks of that period.
    I would like to keep all this data in a single cross-tab due to having to put the data in another crime analysis report.
    Any help you can provide is most appreciated...let me know if I can provide further info. Just so you know I am a bit of a beginner when it comes to Crystal Reports.

    Hello, you might try this:
    1) Create a formula field in your details section with this:
    Whileprintingrecords;
    If (table.date >= "start date of your pre-date range" and
    table.date <= "end date of your pre-date range") then 'Pre-Date'
    else
    if (table.date >= "your 1st week start" and table.date <= "your 1st week end") then 'Week 1'
    else (if table.date >= "your 2nd week start" and table.date <= "your 2nd week end") then 'Week 2'
    else .... for the 7 weeks you want a separate column.
    2) create the cross-tab and put the formula field as the column.
    3) I believe if you right-click on the total field to the far right and "Format Field" you can use the "Display String" option to delete the sum of the previous week's from the CurrentFieldValue and use the TOTEXT() function to display it. This will only display the sum of your current 7 weeks.
    You may want to go change the "Group Options" for the column to Sort in "Specified Order" and create named groups for each of your column headings. I can explain how you would do this if you need it.

  • Help on cross tab query

    Hi all
    I need an help
    SELECT * FROM TABLE_A
    ID SCHEDULED MARK
    1 01/18/2011 T01
    2 01/18/2011 T02
    3 01/18/2011 T03
    4 01/19/2011 T04
    5 01/20/2011 T05 I want Results like below for folllowing query
    SELECT SCHEDULED,MARK FROM TABLE_A
    WHERE SCHEDULED BETWEEN TO_CHAR(SYSDATE,'MM/DD/YYYY') AND TO_CHAR(SYSDATE +1,'MM/DD/YYYY')
    1/18/2010 1/19/2011
    T01           T04
    T02
    T03
    CREATE TABLE  "TABLE_A"
       (     "ID" NUMBER,
         "SCHEDULED" DATE,
         "MARK" VARCHAR2(50)
    insert into table_a values(1, '01/18/2011', 'T01');
    insert into table_a values( 2, ' 01/18/2011', 'T02');
    insert into table_a values( 3, ' 01/18/2011', 'T03');
    insert into table_a values( 4, ' 01/19/2011', 'T04');
    commit;Thanks for your help

    user1849 wrote:
    Hi all
    I need an help
    SELECT * FROM TABLE_A
    ID SCHEDULED MARK
    1 01/18/2011 T01
    2 01/18/2011 T02
    3 01/18/2011 T03
    4 01/19/2011 T04
    5 01/20/2011 T05 I want Results like below for folllowing query
    SELECT SCHEDULED,MARK FROM TABLE_A
    WHERE SCHEDULED BETWEEN TO_CHAR(SYSDATE,'MM/DD/YYYY') AND TO_CHAR(SYSDATE +1,'MM/DD/YYYY')
    1/18/2010 1/19/2011
    T01           T04
    T02
    T03
    CREATE TABLE  "TABLE_A"
    (     "ID" NUMBER,
         "SCHEDULED" DATE,
         "MARK" VARCHAR2(50)
    insert into table_a values(1, '01/18/2011', 'T01');
    insert into table_a values( 2, ' 01/18/2011', 'T02');
    insert into table_a values( 3, ' 01/18/2011', 'T03');
    insert into table_a values( 4, ' 01/19/2011', 'T04');
    commit;Thanks for your helphttp://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:766825833740

  • Issue with the Cross tab report

    Hi,
    Please any one can help on cross tab report in discoverer.
    When i ran report for one customer, it is revenu by month for given year but when i ran for all customers, it is displaying only for one month.
    Thank you,
    Madhu

    Hi,
    Please any one can help on cross tab report in discoverer.
    When i ran report for one customer, it is revenu by month for given year but when i ran for all customers, it is displaying only for one month.
    Thank you,
    Madhu

  • Help me in Cross Tab

    Post Author: mak101
    CA Forum: Crystal Reports
    Hi,
    My table has following fields;
    Region,ReportMonth,ClientName,SpecialOrder1 and SpecialOrder2
    I store all client information who has ordered in that month and also mark if they have ordered special items. Here is sample data.
    Region  ReportMonth    ClientName    SpecialOrder1    SpecialOrder2
    1           Jan                Client 1          Yes                     No
    1           Feb                Client 1           No                     No
    1          Mar                 Client 1        Yes                      Yes
    I need detail report b region and in region summary i need information like:
                                                     Jan              Feb             March             .......
    Total Orders
    of Special order 1
    % of special orders 1 to total
    of special Order 2
    % of special orders 2 to total
    I have never created cross tab report, I would appreciate if someone can help me.
    Thanks.

    Post Author: mak101
    CA Forum: Crystal Reports
    Hi,
    My table has following fields;
    Region,ReportMonth,ClientName,SpecialOrder1 and SpecialOrder2
    I store all client information who has ordered in that month and also mark if they have ordered special items. Here is sample data.
    Region  ReportMonth    ClientName    SpecialOrder1    SpecialOrder2
    1           Jan                Client 1          Yes                     No
    1           Feb                Client 1           No                     No
    1          Mar                 Client 1        Yes                      Yes
    I need detail report b region and in region summary i need information like:
                                                     Jan              Feb             March             .......
    Total Orders
    of Special order 1
    % of special orders 1 to total
    of special Order 2
    % of special orders 2 to total
    I have never created cross tab report, I would appreciate if someone can help me.
    Thanks.

  • Anyone help me in cross tab report

    Hi All,
    this is my first time to build cross tab report in xml publisher
    my code is
    <?xml version="1.0"?>
    <!-- Generated by Oracle Reports version 10.1.2.0.2 -->
    <TEST>
    <LIST_G_SUMFIXED_ASSETS_COST>
    <G_SUMFIXED_ASSETS_COST>
    <LIST_G_ASSET_NUMBER>
    <G_ASSET_NUMBER>
    <ASSET_NUMBER>2402</ASSET_NUMBER>
    <DESCRIPTION>Intangible Assets </DESCRIPTION>
    <LIST_G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Dec-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    <G_FIXED_ASSETS_COST>
    <FIXED_ASSETS_COST>1</FIXED_ASSETS_COST>
    </G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Nov-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    <G_FIXED_ASSETS_COST>
    <FIXED_ASSETS_COST>2</FIXED_ASSETS_COST>
    </G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Oct-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    <G_FIXED_ASSETS_COST>
    <FIXED_ASSETS_COST>3</FIXED_ASSETS_COST>
    </G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Sep-06</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    <G_FIXED_ASSETS_COST>
    <FIXED_ASSETS_COST>4</FIXED_ASSETS_COST>
    </G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Sep-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    <G_FIXED_ASSETS_COST>
    <FIXED_ASSETS_COST>50</FIXED_ASSETS_COST>
    </G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    </LIST_G_PERIOD_NAME>
    </G_ASSET_NUMBER>
    <G_ASSET_NUMBER>
    <ASSET_NUMBER>2403</ASSET_NUMBER>
    <DESCRIPTION>Lands Al-Mashail school</DESCRIPTION>
    <LIST_G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Dec-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Nov-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Oct-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Sep-06</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    <G_FIXED_ASSETS_COST>
    <FIXED_ASSETS_COST>1400000</FIXED_ASSETS_COST>
    </G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Sep-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    </LIST_G_PERIOD_NAME>
    </G_ASSET_NUMBER>
    <G_ASSET_NUMBER>
    <ASSET_NUMBER>2404</ASSET_NUMBER>
    <DESCRIPTION>Buildings Um-Hany Arabic school</DESCRIPTION>
    <LIST_G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Dec-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Nov-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Oct-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Sep-06</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    <G_FIXED_ASSETS_COST>
    <FIXED_ASSETS_COST>109501.785</FIXED_ASSETS_COST>
    </G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Sep-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    </LIST_G_PERIOD_NAME>
    </G_ASSET_NUMBER>
    <G_ASSET_NUMBER>
    <ASSET_NUMBER>2405</ASSET_NUMBER>
    <DESCRIPTION>Buildings Um-Hany Arabic school</DESCRIPTION>
    <LIST_G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Dec-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    <G_FIXED_ASSETS_COST>
    <FIXED_ASSETS_COST>2468.5</FIXED_ASSETS_COST>
    </G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Nov-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Oct-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Sep-06</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    <G_PERIOD_NAME>
    <PERIOD_NAME>Sep-08</PERIOD_NAME>
    <LIST_G_FIXED_ASSETS_COST>
    </LIST_G_FIXED_ASSETS_COST>
    </G_PERIOD_NAME>
    </LIST_G_PERIOD_NAME>
    </G_ASSET_NUMBER>
    </LIST_G_ASSET_NUMBER>
    </G_SUMFIXED_ASSETS_COST>
    </LIST_G_SUMFIXED_ASSETS_COST>
    <SUMSUMFIXED_ASSETS_COSTPERREPO>4548732.119</SUMSUMFIXED_ASSETS_COSTPERREPO>
    </TEST>
    this my code in rtf file
         <?for-each-group@column: G_PERIOD_NAME; PERIOD_NAME?>
    PERIOD_NAME
    <?end for-each-group?>
    <?for-each-group: G_ASSET_NUMBER; ASSET_NUMBER?>
    <?ASSET_NUMBER?>     
    <?for-each-group@cell:current-group();PERIOD_NAME?>
    <?sum(current-group()/FIXED_ASSETS_COST)?>
    <?end for-each-group?>
    <?end for-each-group?>
    and this sample of output
    Asset Dec-08 Nov-08 Oct-08 Sep-06 Sep-08
    2402
    0 0 0 0 0
    2403
    0 0 0 0 0
    2404
    0 0 0 0 0
    2405
    0 0 0 0 0
    2406
    0 0 0 0 0
    2407
    0 0 0 0 0
    2408
    0 0 0 0 0
    2409
    0 0 0 0 0
    2410
    0 0 0 0 0
    2411
    0 0 0 0 0
    2412
    0 0 0 0 0
    2413
    0 0 0 0 0
    2414
    0 0 0 0 0
    2415
    0 0 0 0 0
    2416
    0 0 0 0 0
    2417
    thanks in advance

    Thanks Vetsrini for your help but when i tried to apply your code it give me the following error
    Font Dir: E:\Program Files\Oracle\XML Publisher Desktop\Template Builder for Word\fonts
    Run XDO Start
    RTFProcessor setLocale: en-us
    FOProcessor setData: E:\Documents and Settings\Administrator\Desktop\asset report\test\New Folder\testqq.xml
    FOProcessor setLocale: en-us
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at oracle.apps.xdo.common.xml.XSLT10gR1.invokeProcessXSL(XSLT10gR1.java:586)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:383)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:201)
         at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:161)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1015)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:968)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:209)
         at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1561)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:951)
         at RTF2PDF.runRTFto(RTF2PDF.java:626)
         at RTF2PDF.runXDO(RTF2PDF.java:460)
         at RTF2PDF.main(RTF2PDF.java:251)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
         at oracle.xdo.parser.v2.XSLTContext.peekExprValue4Grouping(XSLTContext.java:861)
         at oracle.xdo.parser.v2.XPathFunctionCall.evaluate(XPathFunctionCall.java:526)
         at oracle.xdo.parser.v2.PathExpr.evaluate(XSLNodeSetExpr.java:851)
         at oracle.xdo.parser.v2.XSLForEachGroup.processAction(XSLForEachGroup.java:78)
         at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
         at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
         at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
         at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
         at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
         at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
         at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
         at oracle.xdo.parser.v2.XSLTemplate.processAction(XSLTemplate.java:191)
         at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:508)
         at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:485)
         at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:264)
         at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:150)
         at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:187)
         ... 16 more
    thanks again

  • Help with formatting for Cross Tab Report Crystal 2008

    This is probably a simple question.  I have a cross tab report that displays sales by month for a period of 6 months.  These sales columns are formatted to be numbers with no decimals.  In addition to these columns, I have inserted columns that display the percentage up/down in sales over the previous month.  If I try to format the percentage columns, it changes every column to then display "##,##.##%" when I need to keep the sales columns at "##,###" with no decimal or percentage sign.
    1.  Is there a way to change the formatting of some of the columns but not all in a cross tab report?
    2.  If not, can I add a function that would change these in the calculation formula of the calculated member? 
    I tried to add "%" but it wants it to return a number.
    Here is the current code:
    //The calculation formula is used in place of the summaries in Calculated Members.
    // This calculation formula must return a/an Number value.
    If GridValueAt (CurrentRowIndex,CurrentColumnIndex-3,CurrentSummaryIndex) = 0 then 0 else
    ((GridValueAt (CurrentRowIndex,CurrentColumnIndex-1,CurrentSummaryIndex) -
    GridValueAt (CurrentRowIndex,CurrentColumnIndex-3,CurrentSummaryIndex)) /
    GridValueAt (CurrentRowIndex,CurrentColumnIndex-3,CurrentSummaryIndex)) * 100
    Any help is appreciated. 
    Thank you,
    Tobi

    Carl,
    Thank you for your help.  I did try your method but still couldn't get it to ignore the fact that it wanted a number.  I changed my approach a litte and managed to solve the problem.  Here is the method that I chose which managed to solve the problem.  If this is a poor way to solve it, please let me know as I am always open for new ways.
    Format Field > Number Tab > Customize > Currency  Symbol Tab
    Checked Enable Currency Symbol Fixed, changed  currency symbol to %.  This is the same thing that I did before which changes it for all columns. 
    Beside Enable Currency checkbox, I added this formula:
    // This conditional formatting formula must return one of the following Currency Symbol Constants:
    // crNoCurrencySymbol
    // crFixedCurrencySymbol
    // crFloatingCurrencySymbol
    If GridRowColumnValue("InvoiceLine.TxnDate") = Date(0,0,0) then
        crFixedCurrencySymbol  
    else
        crNoCurrencySymbol
    My added columns have a null date field so they take the currency format.  My other columns do not so they do not take the formatting.
    Thanks again for the help.
    Tobi
    Edited by: Tobi@TABeverage on Dec 2, 2009 3:58 PM

  • Cross tab formula help

    Post Author: ivanl
    CA Forum: Formula
    Hi,
    Using XI and win XP.
    I have been using excel to get the info I need, but thought it must be possible to do it right in the cross tab.  I need two different cross tabs, and do not know how to do the following.
    The fields I have in the dataset include:
    - product.type (different products and one field "product.type = 'customer' that is the customers)
    - product.balance (balance of each product for each customer)
    - formula for age segmentation
    What I need to input into the cross tab is to have the segmentation across the top, products for the rows and as the summary:
    1) penetration rate  (i.e. count of product types divided by # of customers which is product.type = customer)
    2) $ per customer (product balance divided by customers)
    3) $ per product (product balance divided by # of products)
    Help would be awesome.  I have no idea how to do this in Crystal
    To date, I have set up a cross tab with segment across top, products down the rows, and as a summary using count products and sum of balances.  I would input this into excel and do the calculations.
    Ivan

    Hi, this may help,
    http://www.chelseatech.co.nz/pubs.htm
    Look down on the right side, you should see
    Sample Report Files
    Sales Calendar
    Calendar Report
    Running Totals in a Crosstab
    Wrapping Crosstab
    PDF Drill Down
    Crosstab calculations
    Hierarchical Summary in a formula
    You can download an example of Crosstab Calulations from this site.
    They have some newsletters that also contain CR hints.

  • Cross Tab issue , Need a Help

    HI Expery
    In BO Webi report  need to show dynamic columns in Report after transposing rows to columns.
    Data in Table is  like below:
    Col1     Col2     Col3
    101     Abc     801
    101     Abc     802
    101     Abc     803
    101     Abc     804
    101     Abc     805
    102     RNM     2009
    102     RNM     2010
    102     RNM     2011
    103     RYZ     3465
    In Report It should be as
    Col1     Col2     Col3     Col3     Col3     Col3     Col3
    101     Abc     801     802     803     804     805
    102     RNM     2009     2010     2011           
    103     RYZ     3465                       
    We have tried implementing the same using cross tab , but issue is in Cross  col3  grows with all values present for all records. Here, if we use cross tab  we are getting result as below:
    Col1     Col2     Col3     Col3     Col3     Col3     Col3     Col3     Col3     Col3     Col3
    101     Abc     801     802     803     804     805     2009     2010     2011     3465
    102     RNM     801     802     803     804     805     2009     2010     2011     3465
    103     RYZ     801     802     803     804     805     2009     2010     2011     3465

    Hi Ahmed
    You can use the below logic.
    col1 & col2 u can keep it as columns in a cross tab. Now keep col3 as row but here you need to do one thing . Click on the formula button for col3 field and then write the following syntax in it.
    = col3 IN ([Col1];[col2])
    By using this calculation context it will fetch only the data which is related to the first two columns. so the extra data which u were mentioning about will got to the next row.
    Regards
    Shyam
    Edited by: Shyam Rapeti on Jan 25, 2012 3:20 PM

  • Formula/manual cross tab help

    my variable name in my database is rsq01. the results for this variable are 0,1,2,3,4,5.
    I need to setup a crosstab that only shows the results 1-5 and what percent of the total results they are, 0 needs to be excluded
    from the crosstab and from the count that is used in figuring the percentage because 0 is actually null.
    I have been told to do this I will have to make a manual cross tab using formulas.
    Any suggestions/examples on how to do this? Thanks.

    Pretty simple actually. Just create 5 formulas...
    //Formula 1
    Global NumberVar rsq01;
    IF rsq01= 1 THEN {TableName.FieldName} ELSE 0
    //Formula 2
    Global NumberVar rsq01;
    IF rsq01 = 2 THEN {TableName.FieldName} ELSE 0
    //Formula 3
    Global NumberVar rsq01;
    IF rsq01= 3 THEN {TableName.FieldName} ELSE 0
    //Formula 4
    Global NumberVar rsq01;
    IF rsq01= 4 THEN {TableName.FieldName} ELSE 0
    //Formula 5
    Global NumberVar rsq01;
    IF rsq01= 5 THEN {TableName.FieldName} ELSE 0
    Then group by the appropriate field, sum each of the formulas and hide the details.
    HTH,
    Jason

  • Need Help Trying to Populate Cross Tab in SAP BO WEBI

    Hi,
    I know in MS Excel I can  Drop Data into the Row and Column Label and get the following Cross Tab:
                                          HouseA     HouseB     HouseC
    Elevator Bank One     1     
    Elevator Bank Two                                      1
    Elevator Bank Three                               1
    I truly how this makes sense and if it doesn't, I understand and will keep looking.
    I need in SAP WEBI to be able to do the same thing.
    I have the Cross Tab created in Webi, but can't see how to populate the Rows of Elevator Banks to display which houses have Elevator banks.
    I want to show Elevator Bank 1 is in House A, Elevator Bank Two is in House B     as well as Eleveaotr Bank Three begin in House B
    This is just an example.
    Trying to Populate the Webi Cross Tab is driving me crazy.
    I have the Lay out but can't populate the data.
    The data contact is Alpha Characters, but I want just the Numeric Values
    When I go to MS Excel 2007 and Pivot this, I drop down the Eleveators into the Rows and Drop the Houses into the Column as well as the Value and the numerical values populate for me.
    Can't for the life of me figure out how it works in SAP WEBI
    Again, I hope this makes sense and if not, I'll keep looking.

    Issue resolved.
    I needed to created a message for HouseA, B and C which provided the item count needed
    Something like the following:
    Measure One
    Occupied: =Count([Elevator Bank One]) Where ([House A]="Occupied")
    Measure Two
    Vacant: =Count([Elevator Bank Two]) Where ([HOUSE B]="Vacant")
    Measure Three
    Unknown: =Count([Elevator Bank Three]) Where ([HOUSE C)]="UNKNOWN")

  • Help on conditionally Formatting Field in a Cross Tab

    Hi all,
    I like to conditionally format a number field in a cross tab, ie. on a certain column the number should show 2 decimal places, otherwise no decimal places.  I have tried a formula in the Decimals of the Format Field, If {Command.COL_TITLE}= "G"
    Then
    2
    else
    0.
    Column G is the one that is to display the number in 2 decimal places.  The formula runs, but it never  {Command.COL_TITLE}= "G" is never true, ever.  COL_TITLE is the columns of the Cross Tab.
    Any ideas ?
    Thanks
    Austin

    Austin,
    If you are trying to format a column then try using the GridRowColumn function.
    In the Customize Style tab highlight the column field and check what the alias for formula is. Then format the decimal places for the summarized field with a formula similar to the following;
    If  GridRowColumn("Alias for formula value") = "G" then 2 else 0

  • Please help with a cross tab

    I have a cross tab that looks like the one below.
                        Year 08                  Year 09
    Product x           10                        15
    product y             5                         10
    I want to insert a variance in a third column to show that product x had a 50% increase when comparing 09 to 08 etc... I cannot figure out how to do this in Crystal 11
    thanks

    The problem with the cross tab report in this context is that it has no idea that it will only ever contain two columns worth of data. It can't allow comparative operations based on the two data points you've identified... because what would it do if there were 3 columns? 4?
    The way I get around this (usually) is to use grouping, and summary fields to create what appears to be a cross tab, but actually isn't. You can then just use your own formulas to do the calculations, and display it however you want. This actually introduces its own world of design hurt.
    it is also possible to use the grid reference formulas to create a 'display text' that goes over the default 'total' field, but it's it a bit rubbish because the display text doesn't export...
    The exceedinly complex way to pull it off is to use arrays.

  • Cross Tab Query - Help

    Dear users,
    I have a query as below:
    select a$acct$company company,
    a$period_name "Period Name",
    a$acct$location location,
    a$acct$prime_sub "Prime Sub",
    sum (balance) balance
    from apps_rpt.us_gl_balances
    where a$acct$prime_sub between '300001' and '313099'
    and a$period_name = 'DEC-01'
    and a$acct$company in ('5110')
    group by a$period_name, a$acct$location, a$acct$company, a$acct$prime_sub
    order by a$acct$prime_sub;
    Sample output of the above query is:
    COMPANY     Period Name LOCATION     Prime Sub     BALANCE
    5110     DEC-01         50008     300001              0.00
    5110     DEC-01         52424     300001              0.00
    5110     DEC-01         52513     300001              0.00
    5110     DEC-01         50008     300008              201315.00
    5110     DEC-01         50095     300008              10403.17
    5110     DEC-01         50107     300008              0.00
    5110     DEC-01         50108     300008              -1099236.04
    5110     DEC-01         50180     300008              0.00
    5110     DEC-01         51628     300008              -6396.02
    5110     DEC-01         51734     300008              -5896.51
    5110     DEC-01         51735     300008              -8525.78
    5110     DEC-01         52423     300008              -7268.64
    5110     DEC-01         52424     300008              -6945.65
    5110     DEC-01         52428     300008              -7845.70
    5110     DEC-01         52513     300008              -11309.44
    5110     DEC-01         52514     300008              -10272.08
    5110     DEC-01         52515     300008              -3861.72
    5110     DEC-01         52516     300008              -6685.85I need to write a cross tab query whose output should be some thing as below:
                         300001          300008
    50008                  0             201315.00
    52424                  0            -6945.65
    52513                  0            -11309.44
    50095                  0            10403.17 
    50107                  0            0
    50108                  0            -1099236.04
    50180                  0            0
    51628                   0           -6396.02
    51734                  0           -5896.51
    51735                  0           -8525.78
    52423                  0           -7268.64
    52428                  0           -7845.70
    52514                  0           -10272.08
    52515                  0           -3861.72
    52516                  0           -6685.85from the above cross tab results 300001 and 300008 are Prime Sub and the amount shown is Balance. The columns to the left side is Location. Company and Period Name remain the same for all the rows.
    It would great if some one can assist me in writing a cross tab query to display results as shown above.
    Thanks
    Sandeep

    Frank,
    Thanks for your reply. I Tried your method of Dynamic Pivot, but its not working.
    My dynamic_pivot_subscript.sql script is :
    SELECT DISTINCT
           ',     MAX(DECODE(PRIME_SUB,'|| PRIME_SUB||','  AS txt1,
           'BALANCE,0))  AS '||prime_sub AS txt2
    FROM
    SELECT  a$acct$location         AS LOCATION
    ,       a$acct$prime_sub        AS PRIME_SUB
    ,       SUM(BALANCE)            AS BALANCE
    FROM    apps_rpt.us_gl_balances
    WHERE   a$acct$prime_sub        BETWEEN '300001' AND '313099'
    AND     a$period_name           = 'DEC-01'
    AND     a$acct$company          IN ('5110')
    GROUP BY a$acct$location,a$acct$prime_sub
    );Sql Plus session is as follows :
    -- Restore SQL*Plus features suppressed earlier
    SET     FEEDBACK     ON
    SET     PAGESIZE     50
    SPOOL     p:\sql\cookbook\dynamic_pivot.lst
    select LOCATION
    @@dynamic_pivot_subscript
    from
            SELECT  a$acct$location         AS LOCATION
            ,       a$acct$prime_sub        AS PRIME_SUB
            ,       SUM(BALANCE)            AS BALANCE
            FROM    apps_rpt.us_gl_balances
            WHERE   a$acct$prime_sub        BETWEEN '300001' AND '313099'
            AND     a$period_name           = 'DEC-01'
            AND     a$acct$company          IN ('5110')
            GROUP BY a$acct$location,a$acct$prime_sub
    GROUP BY LOCATION
    SPOOL     OFFWhen i use sql plus session then its giving me the following error:
    @@dynamic_pivot_subscript
    ERROR at line 2:
    ORA-02019: connection description for remote database not found
    (1) The version of Oracle (and any other relevant software) you're using
    Ans :
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Production
    With the Partitioning option
    JServer Release 8.1.7.4.0 - 64bit Production
    I either use Toad or Sql Navigator

Maybe you are looking for

  • PLEASE HELP!!  Trying to install an HP Printer

    I am trying to install my HP Deskjet 3940 to my Mac Mini. When I put in the disk provided by HP, and double click a message comes up saying: "An error occured while reading the installer data. This installer appears to be damaged". So I went to HP's

  • Is adobe photoshop cs5 compatible with MAC OS 10.7.2

    I need to update my CS3 version of PhotoShop which has been completely incapacitated by the recent update to Lion. The spinning rainbow of death.  But before I purchase CS5 I need to know that it actually works under Lion? Thx for any advice. Barb

  • IDOCs sent from sender R/3 system do not reach XI system

    Hello everyone, We have a IDOC to JDBC scenario in place. Sender R/3 system is R1A. XI system is XDA. IDOCs are successfully sent out of R1A: On R1A.(R/3) 1. WE05 shows data passed to Port OK 2. SM58 does not show the IDOC to be stuck in TRFC queue O

  • Unable to see database in Grid Control

    I installed Grid Control 10g and started both OMS service and agent. I also installed another agent on a different host. When I run macux3:1830/emd/main (this is where I installed the Grid Control) and macux4:1830/emd/main (this is where my productio

  • Data Forms - Dynamic changing months

    Hi, In my form i must have actuals and forecast. So e. g. Actuals(Jan, Feb) -> Forecast (Mar, Apr....). This layout will change next month. Actuals (Feb, Mar) -> Forecast (Apr, May....) The problem is to set-up the data form to move the "start" month