Cross tab on quarter (date) parameter

Post Author: tomahawk
CA Forum: Charts and Graphs
I need to design a cross tab report where the column is a certain date field (say date1). However, the report is a quarterly report, so the columns should be for each quarter (date1 falling in a particular quarter). The user wants to select the quarter from a drop down parameter box at runtime. How do i set the condition/formula for the cross tab to display details for the quarter that the user selected?
Please help urgently.
Thanks
Tom

Post Author: sleahcim
CA Forum: Charts and Graphs
Hi Tom,
While there may be some method to do it by playing around with the formatting, you're likely to get it done quicker by creating a formula for your quarters, and swapping that field into your crosstab.  Here's a sample report that shows you how to create a quarter formula.
-Michael

Similar Messages

  • Exporting Cross Tabs to Excel - Data Only

    I have a report with three cross tabs embedded in three report footers (RFa, RFb, RFc).  The third cross tab in RFc, is actually in a subreport.  When I preview the report and then export to excel in Excel Data Only there is no problem.  Howeever, when I export the report (with the same export settings as before) without previewing it first, it truncates the data found in the first and third crosstabs.  Anybody have any ideas on what could be causing this?  I have played with the settings in the export options and have gotten it to export the first and second crosstabs without previewing but the third crosstab is still a problem.
    I thought that Crystal reports would export exactly what is in the report and I do not know why previewing should matter or not?
    Thank you for your help!

    Athalia,
    I tried to recreate the issue using the Xtreme sample database with 3 crosstabs in RFa,b,c with hours of the day as columns. First crosstab has rows for Region, second uses City, and third uses Country.
    All 3 are summarizing Customer Credit ID and the 3rd has the sum of Last Years Sales and count of Address1.
    When I export this I get the correct result whether the report is previewed or not. I am using the exporting options, Maintain Relative Object position, Maintain Column Alignment, and Simplify Page Header
    I would suggest;
    a) Ensure that the 3 crosstabs are left aligned and that the column widths of all 3 are the same
    b) If there are any other sections in the report that are visible try suppressing all but the 3 sections with the crosstabs in them, will it export now?
    c) Try recreating the 3rd crosstab adding just 1 summarized field at a time until it fails and then any formatting that you had done until it fails to try and narrow down what is causing the truncation
    d) Try creating a similar report using the Xtreme sample database to see if you can recreate the issue and if so then document the steps so that I can recreate it.

  • Cross-Tab Report Custom Date

    Hello everyone,
    I need some help with changing the date interval in Cross-Tab Reports.
    I ran the report annually; however, the dates I want to run is really specific.
    How can I change the date intervals? Is this possible?
    Date below are 01/01/12 - 12/31/12, 01/01/13 - 12/31/13, 01/01/14 - 05/28/14. Instead of this I want to run the report 05/28/12 - 05/28/13.
    05/29/13 - 05/28/14

    Ido,
    Thanks for your reply.
    Is this how the formula should look like?
    If CDate({ORDR.DocDate}) >= Cdate("05/28/2012") and Date({ORDR.DocDate}) <= Cdate(
    "05/27/2013") then
    {RDR1.Quantity}

  • Cross Tab export : Excel Data Only - Row headings are *bottom* aligned?

    Hi All,
    Having a problem with Crystal 11 / BOXI.
    I have a Cross Tab working fine that has four Row groupings (labels on the left).
    In Preview mode, it looks as expected. Row #1 label appears on line 1. Row #1 label shows blank on line 2,3,4 etc until it is ready to change.
    The organization of the Row group is further made clear by a nice box that spans multiple rows. The Row label appears at the TOP of this box as you might expect.
    In Excel-Data Only format, there is a problem. (I saved, scheduled, and ran on BO XI Enterprise CMC console.) The Excel file shows the Row 1 labels without any box (that's OK as it is "data only") however the text is bottom aligned. So the first label does not appear until the final row of the grouping.
    Same thing is happening with Row 2, 3 groupings, they are all bottom aligned.
    It's confusing for the users who would expect the Row grouping labels to be all top-aligned.
    I have searched the forums and support site and read all technotes. I also tried several things including:
    Format Field for Row#1 Name, choosing Left/Right/Center horizontal alignment (where is the same for vertical??)
    Within BO Enterprise, try combinations of options under Excel - Data Only : export formatting, maintain relative object position, maintain column alignment, use options saved with report, etc.
    Any ideas? Is there a way to force a top-alignment programmatically, for Excel Data Only output?
    Help appreciated !
    Rob McCauley
    Cognex
    Natick, MA 01760 USA

    I found the answer to this question with help from SAP Support.
    In the Cross-Tab Expert, Customize Style tab, click "Column Totals on Top".
    Then, the Excel Data Only report will show the row titles Top-aligned for the row group.

  • Cross tab & Line Graph – Data Sorting issue

    Hi,
    Want to display data in specific order in cross tab row & in graph as shown below
    Account Name
    Average
    Median
    In the same order data has been retrieved from the database but when it comes to Crystal report, its reordering the data in alphabetical order as shown below due to the order set in Group option
    Example: 1
    ABC
    Average
    Median
    Example: 2
    Average
    Median
    XYZ
    Please note u201CAverageu201D & Medianu201D are constant but Account name will vary based on selection.
    How this can be achieved? How Specific Order can be used in this case?
    Please help... Itu2019s urgentu2026
    Thanks,
    ThakurS

    Hi
    Under "chart expert" in "data" tab where you add the fields in chart you see "on change of" and "show" values..
    After adding the required on "change of fields" if you would highlight that field "group option"  tab will get enabled where you will find the "sort order" drop down. There is an option "In Original Order" which will sort the fields as fetched from Database
    Same option is available in Cross-Tab
    Regards,
    Shantanu

  • Create CROSS-TAB Arrange Column data (sort Data)

    Dear,
    I have created CROSS-TAB and left axix has has data like
    aa
    bb
    cc
    dd
    but i want result like
    cc
    aa
    bb
    dd
    Please quide me how to arrange data with my own will.
    Regards

    I've found that when the sort is out of the order I want, it's necessary to set up a calculation that sets a key to use instead of the field value.
    So case when field = 'ccc' then 'a. ccc'
    when field = 'aaa' then 'b. aaa'
    and so on.
    That initial character then forms the basis of the default crosstab sort.

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

  • Grouping in Cross Tab

    I have a cross tab with a date in column 1. I have it grouped by week. This makes the date displayed as a Sunday date, since day 1 is Sunday. If I change the group option to last day, it displays a Saturday date. I would like to see this date as a Friday date.
    Is there a formula I should use, or is this a CR option that I should change?
    Thanks for any input.

    Hi,
       Create a formula as
    DayOfWeek ({Orders.Order Date},crFriday)
    Insert the group on this formula.
    In group Options > Options > Select the option use a formula as the grooup name> insert the date field as totext(Datefield).
    Regards,
    Vinay

  • Alerters in cross tab report

    Hi,
    I  have multiple crosstabs reports in a single tab each running on a different query.
    1st cross tab
    I created a crosstab report which has Account names,in the left column, dates in the top row header and account data in the data cell. This reports runs for historical dates example 01/2008-10/2008.
    I have caculated the average for this report and named it hist avg.
                       months
    acct names  data for each month      hist avg
    2nd cross tab
    I am using a different query which has account names and a single value(Field Value) for each account name.   eg  acct names    Field Value    Field Value* Hist Avg  (Caculated)= target   histavg(forsort)
                     Acct 1                   3
                     Acct 2                   29
    3rd cross tab
    I created a crosstab report which has Account names,in the left column, dates in the top row header and account data in the data cell. This reports runs for current dates dates example 01/2009-04/2009.
    I have caculated the average for this report and named it Current Avg.
             months
    acct names  data for each month      curent avg   Hist avg for sort  target
    ISSUE :
    I need to put alerters on 3rd cross tab based on target calculated in 2nd cross tab.
    All 3 cross tabs are mergered on acct names. and sorted according to desc hist avg
    But when I put alerters it is not working. Cross tab 1 and 3 has same query but different date prompts.
    I tried merging date dimensions. Now wht I have got is both cross tab displays histavg dates+ Current dates but data for only hist dates or current dates. I used hide empty coloums, So it doesn't show emplty coloums. and was able to bring hist avg in 3rd cross tab.
    BUT ALERTERS ARE NOT WORKING.
    Field value is a standalone derived table.
    Is there are way to use alerters on acct data from one cross tab into anothers when both are running on different dates.????
    Thank you in advance

    Look at the Total Wizard. You should be able select the right options to have totals at different level of the data. Also give us an example what you want to achieve.

  • Convert cross tab with 2 summarized fields to a chart

    Greetings,
    I have a simple cross tab containing a date row and 2 summarized fields. It looks like this (see Figure 1)
    When I convert (insert) my cross tab into a stacked bar chart, I only get one of the summarized fields to show up on the chart. It looks like this (Figure 2)
    Is there a way for me convert this cross tab into a stacked chart so that both of my summary fields appear?
    Many Thanks!

    OK... Thank you.
    I was using the cross tab  in hopes of controlling graph labels for months (Customize Group Name field) . What I was doing was converting dates to month verbiage (Sep, Oct, Nov, etc) so that the month verbiage would appear on my graphs instead of the numbers while still maintaining proper calendar order . (thanks for showing me this technique by the way as it works great). Too bad it does not work when there is more than one summary field (thanks for explaining its limitations... I had not told you that I was adding a second summary field).
    Given that I have 1 row ( Date_discharge) that I need to display as months (verbiage) in calendar order
    and
    Given that there are 2 summary fields: Vaccine Indicator (a sum) and Birth_date_Baby (a count) ...
    (I am contrasting # of vaccine's given against total babies per month in a monthly stacked bar chart)
    Is there a way to display 2 summary fields on a stacked bar graph grouped by month (where the month is listed in alpha format, (Sep, Oct, Nov, etc.) but still sorted by its calendar value? My initial attempts to do this in a graph (without a cross-tab) would display the month verbiage just fine, but it would order my months alphabetically.
    Thanks again for your suggestions!

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

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

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

  • Detail-Data in Cross-Tab

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

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

  • Calculations based on Summarized data in Cross Tab

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

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

  • Cross tab Date Column Grouping

    Hi,
    I have a cross tab in my report which displays no of tickets opened grouped by day, week or Month, grouping is done based on a parameter GroupBy, which has Day, Week, Month values
    Incident   Jun -99  Jul-99
    Priority1      10          20
    Priority2      45          23
    if user selects day or week, cross tab should display column in dd/mm/yy format, if its month, MMM-yy format.
    I have created formula which returns a date type
    GroupBy = Day then Opendate
    GroupBy = Week then opendate -dayofweek(opendate)+1
    GroupBy = date(year(opendate),month(opendate),1)
    and used this date formula as column in cross tab. I tried to format using custom date style...but its not working in cross tab.
    if I use totext to format the date formula, data will not be in sorted order...ex, its showing jul-99 before jun-99
    can anyone help?
    Thanks in Advance,
    Jyothi

    You can avoid multiple cross tabs by using the Display String expression under Field Formatting.  The expression that is entered in this field is what is displayed as the field value in the report.  Use the same logic as you are using for calculating the value, except return CStr(CurrentFieldValue, <format>), where <format> is the formatting code for the desired date format based on GroupBy.
    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?

Maybe you are looking for

  • Where i could get know each order types's internal format

    Dear expert, Whcih table or from where could i get to know the internal format for each sales doc type... For example: KM equals to CQ TA equals to OR.. Etc... For my Z customrized order type, does there also have one internal format order type?? Bec

  • Firefox won't close completely, CTL+N and hyperlinks don't work

    After many years of loving Firefox, lately it is causing me nothing but headaches. If I close Firefox, it doesn't close completely and continues running in the background. It often hangs and sucks so much CPU (upwards of 78%) that my entire system vi

  • JAVA Enhancement Package2

    Greetings! Enh.Pack2 damaged my system again and did it gently Now my ports (50200, 8002) don't work, but all J2EE process are green in MMC. I try to stop and strart J2EE - it doesn't help. I though that it can be that some services are deactivated (

  • Finding duplicates in itunes 11

    How do i show my duplicates in the new itunes 11 i can not seem to find it, it is not where it used to be? Thanks

  • To Create a Opportunity Using the FM

    Hi , I want to create a Opportunity by usinig the FM CRM_ORDER_MAINTAIN i want to pass In sales cycle phase , status, phase since , status since , Reason In relationships  Campaign , Referance Object so What are all the EXPORTING tables and CHANGING