Calculation in crosstab report

Hi
i am using visual studio 2003 to devlop reports.
In a cross tab report  i took description, aspect as row and id as column and pointvalue in summarized field.
now my report look likes
d1   a1    0     1    1(total)      50%( percentage 1/2)
how to calculate percentage.
Thanks.

well when you place any field in the row of the crosstab it makes it as a group anyway. So asking whether it is mandatory or not is not a question. It will do it as default.
You have to adapt the same concept of percentage as what you do in other reports, if the percentage in the crosstab is not coming out as expected or you want to change it then you can use either Display String (X+2) under format field, to display different percentage.
Let me give you an example which might help.
I have a report which calculates number of days against number of jobs. So x jobs took x amount of days. Later I had to add percentage to it so what did I do?
Number of days - Jobs - Percentage
1 (Row) - 12 - 13%
2 (Row) - 11 - 12%
3 (Row) - 14 - 16%
4 (Row) - 13 - 15%
Used a formula to calculate number of days and placed it in row. Placed Jobs under Summarised field. Placed percentage (which is exactly the same field as Jobs) under summarised field.
On percentage field right click field while report is in design mode and clicked Format Field-->Comman tab->Display string--->Placed my percentage formula there.
Refresh the report and whola! it works
Hope this helps
Regards
Jehanzeb

