NonStandard Month as Crosstab Columns - CR8.5

I have a crosstab report that currently shows items (rows) by customer (columns).
They now wish to use that report to show columns as months.  This is easy enough with regular calendar months.  However their months are non-standard calendar months, for example.
November-2010 = 29th October to 28th November
December-2010 = 29th November to 26th December
January-2011 = 27th December to 30th January
etc.
Does anyone know how I can set up a formula to allow the grouping of the order dates on these types of date ranges?
I have tried working with a select case statement as in the below example (mostly hardcoded and not really dynamic right now) but it gives the error
"A Cross-Tab column has been specified on a non-recurring field."
As far as I can tell, with all the orders in the system, these columns have recurring data.
Local NumberVar nYear := 2010
Select {Orders.OrderDate}
    Case Date (nYear, 10, 29) to Date (nYear, 11, 28) :
        sColName := "November-10"
    Case Date (nYear, 11, 29) to Date (nYear, 12, 26) :
        sColName := "December-10"
    Default :
        sColName := "Other";
sColName ;
Anyone with any ideas at all?  Greatly appreciated.  rasinc

Thanks.  I went back to basics and did get this working after I got the If statement to work as you suggested.  But I hardcoded everything first, then added the variables back in.
Note the issue was the Shared NumberVar nYear := 2010 line.  With local variables, it seems to work.  Can't use a shared variable in this setup.  I have some more work to do but at least I know why it wasn't working.  Thanks.
Local StringVar sColName;
Local NumberVar nYear := 2010;
Select {Orders.OrderDate}
    Case Date (nYear, 10, 29) to Date (nYear, 11, 28) :
        sColName := "November-10"
    Case Date (nYear, 11, 29) to Date (nYear, 12, 26) :
        sColName := "December-10"
    Default :
        sColName := "Other";
sColName ;

