Cross-Tab - conditional suppression and formatting

I have a cross-tab report of "widgets" sold. There are $10 widgets, $20 widgets, and $50 widgets. All widgets will always cost some round dollar amount, never anything like $10.99. My report shows weekly, month-to-date, and year-to-date sales for each widget denomination by both count and total amount by state. For example:
                               $10                          $20                              $50
     count     amount       count       amount         count       amount
New York
       Week        5             $50           4                 $80             1               $50
        MTD
        YTD
Delaware         1              $10
etc.
I also have totals by row, along with mark-up amounts (11% of gross sales amounts) and net sales (gross - mark-up). These last 3 columns are included in my dataset, not calculated in the cross-tab.
My problem is that I can't figure out how to do 2 things:
1.  the count columns for mark-up and net will always be blank, so I want to suppress the "count" column header
2. I want to display the dollar amounts for those 2 columns with 2 decimal places, but the other amounts with no decimals.
Can this be done, and if so, how?
Thanks!
Phil

Hi Phil,
I also found the following information under Cross-tab Help for suppressing rows or columns.  I hope this is what you're looking for.  Sylvie
To suppress empty rows and columns
Right-click the blank top-left area of the Cross-Tab and select Cross-Tab Expert from the shortcut menu.
The Cross-Tab Expert appears.
Click the Customize Style tab.
Select either the Suppress Empty Rows or Suppress Empty Columns check box.
Click OK.
Now, when you print the report, empty rows and/or columns will not appear.
To suppress row and column grand totals
Right-click the blank top-left area of the Cross-Tab and select Cross-Tab Expert from the shortcut menu.
The Cross-Tab Expert appears.
Click the Customize Style tab.
Select either the Suppress Row Grand Totals or Suppress Column Grand Totals check boxes.
Click OK.
To suppress subtotals and their labels
If you have more than two groups in your Cross-Tab you can suppress the subtotal and label for one of them.
Right-click the blank top-left area of the Cross-Tab and select Cross-Tab Expert from the shortcut menu.
The Cross-Tab Expert appears.
Click the Customize Style tab.
Click the field whose subtotal you want to suppress.
The Suppress Subtotal and the Suppress Label check boxes become active.
In the Group Options area, select the Suppress Subtotal check box.
Click the Suppress Label check box to suppress the label associated with subtotal.
Click OK.

