Getting running total of the count

select a,count(*),sum(count(*)) over (partition by a)
from t group by a order by 2.
The query is giving me results like this given below.
A Count Sum Count(*)
a1     1 1
a2     1 1
a3     2     2
a4     2     2
a5     3     3
Instead I require result like
A Count Sum Count(*)
a1     1     1
a2     1     2
a3     2     4
a4     2     6
a5     3     9

SQL> create table t
  2  as
  3  select 'a1' a from dual union all
  4  select 'a2' from dual union all
  5  select 'a3' from dual union all
  6  select 'a3' from dual union all
  7  select 'a4' from dual union all
  8  select 'a4' from dual union all
  9  select 'a5' from dual union all
10  select 'a5' from dual union all
11  select 'a5' from dual
12  /
Tabel is aangemaakt.
SQL> select a
  2       , count(*)
  3       , sum(count(*)) over (partition by a)
  4    from t
  5   group by a
  6   order by 2
  7  /
A    COUNT(*) SUM(COUNT(*))OVER(PARTITIONBYA)
a1          1                               1
a2          1                               1
a3          2                               2
a4          2                               2
a5          3                               3
5 rijen zijn geselecteerd.
SQL> select a
  2       , count(*)
  3       , sum(count(*)) over (order by a)
  4    from t
  5   group by a
  6   order by 2
  7  /
A    COUNT(*) SUM(COUNT(*))OVER(ORDERBYA)
a1          1                           1
a2          1                           2
a3          2                           4
a4          2                           6
a5          3                           9
5 rijen zijn geselecteerd.Regards,
Rob.