Similar Messages

  • Display month in the column

    hello...i have a report that actually need a layout of displaying the month in the column. the format as below:
    last month new loan (09.2008), this month new loan (10.2008), the month here will change based on the user input of the current month and the report will auto display out the month as above. is there any way that we can do this??? do i need to create another variable for this?

    Hello,
    you have to create a new variable for e.g. 0calmonth. This variable can be used in your keyfigures.
    The variable can be filled with actual month. To get the last month data you can use the OFFSET function (-1 last month) in Query Designer.
    Regards,
    Markus

  • Possible to hide but not supress Crosstab column totals?

    The reason I ask is because I really don't want to show the whole crosstab column totals section.
    Only reason I need the column totals of a crosstab is because I am taking some field values off of it by defining variables using a supression formula.
    I then take the variable and make a calculation on the crosstab itself... just not on the column totals.
    So simply put,
    Any way to 'hide' column totals in Crosstabs?  Supressing it in Cross-tab Expert would render my declared variables to zero.

    Hi Brian.
    Unfortunately, the column that would-be hidden using your method would also be something I need to show in the actual Crosstab summary calculations.
    Ultimate goal is to show all the summary calculations but just hide the "Column Totals" which also has a supression formula declared in order to use that variable in a display string within a Crosstab summary field.
    A bit complicated without showing the Crosstab but that's the best way I can explain it I guess.

  • Crosstab Column format

    Post Author: Julio Quintana
    CA Forum: Publishing
    I have a problem when I publishing a report, When I desing the report in Crystal Report XI I Format the Crosstab column with 90 Degree of rotation but When i publishing this reports in business objects the crosstab columns are horizontal, What can I do to fix this problem

    Post Author: ishu
    CA Forum: Publishing
    hello,any bright ideas? i am also stuck with this problem. any help would be much appreciated.thanks.

  • Crosstab - column subreports

    Hello,
    I'm searching for same advice, hint ... I need to make column subtotals in crosstab
    I have crostab like this
                        january 2011      February 2011    March 2013     December 2014     TOTAL
    product1               5                         6                    7                         8                    26
    product2               1                         2                    3                         4                    10       
    Product can be more, and usualy I have data from every month this abowe is only example, also time interval is set by user (report parameters)
    everything works OK but now I need to make a subtotal after every year :
                        january 2011      February 2011       subtotal             March 2013     subtotal       December 2014          subtotal         TOTAL
    product1               5                         6                      11                       7                   7                       8                              8                26
    product2               1                         2                      3                       3                    3                       4                              4               10      
    I thing it must be done by adding calculate member, but I can't reach data from dataset since I have crostab in header.
    Could someone explain me how to do this ?
    Thanks for any help

    Hi Jakub,
    Here's what you need to do:
    1) While in the Preview Mode, right-click the header cell of the first column in the crosstab (In the example above, it is the January 2011 column) > Select Calculated Member > Insert Column.
    A blank column with zero values is inserted.
    2) Right-click the header cell of this Blank Column and select Calculated Member > Edit Header formula and type in this text:
    "Subtotal"
    3) Right-click the header cell again and select Calculated Member > Edit Insertion Formula. Type in this code:
    GetColumnGroupIndexOf(CurrentColumnIndex) = 1
    AND
        if CurrentColumnIndex  <> GetNumColumns - 2 then
            Year(GridRowColumnValue("Date")) <>
            Year(GridRowColumnValue("Date", CurrentColumnIndex + 1))
        else
            Year(GridRowColumnValue("Date")) = Year(Maximum({Date}))
            AND
            Month(GridRowColumnValue("Date")) = Month(Maximum({Date}))
    Note: In the above code, replace "Date" with the Date field used as Column in the Crosstab. The double-quotes are necessary and make sure to remove any parenthesis that CR automatically adds when a field is used in a formula.
    Similarly, in the part where it reads Year(Maximum({Date})), replace {Date} with the Date field in the Crosstab however, this time use the parenthesis as in the code.
    This should insert the Subtotal Column before a new year starts.
    4) Next, right-click one of the zero values in the Subtotal column > Calculated Member > Edit Calculation Formula and use this code:
    local currencyvar x;
    local numbervar i;
    local numbervar cindex := CurrentColumnIndex;
    for i := 0 to cindex-1 do
        if year(GridRowColumnValue("Date",i)) =
           year(GridRowColumnValue("Date",cindex-1))  then
        x := x + GridValueAt(CurrentRowIndex, i, CurrentSummaryIndex);
    x;
    Let me know how this goes.
    -Abhilash

  • Crosstab column width in HTML output

    Hi,
    I have problem with column width in a crosstab report with html ouput.
    I can not find a way to control the column width, and the more I try to control this either with word table properties or with xsl attribute, the more messy it gets!
    Now the columns gets superwide and I dont have clue how to control this...
    Ant ideas of how to set the column width in the rtf template fot html output?
    It looks fine with pdf output...
    Br
    Magnus

    Thanks for your tip, but I did not do the trick exactly.
    Can you get help for this in the User guide? I have read it thru without anything...
    Anyway, I couldnt get it right with the Autofit to Window either, I need to set this for specific columns only, but when I do it on the first columns MS Word rearrange the whole table...
    Do you use it on certain columns or the whole table?
    I have to say, I have a quite complex template with several tables within other tables, and this maight mess things up...
    BR
    Magnus

  • Display last 12 months data in column chart

    Hi All,
    I have one  dashbord  requirement in list box i have (example:):  "oct-11" i need to display previous 12 mnth data in column chart anybody help in excel formula how to display last 12 mnths based on list box selection.
    example:  if i select oct-11 from list box i need to display in chart like
    nov-10 dec-10 nov-10...................................oct-11
    please provide how to write in logic in excel

    Hi Shankar,
    Try this formula in excel : DATE(YEAR(A1),MONTH(A1)-1,DAY(A1))
    A1 will be your cell which is the destination of your List box. & then drag it till 12 months.
    If you are not having day from your list box then manually enter 1 in any cell and map that cell in place of A1 for day.
    HTH.
    Neeraj..

  • Crosstab Columns Need to be two different date ranges

    I'm fairly new to CR and don't know crystal or basic syntax or any coding really.
    Using the crosstab expert, I need two columns that are based on a range of dates.  Unfortunately the range of dates are not any of the choices I have when I just bring the date into that column box in the expert.
    My two columns:
    Column 1 = 11/01/2007 12:00:00:00 AM to 10/31/2008 12:00:00:00 AM
    Column 2 = 11/01/2008 12:00:00:00 AM to 10/31/2009 12:00:00:00 AM
    When I insert a crosstab and use the expert I have two choices for the columns box.  I can either create two new formulas or use the group options.  I've tried my very inexperienced hand at creating some formulas with laughable results.  The group options, although lovely, don't meet my very specific date needs.
    Anyone out there have the time to help me?  It would be much appreciated.

    Hello Anne,
    Try creating a formula similar to the following;
    if in datetime(2007,11,1,12,00,00) to datetime(/2008,10,31,12,00,00)
    then "11-2007 to 10-2008"
    else if in datetime(2008,11,1,12,00,00) to datetime(/2009,10,31,12,00,00)
    then "11-2008 to 10-2009"
    and use this formula as the column field in the crosstab.

  • CAML Query to get Items based on Year and Month From Date Column

    Hi All,
           * As we knew that there are default columns in calendar like Stattdate,Title,Location..etc.
            * I required the CAML Query to get the list items of calender of particular Month and Year,So that I can get number of items or evetns are in Calendar
    Can any one help me how can I do this using caml query
    Samar

    Hi Stuart,
                 Thanks for your response,I had chosen 2nd option of our above mention suggestion.But when I try to fetech the data from a calendar it is showing below error .I
    had checked the below code with oter lists by changing Type to text and it worked fine.Can you please help me how can I fetech for the calulated columns
    Error
    "One or more field
    types are not installed properly. Go to the list settings page to delete these
    fields. "
    Code:
     string year="2014";
                string month="February";
                SPSite mysite = SPContext.Current.Site;
                SPWeb myweb = mysite.OpenWeb();
                try
                    SPList mylist = myweb.Lists["Calendar"];
                    SPQuery myquery = new SPQuery();
                    myquery.Query = @"<Where>
                                          <And>
                                           <Eq>
                                             <FieldRef Name='Year'/>
                                             <Value Type='Calculated'>"
    + year + @"</Value>
                                          </Eq>
                                          <Eq>
                                             <FieldRef Name='Month'
    />
                                             <Value Type='Calculated'>"
    + month + @"</Value>
                                          </Eq>
                                         </And>
                                      </Where>";
                    SPListItemCollection totaltiems = mylist.GetItems(myquery);
                   Label1.Text= "Total Number of Items is "+" "+totaltiems.Count.ToString();
                catch (Exception ee)
                    Label1.Text = ee.Message;
                finally
                    myweb.Dispose();
    Calculated Columns
    Samar

  • Customizing Crosstabs - column to show change between periods

    I didn't see anything addressing this issue.  I'm new at CR using XI and would really appreciate a little coaching.
    I've created a report to list average aged account days
    GRP1            Grp2                                                        GRP3
                                                      200912         201001          201002         201003
    MVHE     BEAVERCREEK FAMILY MEDICINE     0.0     0.0     11.9     18.0
         Total                                                0.0     0.0     11.9     18.0
    SAMARITAN
    FAMILY
    CARE     FAMILY MEDICINE OF HUBER HEIGHTS  0.0     9.6     20.3     17.6
         NORTHWEST DAYTON PHYSICIANS     12.3     23.0     27.9     38.5
                        Total                                                12.3     21.0     26.5     29.9
    Grand Total                                                       12.3     21.0     19.7     23.1
    GRP2 are locations for a GRP1 division.  GRP3 columns are prior months.  I'd like to add a column that would show amounts in 201003 column minus 201002.
    Also, I'd like to show column headings as mmm yyyy instead of yyyymm.  I tried a formula but got Feb 2010 in all columns althought the tool tip showed the same field after applying the formula as before.
    Finally, I'd like the grp2 total label to be the row value in grp1.  Does this make sense?
    Thanks.
    Edited by: wndavis on Apr 30, 2010 8:11 PM
    This looked nice in columns until I posted it. It may look better if you get into edit mode.

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • Formatting Crosstab Columns

    Hello. I am new to Discoverer and I had a question about formatting crosstab (outline) columns. The first column lists our employee names, while the subsequent columns have different pieces of information from the employees' expense reports (ie- lodging, transportation, etc). When drilling-down to obtain additional information (ie- destination), there is some blank destination information (showing as a "0'), that I want to format. Here is an example of what the report looks like:
    Employee Transportation Lodging Meals
    JOE SMITH $100 $200 $100
    Miami, FL $50 $75 $25
    Atlanta, GA $0 $75 $50
    *0* $50 $50 $25
    Is there a way to format just the employee/drill-down column to read as N/A instead of '0' without affecting any $0 data in the other columns?
    I also tried to create a condition to replace any 0(null) information with something else, but the condition did not work. Anyone have any ideas?
    Thank you,
    Erik

    Sorry, tried that. It formats all of the columns to the same null value of "N.A." So, the $0 example shown above would show up as "N.A.", which I don't want.
    I want to get the null drill-down (destination) data to show up as "N.A.", while keeping the rest of the columns as a "0" value for anything null.
    Thanks,
    Erik

  • Crosstab column formatting

    I'm creating a crosstab report with a Current Year & a Last Year column.  I've added 2 calculated columns to show a variance $ and a variance % between current & last year.
    I have no problem coming up with the results.  My dilemma is to format the 2 added columns as currency and percentage.  When I try to change the percentage column's format to percent, all other columns in the crosstab also change to percent.
    Can someone out there tell me if there's a way to create 2 different formats for the 2 added columns?  I'd really appreciate it.  Thank you very much for your help.  I've been struggling with this issue for quite sometime.

    Hi Fione,
    Here's what you need to do:
    1) Assuming that the datatype of the field used in the 'column' of the Crosstab is 'Date', right-click the 'Variance $' header cell > Select Calculated Member > Edit ColumnValue Formula and use this code:
    Cdate(1890,01,01)
    2) To the same for the % column however, use this code:
    Cdate(1890,01,02)
    3) Right-click one of the summary cells in the 'Variance $' column > Format Field > Number tab > Customize > Currency Symbol tab > Check 'Enable Currency Symbol' > Click the formula button beside 'Position' and use this code:
    if GridRowColumnValue("Date_Field_used_in_column") = cdate(1890,01,01) then
    crLeadingCurrencyInsideNegative
    else if GridRowColumnValue("Date_Field_used_in_column") = cdate(1890,01,02) then
    crTrailingCurrencyOutsideNegative
    4) Click the formula button beside 'Currency Symbol' and use this code:
    if GridRowColumnValue("Date_Field_used_in_column") = cdate(1890,01,01) then
    "$"
    else if GridRowColumnValue("Date_Field_used_in_column") = cdate(1890,01,02) then
    else ""
    Note: In both the formulae above, replace "Date_field_used_in_column" with the database field you've used in the crosstab's column. The double quotes ARE NEEDED and make sure to remove any parenthesis that CR automatically addds when you add a database field in the formula editor.
    Let me know how this goes.
    -Abhilash

  • Crosstab column totals

    I have a web intelligence crosstab report which contains 10 pages in the report.Once I select a column and insert a sum for a column the column sum is displayed in the last page footer.Is it possible to display the column sum in the first page in the header of the report so that the users can refer to the column sum as soon as they view the report?Is it possible to add a row beneath the column headers and display the totals there?

    hi sridhar,
    it is simple, go to last page and click on total, drag and drop the above of  table where you see blue border....
    it is like a MS WORD (ms office) Header type.
    Thank you.
    Praveen

  • Use average of crosstab columns in a calculation in the crosstab.

    Using XI R2  I have a crosstab where I need to have the average weeks sales i.e. the sum of one row divided by the number of columns. I've done this in two ways -
    =Average([Forecast Weeky Qty]; IncludeEmpty)
    =[Forecast Weeky Qty]/Count([Forecast Weeky Qty])
    both of which return the correct value provided it is displayed in a cell outside the crosstab. The problem is if that variable is used in the crosstab it just displays the [Forecast Weekly Qty] for that column i.e. it's not doing the calculation at summary level as I need.
    How can I create an average that will display in the crosstab as the same figure in each column (the overall average) and can therefore be used to calculate another row in the crosstab?
    eg
    Sales - 50, 50, 75, 25, 50    should give average of 50. What I get when I put it in crosstab is
    Avge - 50, 50, 75, 25, 50    WRONG.  What I want is
    Avge - 50, 50, 50, 50, 50
    Thanks
    John

    No, your query doesn't work as illustrated below. Your SQL returns views. Your SQL returns rows that have data that isn't null in them because it relies on the table analyze data which will be out of date when the query is being run.
    select * from user_tab_columns u
    where u.HIGH_VALUE is null;
    no rows selected
    SQL> CREATE TABLE test1
    a    NUMBER
    Table created.
    SQL> select table_name from user_tab_columns u
    where u.HIGH_VALUE is null;
    TABLE_NAME
    TEST1
    SQL> CREATE VIEW test_view AS
    SELECT * FROM test1;
    View created.
    SQL>
    SQL> select * from user_tab_columns u
    where u.HIGH_VALUE is null;
    TABLE_NAME
    TEST1
    TEST_VIEW
    SQL> INSERT INTO test1 (a) VALUES (1);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from user_tab_columns u
    where u.HIGH_VALUE is null;
    TABLE_NAME
    TEST1
    TEST_VIEW
    SQL> select * from test1;
             A
             1
    SQL>

  • To Display two previous months YTD-Actual columns from the current month

    Hi All,
    i want to create a FSG report in which i require three columns describing months one for the current month and two for the previous months in order like if i run report in Oct 06 then other columns will be Sep 06, Aug 06 is this possible?
    if yes then how ??
    i m using POI-2 and POI-1 which is giving wrong results.
    thanks.

    i got the solution:)
    i was just assigning an offset to the cumulative column as well.

