Limiting Columns in Cross Tab reports

Plz tell me how to limit columns in Cross Tab.I have many columns which go on and even are not visible for Scroll and neither in another page
Plz help.

Check if http://winrichman.blogspot.com/2009/05/cross-tab-by-limiting-number-of-colums.html is helpful

Similar Messages

  • How to count number of columns in cross-tab report

    I have created a cross-tab report and have managed to get the data out as below:
                 Jan     Feb     Mar....(display of months will auto expand) Avg/Mo  Total
    UserA     4          3        4                                                                         11
    UserB     6          1        1                                                                          8
    UserC     5          5        5                                                                         15
    Total       15        9        10                                                                        33 
    I want to insert a calculated column (Avg/Mo) into the cross-tab report based on the formula: Total/Number of Months. I used this calculation formula  for Avg.Mo column:
    (GridValueAt(CurrentRowIndex, CurrentColumnIndex+1, CurrentSummaryIndex)/GetNumColumns)
    However, I get the wrong average since GetNumColumns count the total number of columns including the column of Avg/Mo and Total.
    How do i get the number of columns, excluding the Avg/Mo calculated column and Total column?
    PS: I can't use hardcode since the number of months/columns will auto expand the months progress...
    Edited by: jutamind on May 26, 2010 9:27 AM

    ok managed to solve this by slightly changing the formula:
    GridValueAt(CurrentRowIndex, CurrentColumnIndex+1, CurrentSummaryIndex)/(GetNumColumns-2)

  • 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

  • How to Add new column in cross tab reports

    I am using crystal reports 10
    I created cross tab report for monthly sales. I need to add one more column in that report
    ex:
    Month   Customer    Part1  Part2    Part3      
    Jan         A               10       12         15        
    Jan         B                20      0           10        
    Jan         C               0         3           5          
    Feb        A               5         10          8          
    Feb        D               55        23        33        
    In above data Parts are no limit, thatswhy i am taking cross tab report.
    I am taking Month and Customer name as Rows,
    Part Codes as Colums,
    Quantiry as Total fields in cross tab Report.
    Here month field is storing as Transaction date in database, I am calculating by month
    I am getting upto this.
    User needs add one more field is Invoice no
    Month   Customer    Part1  Part2    Part3        Invoice no
    Jan         A               10       12         15          B1,B2,B3,B4
    Jan         B                20      0           10         B12,B30
    Jan         C               0         3           5           B6
    Feb        A               5         10          8           B35,B40
    Feb        D               55        23        33          B25,B56
    How to add invoice nos by group wise(By customer and  By month)
    Thank you.
    Raja shekar Reddy K.
    Edited by: Raja shekhar Reddy on Apr 16, 2009 5:10 PM

    Dear Amogh,
    Thanks for u'r  Replay.
    If i use new crosstab for Invoice no each invoice number can display like seperate columns.
    But I need Invoice  no in single column with seperate with "," or "/".
    Thanks & regards,
    Raja Shekar Reddy K.

  • More than one summary column in cross tab reports

    Hi,
    I have a cross tab report.  The summary column is SUM. I want to add another summary column next to SUM which will be AVG(Average) column.
    Any ideas?
    Please see the attached image.
    Thanks,

    hi Anurag,
    my fault...i should have looked closer at your data.
    here's the easy way of showing two sets of summaries at the end of a crosstab, without having duplicate columns.
    1) copy your existing cross-tab and paste it to the right of your current cross-tab.
    2) now go to the cross-tab expert of the new cross-tab and remove the fields from the Column dialogue
    3) change the summary to an Average
    4) exit the cross-tab expert and go to the Section Expert for the section where both cross-tabs are...ensure that you check Relative Positions
    preview the report. now you'll have to move the 2nd cross-tab a bit so that it aligns properly with the first one.
    as a sample, see the attached report. extract the contents and change the .txt extension to .rpt.
    -jamie

  • Suppressing a prior Year Month Column on Cross Tab Report

    I have two cross tab report in the footer that compares orders booked against what was shipped by month.  I need to suppress the columns (Month) for the prior year but keep the Totals.
    I have a pdf of the report

    Try to add a formula as a column in the crosstab instead of a field. Create a formula like this
    if year()=year(currentdate)-1 then
    year()
    else
    month()
    This works only for two years of data, means you need to have the record selection formula like this
    year()>=year(currentdate)-1 and year()=year(currentdate)
    Regards,
    Raghavendra

  • Hide Column in Cross Tab Report

    Hi guys,
    I have an issue with the Cross Tab in CR2008.
    I'm using 2 columns to calculate an other column, but these 2 columns should not be displayed in the report.
    I tried to suppress the column but it still shows a white space.
    I tried to change the column width, but it cant get it smaller then 0,113.
    Can anyone tell me how to set the column width smaller using a formula or how to suppress the whole column.
    Thanks in advance.
    William

    Hi William, 
    Instead of using all 3 columns in the crosstab, just drop your main columnn on. 
    In the Design window, not the Crosstab Experrt, right-click the summary field and select Format Field. 
    In the Common Tab, open the formula for Display String. 
    Now you can take the value of your summary using the CurrentFieldValue and make your total.  You may need to summarize the supporting numbers to calculate properly but it should work here properly. 
    I've used this for things like running totals and repeating values between rows. 
    NOTE: This formula only returns a string so make sure you format your final value as a string. 
    Good luck,
    Brian

  • 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.. :)

  • Cross tab report-dyanamic columns for months and quarterly sum

    Hi all,
    I work on report creation in BI Publisher.I need to display values in a cross tab report in a way that it shows data for 3 months and then a column for its quarterly sum.
    For ex:-
    Market --Jan       Feb    Mar    Q1_sum Apr May Jun Q2_sum ---------------like wise for n months
    Market1 100 --80 --30 -- 210 --10 -- 80 --90 --210
    Market2 120 --90 --40 --250 --100 --70 --30 --200
    Market3 130 --70 --60 --260 --140 -- 0 --40 --180 ('--' just to maintain indentation)
    The values of number of months( date range) and the names of market are derived dyanamically .
    The code from my sql query presently shows months-range (Jan ,feb,mar..), Quarterly sum to be displayed, Market names etc as child elements in multiple occurences main Query set.
    <Main Query>
    <Market>abc</Market>
    <Region>abc</Region>
    <Months-Range>abc</Months-Range>
    <Quarterly_sum>abc</Quarterly_sum>
    <Main Query>
    <Main Query>
    </Main Query>
    Please guide me on code in rtf template for the same.
    Thanks
    Edited by: user9061488 on Jul 13, 2010 1:32 AM
    Edited by: user9061488 on Jul 13, 2010 3:48 AM

    Hi,
    Do u have time dim in your metadata??
    If not,
    Create a time dimension year,quater,month,day
    http://lh4.ggpht.com/_rhCtHYLiamQ/S7PQvxYBbzI/AAAAAAABZXI/ef_Ur9AmyUo/s800/04_year_quarter_bmm.jpg
    After that in fact table by using the (ago/todate) function ....pull the respective columns to pivot table columns section(date column) and measures col in measures section and enable the grand total in columns section so that it will show grand total for every quarter
    thanks,
    saichand.v

  • Sorting by date in columns cross tab report.

    Hi all,
    I am working on a cross tab report in BI Publisher in which columns are generated dynamically in a pivot table depicting months as Jan 09 , Feb 09.... but data type is char.When displayed in pdf, columns are generated sorted alphabetically.
    How can I have them sorted by date in final pdf?
    or
    How can I stop the columns being sorted in pivot table at template level?
    Thanks.
    Edited by: user9061488 on Jul 21, 2010 1:13 AM

    You need to get a extra column in the query just for sorting purpose, which will have month number in it or YYYYMMDD. format, so that , it can be used in only for sorting.
    with JAN 09, FEB 09 , we can do it, but it will be little complex

  • Setting Total Column width in Cross Tab report

    I am having an issue with the width of the Total Column in a Cross tab report. I have set the width of the column and saved the report but when I am reopening the report the Total column width is expanded but rest of the data column width remains the same (which I saved). Any idea how to adjust the total column width?
    TIA,
    AJ

    AJ.
    Did you ever solve this?

  • Unable to create cross tab report with multiple level dynamic columns

    Hi Gurus,
    We are trying to develope group above cross tab report with BI Publisher.
    i am unable to achieve multiple level columns dynamically.Using cross tab wizard i can achieve single level measure column ,but not the second level column.
    Output should look like this:
    Country1
    Region1 Region2 Region3 --(level1 column)
    d1 d2 d3 d1 d2 d3 d1 d2 d3 -- (level2 column)
    Row1 10 20 30 70 80 90 40 70 90 --data
    Row2 21 24 54 65 23 64 64 76 87
    Here regions and d1 d2 d3 may vary based on xml data.Also we have page break on country.
    Thanks,
    Mahesh

    Hi kavipriya,
    Any update on this.I have set the rtf and xml to ur gmail id.
    Thanks,
    mahesh

  • Adding a column to a cross tab report?

    Hi,
    I have a cross tab Report having measures and i want to add a one xtra column to it to display the "total values'.
    i found the option to insert a row. but i didn't find it for a column.
    can u please help me on this?

    Add a Summary

  • Cross tab report's -one column display total counts of previous financial year, one column current financial year

    Hi
    I'm using CR XI. I'm attempting to create  a cross-tab report where:
               Added       Total
    AF         12            23
    F            15           30
    CO         18           50
    Where AF etc is the categoty of items, Added is the total count of previous finanical year(e.g. 1 July 2006 to 30 June 2007), Total is the total account of current finanical year.
    The count is based on created_date field(e.g. ITD.DTE -- ITD is the table, DTE is the field).
    Although I can at the moment only display the value correctly in "Added"  column, if I tried to display the Total column, the two columns always have the same value.
    How could I achieve the above desired results by using fomula? I would appreciate it very much if anyone could help me with this?
    Thanks in advance
    JS

    Create 2 formulas, 1 for the previous year and 1 for current, similar to the following;
    1) if date({Orders.Order Date}) in date(2003,07,01) to date(2004,06,30) then 1 else 0
    2) if date({Orders.Order Date}) in date(2004,07,01) to date(2005,06,30) then 1 else 0
    Add both of these formulas as the summarized fields in the crosstab

  • SAP Crystal Report - Formula in Cross Tab Report

    I have a below requirement in a cross tab report,
    Category          Name          Valu1          Value2    %ge
    A                       Car               40                  50        80
    A                        Bike             30                  60        50
    Total                                       70               110     63.6
    %ge is a formula field and is calculated as value1/value2 * 100
    Consider the Total section as a group footer.
    In the cross tab report how do I put the formula field for %ge in Total section.

    Vishujain
    Crosstabs are very structured and you are limited in what you can do with them. You can do a percentage summary in Crosstabs, but only as a percentage of the row total or the percentage of the column total. You cannot put a formula in the crosstab to do a percentage of a values in seperate rows. Any time I need to perform a function not available in a crosstab, I do a manual cross tab. Look at: [Manual Crosstab Explaination|Re: Formulas : Help for coding]
    Debi
    Edited by: Debi Herbert on Nov 3, 2011 11:51 AM

Maybe you are looking for

  • Changing Mandates in Mass

    Dear expert, We want to change in mass the status of mandates by using  FSEPA_M4 transaction. We have 3 options: 1- Button " Change mandates immediately" at the selection screen 2- Button "Change Mandates initial" at the display of the list of mandat

  • IPlanet 5.1 on Windows Cluster

    Hi! I want to install a iPlanet 5.1 Directory Server on an Windows 2003 Cluster Server but i can't find a documentation for that. Please help me - very urgent. Thanks in advance Jimi

  • Scrollpane scrolling manually to component

    Sorry that I am spamming another post that is not a question, but again I was fighting with Swing over something quite poorly documented and I must share my victory for future people that may struggle with the same (and use the forum search). Situati

  • Error message reads: Unable to read file. It appears to have been corrupted

    Any advice on what to try after receiving the error message above? What more can I tell you? Desperate!

  • Changing phone number on iPad

    Just bought I new iPad. How do I change the phone number it's linked to? Currently it's showing my husbands number as he used my apple id