Similar Messages

  • Data missing in Crosstab report with calculated field via case when

    I use the Oracle 10g discoverer. When I create a crosstab report with a calculate field via function case when and put it as datapoint, some of the data is not showing. I tried to not use the case when function for the calculate field, then all the data show.
    I really do not the reason. Could anybody help me out with many thanks?

    Let me explain more.
    I have the original data below.
    Work order, Team, Hours_worked, date
    800001, S1, 5, 2012/01/01
    800001, S1, 15, 2012/01/10
    800001, S2, 4, 2012/01/04
    800002, S1, 3, 2012/01/15
    There are multipul records for the same work order, team on the same day or different.
    Finally I want to set the start date and end date as the parameter to create a crosstab report format like
    start date>=2012/01/01 and close date<=2012/01/05
    Team
    Total hours total hours within the range
    Work order S1 S2 ... S1 S2 ...
    800001 20 4 5 4
    800002 3 0 0 0
    in order to do it, I create two parameters independently start date and close date. Then I create a calculate field hours_worked_withinrange via
    Case when date>=:start date and date<=:end date then Hours_worked else 0 end
    This calculated field is correct in the tabular format report in discoverer desktop. But when I duplicate the list as crosstab. Some data is missing in crosstab data point.
    I checked once I change the calculate field defination not use case when. (For example, C1=hours_worked*2). Then everything runs correct.

  • Calculating a difference between two columns in a crosstab report

    I have a crosstab report showing # of sales by salesperson in each of 2 years and within each of 2 categories of salesperson (old vs new). I want to create a column showing the difference between sales in 2009 and 2010 within new salespersons  and then a column showing the difference between 2009 and 2010 within old salespersons. I can't figure out how to pinpoint in the variable editor the column containing 2009 sales by new agents. Any advice?

    You can hard-code the formulas like this:
    =Sum([Sales]) Where ([Year] = 2009)
    =Sum([Sales]) Where ([Year] = 2010)
    Then the variance becomes:
    =Sum([Sales]) Where ([Year] = 2010) - Sum([Sales]) Where ([Year] = 2009)
    The challenge with this is the years are not dynamic, but I figure I will throw this out first and see if it gets you what you want to start with.

  • Calculation in crosstab

    Now, i compile a crosstab report to show some statistics on system usage, and want to make some calculation base on this result then show in crosstab
    my case:
    created-deleted-view-total-calculated result
    user 1.......3...........3..........3........9.............21
    user 2.......2...........2..........2........6.............14
    What I want to do is add the calcuation and show in crosstab
    the calcuation will be
    action(created)2 + action(view)2+total
    I had try to set a formula field and add into the crosstab
    but doesn't work, (i use count( in "created") *2....)
    please share opinion

    i was wondering if you could be more specific, i am having great difficulty getting my cross tab to total properly.
    it is a simple crosstab, it counts users, i get the value per user correct by using maximum(userid) but to sum, or count, or distinct count doesnt give me correct results.
    in your response to this person you stated
    Create a conditional suppression formula for the sumarized fields that assigns the currentfield value you want to a variable. End the suppression formula with False.
    In the total field create a display string formula that declares the variables and adds them together and convert that to a string
    could you be more specific on the above, not sure if this would help my situation, but i will try it.

  • Adding a dummy column for text in crosstab report

    I created a report using crosstab to show trended months per column & details per row.  Now I'm trying to add additional columns to the crosstab report to display other pertinent info (not calculations, just text pulling from the database).  I read from various threads in the forum that I can create dummy columns to accomodate this, but I don't know how to do so.  Can someone please guide me in doing so?  If creating dummy columns is not a solution, please advice on what's the best way to add text columns to a crosstab report.  Any help is truly appreciated.  Thank you.
    Original report:
    Emp Name     Jan     Feb     Mar     Apr     May     Total
    Doe, John     20     17      30       28     33       128
    Wish to accomplish:
    Emp Name     Emp#     Dept#     Yrs Employed     Jan     Feb     Mar     Apr     May     Total
    Doe, John   12345     6010          8             20     17      30       28     33       128

    Hi Fione,
    I don't have access to CR at the moment but this is how I can think of doing this:
    1) Create a Subreport that points to the same table as the Main Report
    2) The Subreport should return the same number of Employees and in the same order as the Main Report - you can do this by creating a group on the Emp field just like the 'Row' in the Crosstab
    3) Create separate array variables - one each for Emp#, Dep# etc that accumulates values for each employee and inserts it against an index of the array
    4) Suppress all sections inside this subreport and place this Subreport on the Report Header of the Main Report
    5) Reduce the size of this subreport so that it isn't bigger than a dot and DO NOT suppress the section that holds this subreport
    6) Insert Calculated Members in the Crosstab for each column you need
    7) Use the array variable meant for the respective column. You just need to print the value at each index of the array based on the 'currentrowindex+1' function.
    -Abhilash

  • Displaying columns in Crosstab report.

    Hi all,
    I have developed Matrix Report. Output is coming like below.
                                                                                                          Current Vol                   OPM Cost
                                       Category     X1   x2   x3    x4       x1     x2      x3      x4
    Product  Market                           
    AAA1     Japan                                10  20    30    40       10      20     30     40
    BBB1     Japan                                10  20    30    40       10      20     30     40Current volume also displaying based on category. But, i need to display as Current vol one time only. instead of 4 (X1,x2,x3,x4). OPM cost should display as matrix based on category.
    Please let me know , Is it possible to do it in Discoverer.
    Thanks
    Kavi

    Hi,
    Yes it is possible but you will need to have each category as a separate row then use a crosstab report to display the rows in a matrix.
    To create the extra rows for each catogory you will need a row generator in your EUL. See this link http://learndiscoverer.blogspot.com/2008/10/row-generators.html for details.
    You can then use decode to define the calculation that will display the OPM cost for the category on the row.
    Rod West

  • Performance Issue with Crosstab Reports Using Disco Viewer 10.1.2.48.18

    We're experiencing Performance Issue (retrieving 40000 rows) with Crosstab Reports Using Disco Viewer 10.1.2.48.18 ( > 01 Minute , executing "Building Page Axis" or executing a Refresh).
    Are there parameters to tun (in pref.txt file) , in order to reduce "Building Page Axis" execution ?
    Note : We've got the same performance problem , using Discoverer Desktop 10.1.2.48.18.
    Thank's in advance for your Help.

    Hi
    Well if the same issue occurs in both Desktop and Viewer then you have your answer. It's not the way that Discoverer is running the workbook its the way the workbook has been constructed.
    For a start, 40000 rows for a Crosstab is way over the top and WILL cause performance issues. This is because Discoverer has to create a bucket for every data point for every combination of items on the page, side and top axes. The more rows, page items and column headings that you have, the more buckets you have and therefore the longer it will take for Discoverer to work out the contents of every bucket.
    Also, whenever you use page items or crosstabs, Discoverer has to retrieve all of the rows for the entire query, not just the first x rows as with a table. This is because it cannot possibly know how many buckets to create until it has all the rows.
    You therefore to:
    a) apply sufficient filters to reduce the amount of data being returned to something manageable
    b) reduce the number of page items, if used
    c) reduce the number of items on the side or top axis of a crosstab
    d) reduce the number of complex calculations, especially calculations that would generate a new bucket
    If you have a lot of complex calculations, you should consider the use of a materialized view / summary folder to pre-calculate the values.
    Does this help?
    Best wishes
    Michael Armstrong-Smith
    URL: http://learndiscoverer.com
    Blog: http://learndiscoverer.blogspot.com

  • Average no value in crosstab report (Discoverer Desktop)

    Hello experts,
    I have a crosstab report, and i want to use avg to a calculation field, but in crosstab i have no values and when i make drill down i have values under my group.
    how can i solve this?
    Edited by: user13062021 on 18-Feb-2011 07:44

    I make this change to my values "nvl(<item>,0) but nothing happened. In discoverer plus the values are correct but in discoverer desktop the values are null.
    Instead of this in analytical sheet i do not have null values to this column.
    For your information,
    in analytical sheet i have a calculation field with round and nvl functions, and i calaculate this field from the analytical sheet to crosstab sheet with an AVG() function, and cannot claculate.
    When I first make this sheet the values in discoverer desktop are all correct, but on the other day when I make refresh to my sheet the values are null.

  • Crosstab report with null or wrong totals

    I have a crosstab report that when I put a field in an item report area and setting <all> for values I get null values and with other fields I get wrong results (less than I wait). If there's no report item, it's return the correct results.
    I have checked the SQL and it not return any null value.
    I believe that the crosstab try to aggragate and sum the null values of the empty cells in my crosstab.
    Anyone knows how to fix it?
    I'm using Discoverer 10g Desktop.

    can you send your xml data and template to [email protected]

  • Shared DateVar in Subreport and datediff calculation in Main Report?

    Hello experts,
    I am using CRXI sp2.  I have a report that contains two subreports for different dates in the same date field that are identified by a Service Code.  The subreports have been placed in the same group footer 1a to be displayed and the calculation resides in the main report group footer 1b.  The shared variables are as follows:
    whileprintingrecords;
    shared datevar Codedate5473;
    Codedate5473:={@Codedate5473};
    and
    whileprintingrecords;
    shared Datevar Codedate5623;
    Codedate5623:={@Codedate5623}
    The main report has the following calculation is in group footer 1a.
    Whileprintingrecords;
    Shared numbervar daysbetween;
    if (isnull({@Shared 5623})or isnull({@Shared 5473})) then 0
    else daysbetween:= datediff("d",{@Shared 5623},{@Shared 5473})
    This returns negative numbers as well as calculations where one of the shared variables is null.
    I reset the calculation in the report header as well.
    Thanks for your help in advance.
    Kevin

    Hi Kevin,
    I can reproduce your issue, As per my knowledge the crystal will make some issues in null value computation as well as  shared variable  computation
    In your report i can see , you tried to access values from subreport to main report through shared variable. that will make problem. we can access values from main report to subreport without any issue using shared..dont ask me the reason..i am not the right person to say that... lol.
    The another wrong thing  i was found in your formula is , you are not resetting the shared variable any where.. so once the date field is null, the shared variable returning the previous value.
    So this is the solution for you..
    1,You have to add one more subreport for displaying your result., Lets say 'Sub report3'
    and create a formula, like.(Same which you have write before for the result)
    shared datevar Codedate5473;
    shared Datevar Codedate5623;
    numbervar daysbetween;
    WhilePrintingRecords;
    daysbetween:= datediff("d",Codedate5473,Codedate5623);
    daysbetween;
    2, Re- write your first two formulas like this
    For Subreport1,
    WhilePrintingRecords;
    shared dateVar Codedate5473;
    if isnull({Codedate5473}) then
    Codedate5473:=date(0,0,0)
    else
    Codedate5473:=date({Codedate5473});
    For subreport2
    WhilePrintingRecords;
    shared dateVar Codedate5623;
    if isnull({Codedate5623}) then
    Codedate5623:=date(0,0,0)
    else
    Codedate5623:=date({Codedate5623});
    Hope this will works for you,
    Cheers,
    Salah.
    Edited by: salahudheen muhammed on Aug 7, 2009 1:05 PM

  • Crystal Repts XI - Adding labels to summary fields in crosstab report

    I have a crosstab report where
    Columns
    first-level are priority or non-priority schools
    second-level are priority type
    Rows
    First-level: month
    second-level: count of calls opened this month; sum of time spent; opened prior to reportstart and still open, closed this month
    The row label for sum of time spent specifies that the time is in hours.  However, our Curriculum and Instruction department wants each data cell in that row to include the abbreviation hrs.  In other words, the row label would say Time spent on requests closed this month(hrs) and each cell would say 10.5 hrs  2 hrs, etc.  Can anyone help with this?

    Thank you!  This solved my problem.  It took me awhile to find where I could change the currency sign to display on the right but once I did it worked like a charm (we're and educational system, we rarely get to report on money).
    For others who don't know where to find this:
    - right click the field and select Format Field
    - on the Number tab of the format editor, select Display Currency Symbol
    - click Customize
    - click the Currency Symbol tab of the Custom Style Editor
    - in the Position menu choose the selection with the currency symbol on the right
    - in the Currency Symbol box type hrs.
    Save, save, and done!

  • In V 6.5 SP2 shading ever other row in crosstab report

    Post Author: Theodore Van Patten
    CA Forum: WebIntelligence Reporting
    I am having tremendous difficutly on a seemily simple request, and that is to shade ever other row in a crosstab report.  Anyone have any ideas?
    Thanks

    Another alternative, if  you dont want to use the Shared Content Store, is to have your PackageInstallationRoot pointing to a non-provisioned disk (non-PVS).  In our environment we had the same exact issue.  Each of our Citrix servers have
    a D drive thats non-provisioned that we use for Logs.  Once I pointed the PackageInstallationRoot over to this location everything started working.   The key here is to have a script run at server startup that deletes the PackageInstallationRoot
    since the provisioned non-persistent disk will reboot to a fresh image each time.   This way you wont end up with stale content out there as applications are updated and/or removed. 
    There are other things that also have to happen for this to work in these types of environments (related to roaming profile exclusions) that I can provide to you if you need them.  
    Let me know if you want/need more details.

  • Excel export of crosstab report in Discoverer desktop 9i not proper

    Dear All,
    I have made a crosstab report where I am taking the totals of the fig at all the datapoints. For this total, I have put the "Label" as &Value. When I run the report, it shows the correct output and correct values for the label field. But when I am exporting the report in excel, the label does not refresh for all the items properly. Instead it shows the Label for the very first set of data across all the itesm.
    Can somebody pls tell me the reason behind this?
    Regards
    Minakshi

    I am experiencing the same issue. has anyone got a solution to this issue? i dont really want to truncate the string if possible

  • Error while adding Parameter Field to CrossTab report in CR 2008

    Hello Experts,
    I'm getting an error - "Not supported" while I'm trying to add a paremeter to the Crosstab report. It is a simple report with no further complications.
    Is there any special way to add a parameter field to Crosstab? Any help appreciated.
    TIA
    arjun

    Hi,
    What version of Crystal Report are you using? 
    Kindly refer SAP Note 1376117 & 1454192  and verify if you are on the approriate patch.
    Regards,
    Nakul

  • Need help in creating custom crosstab reports

    Hello
    I need some help in creating custom crosstab reports.
    My current report shows the number of events that have occured over the time in a day
    The events and the eventdetails are read from the database before being printed on the crosstab
    i.e something like this.
    Note : there are no events between 3:00-3:59,5:00-5:59;6:00-6:59,7:00-7:59  (not present in the database)
    hence not displayed in the reports
    *08/07/2009*         01:00        02:00         04:00          08:00          10:00*
    Event X                    1               1                 4                 1                  3
    Event Y                   3               3                 2                 2                  1
    Total                        4                4                 6                 3                  4
    So far so good...
    Now i have to enhance my reporting application to include the event details which have not happened i.e to include the time details in the crosstab reports where no events have happened
    08/07/2009             01:00        02:00         03:00          04:00          05:00         6:00         07:00         8:00     9:00     10:00
    Event X                     1               1                0                 4                  0             4             0                1            0           3
    Event Y                     3               3                0                 2                  0             2             0                2            0           1
    Total                         4                4                0                 6                  0             6             0                3            0           4
    I have fell short of ideas this time around to implement such a thing
    Any help in this direction is deeply appreciated
    Regards
    Srivatsa
    Edited by: Srivatsa HG on Jul 8, 2009 10:56 AM

    Hi,
    It seems that you are having issue with Crystal Report Design.
    Post your question in [Crystal Report Design Forum|SAP Crystal Reports;
    That forum is monitored by qualified technicians and you will get a faster response there. Also, all Design queries remain in one place and thus can be easily searched in one place.
    Regards,
    Shweta

Maybe you are looking for

  • HP Officejet Pro 8500 Wireless All-In-One Printer A909g

    My current firmware is: DLM1FN1344AR. I am due for a firmware update. I still am using my original 32-bit Sony PC (soon to be put out to pasture), and there are now 2 newer 64-bit PCs which will remain on the network. Should I wait to update the firm

  • How to "Update the total"?

    Hello Apex People, Here's a scenario that must be somewhat common and I hope someone can help provide a solution. Let's say that we have an order entry app and the price and quantity items are already populated. We now want to show the user the exten

  • How do I get Sony's AVCHD to work on my Mac?

    I have a Sony Cyber shot camera HD AVCHD  10.2 megapixels and I would like to import video clips from my sony to my Mac and Mac Air. Is there software that I need to download to make this happen?

  • Tabular Report Question

    Hi There, I am in the middle of developing a tabular report my report format is the following and following parameters are passed. Its basically a LEDGER of a particular account therefore requrired to calculate the opening balance as well. 1. Account

  • Photoshop/Lightroom @$9.99 month

    I signed up for Photoshop CS6 (only) for $9.99 a month when it was first offered. Now they include Lightroom 5. My monthly invoice says it is only for Photoshop. Anyone know how to upgrade to get the additional Lightroom 5 without canceling the one I