Maybe you are looking for

  • Issue while loading of data from DSO to InfoCube

    Hi Experts, Can you tell me what might root casue if data is coming into DSO from R3 its correct and fine as required but while loading it to InfoCube from DSO its showing wrong data like some of Line Items that were closed were shown open in Cube AN

  • Error while trying to install jwsdp1.4 on linux

    I was trying to install java web service on my account. But having some problem. i have download j2sdk-1_4_2_05-linux-i586.bin and installed in my user directory /scratch/huda/Java/j2sdk-1_4_2_05-linux-i586 Also set the JAVA_HOME , PATH And CLASSPATH

  • Order BY with ROWNUM in Select List

    Hi, I have query like bellow for Oracle 11g: create table em_c (vl_s_ec int,id_em_em int,id_empcre_ecr int, id_em_ec int); create table em (id_em_em int) Select e.id_em_em , NVL( (SELECT * FROM(SELECT a.vl_s_ec FROM em_c a WHERE a.id_em_em = ec.id_em

  • Pan | Zoom: how to get image offsets when panning

    Hello, I am trying to use the Pan | Zoom control to show images, allowing zoom and pan. I haven't found yet a way to infer the X,Y offset of the part of the image that it's displayed in the imageviewer visible rectangle. I need these details in order

  • Spry Menu using SSI?

    I am new to CS5 and getting a bit discouraged.  I have created a container and then Inserted DIV tag for header, footer, top menu bar, left side menu bar.  However when I add the SSI using the insert ssi and then attaching the page this happens - my