Similar Messages

  • Cross-Tab Conditional Formatting

    Hello Everyone
    I have a question, I am working with on a cross-tab table version 2008 that requires a dollar symbol in some of the columns, but not all of them. I tried to fix this problem with a conditional formula, but for those columns that are calculated members, it does not work. Any ideas? Your help will be greatly appreciated.

    In Format Field -> Common there is a formula called Display String.  Use this to output the exact string that you want to display in the report.  Perhaps something like (basic syntax):
    if GridRowColumnValue("Group 1") = "Sales" then
      formula = "$" + cstr({CurrentFieldValue, "0.00")
    else
      formula = cstr(CurrentFieldValue, "0")
    end if
    which will show something like $123.45 in the Sales column, or 123 in the Qty column...
    HTH,
    Carl

  • Cross Tab keeps suppressing rows with no data

    I have a Crystal Report that is using a Cross Tab.  I have 2 rows in the cross tab the first row is the Month name and the second row is the Day Number of the month, and the report will print the Month Name on the left followed by all the Calendar Day Numbers in the month.
    The problem is that when there is no data for a Day Number row the entire row is not shown.  So you might have day number 1, 2, 3 and then jumps to maybe 6.  I found that the ones the cross tab was not showing did not contain any data.  I just need the calendar day number to at least print so the days read sequentially instead of jumping to 6 or another number.
    Is there any way to show the rows even if they don't contain any data?
    I have right clicked and gone into the Cross Tab expert and there isn't anything checked to suppress rows.  I don't understand why its still suppressing rows!
    Is there a global report option that I missed that says "suppress rows when there are no records"?
    Thank you all in advance,
    I am using Crystal Reports XIR2 with Service Pack 4

    I am still not getting all rows to show up on the report.   The rows that are not showing up contain no data in the cross tab but the row still needs to show.
    The only reason I got it to work before was because I selected all values for the columns parameter so it brought back everything in the database that was why it was able to show all values.
    I have two tables one is a date database and contains all the dates till 2012.  The other is the product data which contains the product code and qty that the cross tab summarizes.
    I have done a left outer join from the product data to the date database, and I am still not able to get all the dates to list for the selected time range. 
    I was able to get the dates to show up when I right clicked the link and modified the link properties.  I chose Left Outer Join and then under Link Type I selected ">" in the database expert dialog.  This brought back all the dates but the data in the report was all the same.  Probably just the first record repeated all down the page.
    Any ideas how to fix this problem?

  • Cross Tab Column Header and Embedded or Calculated Member

    Hello All
    I am needing some help with a Cross Tab in CR2008.
    My Cross Tab look as follows:
    Rows______________Columns
    ......................................Fiscal Year
    Account Number...........Summarized Field (Value Field)
    The report spans three Fiscal Years but not all accounts have three Fiscal Years worth of data so some Cross tabs start 2009, 2008, 2007, Some report 2008 and 2007, Some just 2007 (and other variations). To get my cross tab working correctly I need to create a formula that get the CurrentColumnIndex based upon the Fiscal Year. e.g. If columnd header = 2009 column index = 0.
    Can anyone advise how I would go about this?
    Thanks
    Phillip

    Phillip, go to your data source, and see if you can add a new connection,
    one of those options should be (Command)
    if you can add a Command, then you can put the SQL in the command section.
    You will need to add the Command as a data source, and remove the old
    data source once the command is added, you will be able to edit it if needed.

  • Cross-Tab and Top-N

    Dear Experts,
    How can I add Top-N into Cross-Tab?
    Thanks,
    David

    Hi David,
    Right-Click on the top left corner of the crosstab and select 'Group Sort Expert'.
    This opens up the Cross-Tab Top N and Sort Expert. Specify the Top N value for the groups here based on one of the summary values.
    Hope this helps!
    -Abhilash

  • Dynamically color to each column in Cross-tab report

    Hello All,
    I am a newbie in Crystal report,from last few weeks, i am working on cross tab crystal report.i have a requirement to show color dynamically for each column.i am adding an attachment how i want it. i tried dynamic coloring using object field formula but it is showing red color to all data.i want red color data when in 2nd  cross tab report data is beyond upper or lower limit in first cross tab table. it will be very helpful if somebody will give me any clue on this.... i read so many articles now it seem like impossible for me..:(
    i am using visual studio 2010 and sap crystal report version 13.0.0.99 for visual studio 2010.

    Hello Manish,
    I have attached a sample report that does this. You will need to remove the .txt extension from the attached file to open it as an .rpt file.
    Please right click on one of the value fields of the first cross tab in the report > Format Field > Common > Suppress if Duplicated conditional formula.
    The nested formula is as follows;
    numbervar array l;
    numbervar array u;
    numbervar x:=CurrentColumnIndex;
    if GridRowColumnValue ('@limit') = 'lower limit' then
    (redim preserve l[x];
    l[x]:= tonumber(CurrentFieldValue))
    else if GridRowColumnValue ('@limit') = 'upper limit' then
    (redim preserve u[x];
    u[x]:= tonumber(CurrentFieldValue));
    false
    So it assigns each lower and upper limit value for each client (in the sample it is country) to an array using the cross tabs column index to index the array and it ends in False as we don't actually want it to suppress if duplicated. This nested formula is just used to generate the arrays of upper and lower values.
    In the second cross tab if you again right click on one of the value fields > Format Field > Font > Color you will see the following conditional formula;
    numbervar array l;
    numbervar array u;
    numbervar x;
    if not(tonumber(CurrentFieldValue) in l[CurrentColumnIndex] to u[CurrentColumnIndex]) then
    crred
    else
    crblack
    So this compaes the current field value to range generated by the 2 arrays and assigns a color based on whether or not it is in the range.
    Regards,
    Graham

  • Cross-tab report functionality does not support .csv export.

    I want to export the cross tab report in .csv format , but when I export the cross tab report to .csv format only header and footer gets printed multiple times and data is not getting exported.

    No , cross tab report does not getting properly exported in .csv format. Only header and footer gets printed multiple times and data is not getting exported. 
    does cross tab report support .csv export based on WYSIWYG?

  • 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

  • How can I avoid the null values in cross tab?

    How can I avoid the null values in cross tab?

    Hello Anindita,
    Let me explain you the problem in detail.
    I have selected User and Program as rows in the cross tab. In Summarized Field I am counting the Programs.
    In DB I can have both User and Program null.
    Letu2019s take these scenarios...
    1) For a User, Program can be null
    2) For a Program, User can be null
    3) And both can be null.
    A null Program does not give problem since Cross tab does not count the null values and in my case too, it remove the Program which are null from the Cross tab because of the counting its doing on Program. Hence scenario 1 and 3 is not a Problem.
    Problem comes in scenario 2 (For a Program, User can be null).
    In this case since Program is not null it will get counted and will be grouped under null user but I donu2019t want to show the null user Grouping in my cross tab.
    "Suppress empty rows" and "suppress empty colums" does not help.
    Thanks & Regards,
    Amrita

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

  • BIP Cross tab report

    Requirement is to display cross tab report in the format mentioned below
    Currency Denominations
    ----------------------------------1000-------500---------200--------100-----
    AED ---------------------------abc----------xya----------pqr-------www
    ----------------------------------1000-------500---------100--------50-----10
    INR ---------------------------abc----------xya----------pqr-------ww------uuu
    ----------------------------------100---------50-----------20---------10-----5
    USD ---------------------------abc----------xya----------pqr-------ww------uuu
    where number denotes the various denominations for a currency, text values denote the cell value, for the sake of simplicity only one row is displayed.
    Normally in a cross tab report, column values are fixed for each row value, but as illustrated above, each row has a different set of column values.
    How to achieve this format.

    http://winrichman.blogspot.com/search/label/cross%20tab

  • Cross tab SQL

    hi all , im a beginner in SQL and just discovering oracle and Java so i made a small database : 1 table
    and i did the Database connectivity with my platform Java ( Netbeans) and every thing was okay.
    i started looking for how to create a cross tab between 2 elements from my table but i couldn't find the SQL script to do it
    my table is :
    ID--NAME--SURNAME--LOCATION---GRADE
    i want to have a cross tab between locations and the grade which calculatin the count of ID in each field so to create the interface in java so any help plz
    i know its somethin classic but im just a new beginner and im trying to create a simple database application
    i USE ORACLE 10G XE and NETBEANS
    thnxx

    Hello,
    welcome to the Oracle forums. This is the forum for the tool "SQL Developer". Questions about SQL and PL/SQL have their own forum at PL/SQL
    Best Regards
    Marcus

  • Cross tab reports sturcture

    Hi ,
    I am trying to create a cross tab report in the format mentioned below. how do i get the same. what type of SQL do i need to put in place to achive the same.
         Jan-07                    
    Count Portfolio Amount Count % from total
    salary < 10 K --> 100 20000     50%     
    salary > 10 K --> 100 30000          50%
    Awaiting a realy quick reply.
    Thanks all

    Something like that ?
    SQL> select * from mytable;
    MYID                                               MYDATE         MYSAL
    1                                                  17-JUL-07          0
    2                                                  17-JUL-07          5
    3                                                  17-JUL-07          8
    4                                                  17-JUL-07         15
    5                                                  17-JUL-07         19
    6                                                  27-JUN-07         20
    7                                                  16-AUG-07          2
    7 rows selected.
    SQL> select round((count(case when mysal<10 then 1 end)/count(*))*100,2) less_10,
      2         count(case when mysal<10 then 1 end) nb_less_10,
      3         round((count(case when mysal>=10 then 1 end)/count(*))*100,2) higher_10,
      4         count(case when mysal>=10 then 1 end) nb_higher_10
      5  from   mytable
      6  where  to_char(mydate,'mm')='07';
       LESS_10 NB_LESS_10  HIGHER_10 NB_HIGHER_10
            60          3         40            2Nicolas.

  • Cross tab in Oracle8i

    why access such a small database can provide cross tab query
    facility and not by oracle, if somebody knows the real and
    flexible method of doing this plz be informs us.I will be highly
    oblized
    thanks

    I came across this example recently on the site:
    http://www.onwe.co.za/frank/faqscrpt.htm
    I believe this is what you're looking for...
    rem -------------------------------------------------------------
    rem UPDATED VERSION
    rem Filename: matrix.sql
    rem Purpose: Example of a CROSS MATRIX report implemented
    using
    rem standard SQL.
    rem Date: 12-Feb-2000
    rem Author: Frank Naude ([email protected])
    rem
    rem Updated By Mahesh Pednekar. ([email protected])
    rem Description Removed the Main query because the sub query
    itself
    rem will full fill the requirement.
    rem -------------------------------------------------------------
    SELECT job,
    sum(decode(deptno,10,sal)) DEPT10,
    sum(decode(deptno,20,sal)) DEPT20,
    sum(decode(deptno,30,sal)) DEPT30,
    sum(decode(deptno,40,sal)) DEPT40
    FROM scott.emp
    GROUP BY job
    -- Sample output:
    -- JOB DEPT10 DEPT20 DEPT30 DEPT40
    -- ANALYST 6000
    -- CLERK 1300 1900 950
    -- MANAGER 2450 2975 2850
    -- PRESIDENT 5000
    -- SALESMAN 5600

  • Cross-tabs in Multiple Sub-reports

    Post Author: Kiwi Jan
    CA Forum: Crystal Reports
    I have created a crystal report which contains multiple detail sections (Da-Di). Each detail section contains a subreport, which contains a cross-tab.
    I have done this because I need to create one excel spreadsheet which contains data from different types of cross tabs.
    For example, one cross tab lists accounts and totals, the second lists accounts and totals by cost centre (17 of these), and a third lists accounts and totals by product group (11 of these).
    I have lined up all the columns perfectly, and when I export to Excel (Data only), it works perfectly, and I get all the rows and columns of all the cross-tabs in one excel worksheet. Brilliant.
    However, when I print, preview or export to pdf, I only see the "real" page and do not see any virtual pages that are shown in each of the sub-reports.
    How can I print or view this from the main report and get the virtual pages as well, without stuffing up my export to excel?
    Any suggestions would be greatly appreciated.

    Hi Kim,
    What version on Crystal Reports are you using? If its CR 2008 then you can take advantage of the various gridvalue functions and the calculated member feature available.
    Here's what you need to do:
    1) In 'Preview' mode, right click the 1st col and select Calculated Member > Insert Column
    2) This will insert a col after the 1st col. To make the newly added col appear 1st, right click on the top left corner of the crosstab and go to Advanced Calculations > Calculated Member
    3) In the Properties area, set the Insert Evaluation to 'Before'
    4) Now the new col would be the 1st col in the crosstab and it's values would be 0
    5) You said you calculate the Billed Amount on some logic; you can apply the summarization logic by editing the calculation formula
    6) Right click one of the 0 values in the new col and select Calculated Member > Edit Calculation Formula. Use the formula in this manner:
    select Gridlabelat("Row",currentrowindex)
    case "Job1" : 50
    case "Job2" : 20
    Default : 0
    The function GridLabelAt() accepts 2 parameters: 1st is the name of the row. In this case it would be your database field name. Suppose your database field used as a row is called Customer.Country then the formula would be:
    Gridlabelat("Customer.Country",currentrowindex)
    You can use if-else instead of the select -case if you like, but this is where you need to apply the logic for billed amount.
    At last, you'd notice that the Header for this col is blank. Just Right click the blank header and select Calculated Member > Edit Header formula and type in "Billed".
    That's it! The grand totals for the row won't add the values from the calculated member.
    Hope you get this working.
    -Abhilash

Maybe you are looking for