Similar Messages

  • Getting running total formula result at the beginning of the report

    Hello All,
    I am having an inquiry that if I can get a grand total in the report footer to the report header.
    The grand total is not a direct sum.  I am using three formulas
    the first formula:
    @reset Group Header
    whileprintingrecords;
    numbervar sumpct4;
    if not inrepeatedgroupheader then
    sumpct4 := 0;
    the second formula: Details section
    whileprintingrecords;
    numbervar sumpct4 := sumpct4 + {@Total_Market};   // {@Total_Market}; =  Amount+ Interest
    numbervar grtotal4 := grtotal4 + {@Total_Market};
    Group Footer
    whileprintingrecords;
    numbervar sumpct4;
    Report Footer
    whileprintingrecords;
    numbervar grtotal4;
    All that I need is to show the total which is in the report footer at the top of the page where I am having a summary.
    So, can you please help me.
    Thanks
    Edited by: maas maas on Sep 8, 2010 12:48 PM

    Hello my friend,
    I want this to be controlled in crystal.
    Is there is a way to get the grand total by using multiple formulas or any other way?
    Here is the structure of my report:
    Group Header 1: CCY
    Group Header 2:Type
    @reset Group Header
    whileprintingrecords;
    numbervar sumpct4;
    if not inrepeatedgroupheader then
    sumpct4 := 0;
    Group Header 3A: Deal No
    Group Header 3B: Deal No (subreport to get the {@amount} for each deal)
    I will pass the end_date from the main report to subreport and I will get the sum(amount) for each deal between date (1-1-2008) to end_date. The sum will be as a shared variable to the {@amount} formual in the main report.
    Details:
    Deal No, {@amount}, {@Price}, {@market}, {@Total_Market}
    {@Price}: if {table.price} = 0 then
    100
    else {table.price}
    {@market}: if Type <> "DEP" then
    ({@amount}*{@Price})/100
    else
    {@amount}
    {@Total_Market}:{@market}+ {@Price}
    Running formula to get Total_market: Details section
    whileprintingrecords;
    numbervar sumpct4 := sumpct4 + {@Total_Market};
    numbervar grtotal4 := grtotal4 + {@Total_Market};
    Group Footer 3B: Deal No
    Group Footer 3A: Deal No
    Group Footer 2:Type
    In this group I am placing a running total formula:
    whileprintingrecords;
    numbervar sumpct4;
    Group Footer 1: CCY
    Report Footer:
    @grand_Total
    whileprintingrecords;
    numbervar grtotal4;
    Now, i want this @grand_total formula result to be shown in Group Header 1: CCY.
    I tried to insert a subreport at the beginning which it is a copy of the main report, but I did not get the coorec t result because I am getting the {@amount} from a subreport and in crystal I can't insert a subreport in an existing subreport.

  • Running totals at the footer of the report

    I want to create running totals but print them not in e.g. in a group footer. All totals should be printed at the end of the report. The number of needed running totals is not defined before, it depends on the number of different grouping criterias:
    Example
    Criteria   Amount
    1995      10
    1995       10
    1996       20
    1997       30
    1997       10
    At the end of the report shoul appear the following:
    1995     20
    1996     20
    1997     40
    There could be more criteria in the report (e.g. 1998 or 1999), but it is not defined before I start the report.
    Thank you for your support

    Hi Torsten,
    If you want to create year wise running totals without considering groups, you can create like :
    go in Field ExplorerRunning TotalsRight click and select New
    Give the name as 1995 and select Field to summarize and select Sum as type of summary
    In Evaluate select Formula and give a formula like : Year = 1995
    In Reset do not reset.  You get the value of 1995 year this can be placed at the end of your report.
    You may have to create different funning total for different year.
    Thanks,
    Sastry

  • Running Total in the template

    Hi,
    I Have a requirement is there is running page total at the every page which gets updated for page wise in the Actuate report.That part i am not able to implement in the BIP ,if i place the running toatl code in footer it throws errors saying that variabels cant be used in the footer.
    How can i restrict the number of line in the report output and display the sum upto that part of records, and next diaplay the rest of records..
    Example :
    XML has : 1 to 75 values for the Amount paid on thatt day.
    when i generate the output...assume it occupies 3 pages .
    Running total : 1-25 records (total on that page)
    25-50 records (earlier page total +this page total)
    50-75 records (earlier two pages total +this page)
    Kindly let me know.
    Regards,
    Sahithi Surineni
    email : [email protected]
    If you have still queries,kindly give me a call.So that i can explain you more clearly.

    Hi,
    I am looking for the similar stuff :( nobody helps ?

  • Get Grand total of the subtotals

    Hi,
    I am devoloping a report which pulls the expense lines for each project.I am displaying the fte count at each line.As it'll be same for a particular project,all the lines for that particular project will show the same FTE count.I am grouping the
    lines by Project No in Desktop edition.Now I want the total fte count which is the sum of the fte counts at each grouped level.So I cant use the total as it'll give the grand total of all the line entries.But I am not finding any option for this kind of total.(Total of the subtotals)
    Pls give me a solution ASAP

    Hi,
    I am devoloping a report which pulls the expense lines for each project.I am displaying the fte count at each line.As it'll be same for a particular project,all the lines for that particular project will show the same FTE count.I am grouping the
    lines by Project No in Desktop edition.Now I want the total fte count which is the sum of the fte counts at each grouped level.So I cant use the total as it'll give the grand total of all the line entries.But I am not finding any option for this kind of total.(Total of the subtotals)
    Pls give me a solution ASAP

  • To get a total of the column

    Hi, is possible to get a total of a column that have a date ('HH24:MI:SS') format, in a REPORT?
    Because I try with the option SUM of the attributes of the region but doesn't work.
    Thank!

    I think you have to do this manually. See my post from today talking on the leading total:
    How to display TOTAL before the rows ?
    Denes Kubicek

  • Running total on the basis of condition

    Hi Gurus,
    I am stuck with a problem which as follows:
    I am having data in a table in the format
    data_id     data_val     data_val_min     Allowd_data_val
    1     18510578     782     7000000
    2     6103403     0     7000000
    3     1244370     3     7000000
    4     800000     100     7000000
    5     90000     80     7000000
    6     50000     100     7000000
    I want a output as shown below
    runn_data_val
    782
    6104185
    6104188
    6904188
    6994188
    6994288
    The logic for the output is
    if data_val si less then Allowd_data_val then we have to condider data_val_min for the running toal else we have to consider data_val.
    because 18510578 > 7000000 so I have to consider 782 as output
    Now 782+6103403 < 7000000 so I have to consider 782+6103403 = 6104185 as output
    now 782+6103403+1244370 > 7000000 so I have to sonsider 782+6103403+3 = 6104188 as output
    and so on...........
    I have to get the desigred output through SQL only I can't use PL/SQL or user defined functions
    Any help will be highly appreciated.
    Thanks & Regards

    with tab as (
      select 1 data_id,18510578 data_val,782 data_val_min,7000000 Allowd_data_val from dual union all
      select 2 data_id,6103403 data_val,0 data_val_min,7000000 Allowd_data_val from dual union all
      select 3 data_id,1244370 data_val,3 data_val_min,7000000 Allowd_data_val from dual union all
      select 4 data_id,800000 data_val,100 data_val_min,7000000 Allowd_data_val from dual union all
      select 5 data_id,90000 data_val,80 data_val_min,7000000 Allowd_data_val from dual union all
      select 6 data_id,50000 data_val,100 data_val_min,7000000 Allowd_data_val from dual union all
      select 6 data_id,50000 data_val,100 data_val_min,7000000 Allowd_data_val from dual
    --end of creating your test data
    ,newtab as (
      select t.*,row_number() over (order by data_id) rnum from tab t
    SELECT data_id,
      data_val     ,
      newcol
       FROM newtab
       model
        reference ref_cnt on (select count(*) cnt , 1 col from newtab)
        dimension by (col) measures(cnt cnt)
       main mainmodel dimension BY (rnum)
        measures(0 newcol,data_id,data_val data_val,Allowd_data_val,data_val_min)
        rules update iterate(10000000) until(iteration_number>=ref_cnt.cnt[1])
         newcol[iteration_number+1] = nvl(newcol[iteration_number],0) +
                                          case when nvl(newcol[iteration_number],0)+data_val[iteration_number+1]>Allowd_data_val[iteration_number+1]
                                           then data_val_min[iteration_number+1] else data_val[iteration_number+1]
                                          end
       )May be this won't :-)
    Ravi Kumar
    Edited by: ravikumar.sv on Mar 15, 2010 7:30 PM
    Added iterate condition

  • How to get page totals at the end of the report in BI Publisher

    I am using BI Publisher 10.3 and using Ms-Word template builder to design the report
    and I want to implement totals for some columns (like page totals) ... can anyone let me know how to go about this
    Thanks

    Take a look this blog: http://blogs.oracle.com/xmlpublisher/entry/anatomy_of_a_template_iii_page
    You can download the template for that page.
    Also take a look at the Samples folder within your BI publisher desktop folder and you can find a folder "Page Total" that has the RTF template, xml and output..
    Assign points if helpful.
    Thanks,
    Bipuser
    Edited by: BIPuser on Aug 18, 2011 8:24 AM

  • Distinct Count Running Total

    <p>I have a report that gets a distinct count of items per day.</p><p>DistinctCount(, , "daily")</p><p> I would like to create a running total of the daily count for a weekly grand total.</p><p>Thanks!</p>

    <p>I&#39;ll take a stab at this - So I understand that the report is grouped by Day and looks like this:</p><p>GF1:    1/1/07   9</p> <p>GF1:    1/2/07   10</p> <p>GF1:    1/3/07   12</p> <p>GF1:    1/4/07   15</p> <p>GF1:    1/5/07   20</p><p> </p><p>The first thing I&#39;d try is to create a another group on your Date field, this time selecting the grouping option to be "For Each Week".  Take that group and move it so that it is Group1 and your current group is Group 2.... your structure will now look like this. </p><p>GH1:    1/1/07        < new &#39;week&#39; grouping&#39; > </p><p>    GF2:    1/1/07   9</p>  <p>    GF2:    1/2/07   10</p>  <p>    GF2:    1/3/07   12</p>  <p>    GF2:    1/4/07   15</p>  <p>    GF2:    1/5/07   20</p><p> Then I would copy the Sum field (distinct count) that you are using in Group 2 and put it in the Group 1 footer.  We could also create a formula to sum up all distinct counts per day, but a Distinct Count by week should accomplish what you are after.   Then in a seperate formula, you could divide the DistinctCount of orders (by week) by the DistinctCount of dates (by week) to get your daily average....</p><p>formula:</p><p>DistinctCount ({Orders.Order ID}, {Orders.Order Date}, "weekly") <br />/ <br />DistinctCount ({Orders.Order Date}, {Orders.Order Date}, "weekly") </p><p> </p><p>Hope that helps. </p>

  • Use running total to get cumulative value

    Just want to clarify, can it be get the cumulative value of string instead of numeric figure by using running total function?
    for example:
    Date               Action
    01/Jun      Created
    02/Jun      Deleted
    03/Jun      Created
    11/Jul       Deleted
    12/Jul       Created
    13/Jul       Deleted
    Can it be counted as a number of action & cumulate for each month?
    ideal result is:
    June
    Created:2 Deleted :1
    July
    Created:3 Deleted :3
    Thank for share...

    This can be done using Running Totals. I'm assuming you are grouping your results by month.
    1. Create a running total for the "Created" action called RunningTotalCreated:
    Field to summarize: {Table.Action}
    Evaluate: Use formula:
    {Sheet1_.Action} = "Created"
    Reset: on change of group "Month".
    2. Create a running total for the "Deleted" action called RunningTotalDeleted:
    Field to summarize: {Table.Action}
    Evaluate: Use formula:
    {Sheet1_.Action} = "Deleted"
    Reset: on change of group "Month".
    3. Create a formula called result with the following code, and drag it into your month group footer.
    "Created: "+totext({#RunningTotalCreated},0)+" Deleted: "+totext({#RunningTotalDeleted},0)
    Cheers,
    Fritz

  • Running Total Issue:  How to calculate counts excluding suppressed records

    Post Author: benny
    CA Forum: Formula
    Hello All:
    I have a current report that gives the total counts of work requests.   However, in my section expert, there are some records in the detail that are suppressed (if there isn't any backlog). The current running totals are counting all the records including the suppressed records. I think I need three formulas:1. Calculate the counts2. Calculate the counts excluding suppressed records3. Reseting the counts by group
    May I ask if someone can give me an example of what I should do?
    Thanks so much!
    Benny

    Post Author: benny
    CA Forum: Formula
    Bettername,
    Actually, I should have been more specific.  This report is actually a PM backlog report.  It displays all the work requests (PM) issued including the backlogged. There are 9 columns (including one called Backlog) for the different counts of the pm's based from the status codes (Issued, Material on Order, Completed, Cancelled, etc) of the work requests. The detail records of worke requests are grouped by shop and PM end date.  The running totals are calculated at the pm date group level (group footer#2). Then based from those at the shop group level (group footer#1) there is a grand total of counts of the running totals. The detail records and pm end date group header (group header #2) are suppressed.
    Now the foremen would like the report to just display all the backlogged PMs. Using the section expert, I suppressed all the PM issued that have no back log ({@ backlog = 0}) and just display the back logged pm's.  This is where I run into the running total issue.
    This is very involved report and I will use the column PM Issued as an example.  I can still use the same logic as you suggested?
    1. declaration formula:
    whileprintingrecords;numbervar pmissued := 0;
    2. Suppression formula that uses the variable:
    whileprintingrecords;
    numbervar pmissued;
    if ({@ backlog = 0}) then pmissued:= pmissed else pmissued:=pmissuedr+1
    3. Display formula:whileprintingrecords;
    numbervar pmissued;
    If this is the right track, then I can use the same example for the other columns. 
    Thanks so much.
    Benny

  • SSRS 2008 Running Totals - How are they created at the grouping by level

    I am trying to create the running total column(the right column) month-to-date, and I am new to SSRS.  Is this possible to do on the SSRS-side, or, will I need to do this in the SQL stored procedure that SSRS is calling?
    Number Enrolled
    Number Enrolled
    Enroll Date
    Enroll Type
    Enroll Group
    Enroll Offer
    Enroll Source
    DAILY
    MTD (Running Total)
    10/1/2013
    Online
    Internet
    1234
    ABC
    1
    1
    10/2/2013
    Online
    Internet
    1234
    ABC
    0
    1
    10/3/2013
    Online
    Internet
    1234
    ABC
    6
    7
    10/1/2013
    Online
    Internet
    1234
    DEF
    4
    4
    10/2/2013
    Online
    Internet
    1234
    DEF
    6
    10
    10/3/2013
    Online
    Internet
    1234
    DEF
    0
    10

    Hi Mitch1743,
    According to your description, you want to get the total number on each row. Right?
    In Reporting Service, we can use RunningValue function to do aggregation calculating for each row. Put expression: =RunningValue(Fields!Sales.Value,sum,”Group2”) into the last column (Group2 between “” is the parent group of detail rows).
    We have tested it in our local environment , the table and result will be looks like below:
    Reference:
    RunningValue Function (Report Builder and SSRS)
    Understanding Groups (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • To get the TOTAL at the top

    I have a report spec. for which I have to write a SQL query which should print the total aggregate at the top.
    For ex. For Dept 10 which has salaries 1000,2000,3000
    Deptno Salary
    10 Total of Sal for dept 10
         1000
         2000
         3000
    20 Total of Sal for Dept 20
    Total Final Total (individual grouping totals)
    Please suggest the SQL for getting individual totals at the top
    Regards,
    Gaurav Srivastava

    select decode(grouping(empno), 1, decode(grouping(deptno), 1, 'TOTAL', to_char(deptno))) DEPT,  sum(sal) sal
    from emp
    group by grouping sets ((deptno, empno),(deptno), ())
    order by emp.deptno, grouping(emp.empno) desc;
    DEPT         SAL
    10          8750
                2450
                5000
                1300
    20         10875
                 800
                2975
                3000
                1100
                3000
    30          9400
                 950
                1600
                1250
                1250
                2850
                1500
    TOTAL      29025

  • Running total and Next function in Crosstab

    <strong><font size="3"><font face="Times New Roman">Clarifications on getting Next Running sum and count on a Crosstab</font></font></strong><font face="Times New Roman" size="3"> </font> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Here is the example, which I am working on:</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Highlights of the Report:</font></p><p style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; tab-stops: list .5in" class="MsoNormal"><font face="Times New Roman"><span><font size="3">-</font><span style="font: 7pt &#39;Times New Roman&#39;">         </span></span><font size="3">Report is grouped on {Scenario Name}</font></font></p><p style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; tab-stops: list .5in" class="MsoNormal"><font face="Times New Roman"><span><font size="3">-</font><span style="font: 7pt &#39;Times New Roman&#39;">         </span></span><font size="3">Left side dates on any of the tables is {Version Date}</font></font></p><p style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; tab-stops: list .5in" class="MsoNormal"><font face="Times New Roman"><span><font size="3">-</font><span style="font: 7pt &#39;Times New Roman&#39;">         </span></span><font size="3">Dates on the top header on any of the tables is {Fsc Week End Dt}</font></font></p><p style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; tab-stops: list .5in" class="MsoNormal"><font face="Times New Roman"><span><font size="3">-</font><span style="font: 7pt &#39;Times New Roman&#39;">         </span></span><font size="3">Other formulae used in this report are:</font></font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">1) = ({Query1.Demand Qty})/100000</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Numerical values displayed in the "Original values" table.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">2) =</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">if {Query1.Scenario Name} = &#39;DLYPRD:ASCP-PRD:PRD&#39; </font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">THEN mid ({Query1.Scenario Name},13,3)</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">ELSE mid ({Query1.Scenario Name},13,6)</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Second column with value PRD in any of the tables.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">3) {next qty} = if not onlastrecord then next({@ShortDemandQty}) else 0;</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">(used in the "next values vertically" table)</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">4) - running total to calculate horizontally</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Evaluate - For each record</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Reset - On change of field: {Version Date}</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">5) - running total to calculate vertically.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Evaluate - For each record</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Reset - On change of field: {Fsc Week End Dt}</font></p><font face="Times New Roman" size="3"> </font> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">In this report design, when I go and change the Sort order in the Record Sort Expert, some of the values go for a toss. I got two cases where the vertical values are correct in one case and horizontal values are correct in another case.</font></p><font face="Times New Roman" size="3"> </font><strong><font size="3"><font face="Times New Roman">First Case:</font></font></strong> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Cumulative vertical values are correct.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal">&#160;</p><font face="Times New Roman" size="3"> </font><strong><font size="3"><font face="Times New Roman">Second Case:</font></font></strong> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Cumulative horizontal values are correct.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal">&#160;</p><font face="Times New Roman" size="3"> </font><strong><span style="color: blue"><font size="3"><font face="Times New Roman">Is there any way to consistisize both the horizontal and vertical running totals. I even tried forcing the evaluate & reset like below and clearing the record sort order, but it did not work:</font></font></span></strong><strong><span style="color: blue"><font face="Times New Roman" size="3"> </font></span></strong> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">1) - running total to calculate horizontally</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Evaluate - On change of field: {Fsc Week End Dt}</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Reset - On change of field: {Version Date}</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">2) - running total to calculate vertically.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Evaluate - On change of field: {Version Date}</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Reset - On change of field: {Fsc Week End Dt}</font></p><font face="Times New Roman" size="3"> </font><strong><span style="color: blue"><font size="3"><font face="Times New Roman">And one more observation on the running total, how it works in the crosstab is, the total runs likes a spiral rather than resetting at the column or row level. Is there any way to restrict this?</font></font></span></strong><font face="Times New Roman" size="3"> </font> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">3) {next qty} = if not onlastrecord then next({@ShortDemandQty}) else 0;</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">(used in the "next values vertically" table)</font></p><font face="Times New Roman" size="3"> </font> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">For example, onlastrecord does not seem to work on the "next values vertically" crosstab, rather brings the record from the next column.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">For 3/7/2007 - 01/APR/07, the value is 157.84 which is incorrect and should be 0.</font></p><strong><span style="color: blue"><font size="3"><font face="Times New Roman">I need to get a next on the running total. Next (fld) doesnot work for running totals. Please guide me, how to get the next values for the running total fields.</font></font></span></strong>

    Post Author: redtop6683
    CA Forum: Formula
    Whoops I guess I should have mentioned that I've already tried using Sum and Round(Running Total, 2) and haven't had any luck.
    I also should have mentioned that Groupings 1 and 2 are sums, and that Running Total is a running total that changes on every change of the grouping.  There are 4 groupings.
    Grouping 1 (Employee Name)
    Grouping 1.1 (Shift)
    Grouping 1.2.1 (Payroll Department Code)
    Grouping 1.2.1.1 (Description)
    Below these 4 groupings is where the running total is.  The issue is that in the footer of grouping 1 is a field that sums the elapsed hours for the particular employee by each payroll department code, these are then summed using the running total.  The issue is as stated in the earler post that I can round these individual sums on the groupings, but I get the number on my running total to round differently as you can see by the earlier post's example.
    Thanks for the help.
    ~Jason

  • Running total of another running total ( or some other solution )

    I posted in my previous thread that I would like to be able to do rounding at the subtotal level and then have a total of these subtotals.  Here is the original thread:
    totals in a cross tab report
    So I was told that with the cross-tab report I can either do rounding at the details level or at the final total level.  However, I need to be able to do the following:
    Suppose I receive payments from different states.  In my report I would like to be able to display:
    - a total of all payments for one given state, rounded to whole dollars - this one is easy because I just create a running total for the payments and then at the end I round it to whole dollars
    - a total of all payments and all states as one number.  However, the problem I can't figure out here is that this grand total needs to be calculated as the SUM of the totals for each state where the total for each state is rounded to a whole dollar before being added to the grand total.  So the rounding should not be done on the final grand total but rather:
    1. calculate the total of payments for one state and round it to a whole dollar - let's call it StateTotal ( rounded)
    2. calculate the SUM of all StateTotal values.  So it needs to be a SUM of the already rounded state totals.
    Any help will be greatly appreciated.
    thanks

    hello all,
    if you want to use a manual running total then that is okay. you don't actually put the manual running total in the cross-tab expert though as you will get a print time error.
    you use the "Display String" formula dialogue on an existing cross-tab summary to do the manual running total in.
    have a look at the attached sample...there are 2 manual running totals in there...one that goes horizontally (across the columns) and one that goes vertically (down the rows).
    there is also a Xtab Info column that is there just to show you how the manual running total counter variables are incremented through the cross-tab. in crystal reports 2008 there are a lot of new cross-tab functions that are different from this but that is a completely different topic.
    i hope this helps,
    jamie

Maybe you are looking for

  • Windows Vista SP2 fails to install

    When I install Vista SP2 on my Vista Ultimate X86 on my dell optiplex 745 I get the following error Installation was not successful error true_e_nosignature(0x800b0100) I tried running the System Update Readiness and the standalone installer and didn

  • Creative Cloud "application"

    WINDOWS 7 (CC) A few issues. Desktop - Creative Cloud  (I guess this is generally called the "installer".) I noticed there was an update to 'Creative Cloud'  which I duly did . This then advised various updates including 'Premiere CS6 Family' Did thi

  • IPhone 5 Stuck on 3G

    I have an IPhone 5 that I got in the winter of 2012. It's running iOS 7.1.2. The past couple of months it has been connecting very slowly to Verizon's network (both 3G and LTE). No problem with WiFi. Eventually, I went to the Apple Store to have it e

  • Reset Page number in Smartforms

    Hi, I have a smartform with a page break when ever the ship to party of the line item changes. In the output I have page counter (e.g. Page 1 of 10). Currently the total number of pages is same as the total number of pages in the spool and is suppose

  • OSB Delete Entire Node (SOAP:header) in Proxy service

    Hi I am wanting to delete the SOAP:header node in the response in the SOAP proxy service. I am using the Delete action with the following settings Xpath: . In Variable: header All this is doing is deleting the contents of the "Header" node when I wan