How do I put a running total in a Reports 6i Report?

I need to write a report which shows a running total at the foot of each page. The report is a series of (potentially) multi-page sections each formatted like this:
Page 1
======
Tom £100
Dick £150
Harry £100
Sub Total £350
Page 2
======
Peter £200
Paul £50
Mary £100
Total £700
Lines are of variable height, so I can't predict how many there'll be on a page.
The help system just tells me to "use a summary field". Yeah, right. Can anybody give me some more detailed instructions?
-- Chris Hunt

Thanks for that.
I didn't really express the problem as well as I might have done, as the Sub-Total needs to be the sum of all the items on the current page and on all preceeding pages. resetting on page just gives you the total for that page.
I did find a way to do it. First you set up a summary field in the same group as the data lines, summing the amount and resetting on the parent group. This gives you a running total for each row:
Page 1
======
Tom £100 £100
Dick £150 £250
Harry £100 £350
Page 2
======
Peter £200 £550
Paul £50 £600
Mary £100 £700
You don't actually output this summary field in the prinout (except when debugging :-) ). Now create a summary field at the foot of the page, or in the margin. Set its value to the Max() of the running total summary, resetting on page. That gives you the amount required, assuming all individual amounts are positive.
If it's possible to have negative amounts, I expect that using Last() instead of Max() for the page summary would do the trick.

Similar Messages

  • How do I put a collection in a readonly report on the fly

    How do I put a collection in a readonly report on the fly??
    Thanks, examples if you can please.

    Doug,
    You can simply create a report region and use that to display the records in the collection:
    SELECT
      c001,
      c002,
      c003,
    FROM
      apex_collections
    WHERE
      collection_name = 'YOUR_COLLECTION_NAME'Thanks,
    – Scott –
    http://spendolini.blogspot.com/
    http://sumnertech.com/

  • How do I use a running total within a selection formula?

    I am developing a report within Crystal Reports 2008.  My goal is to identify any accounts that have zero usage for at least six months in this current year.  I have account number, meter size, read date, usage, and a running total/subtotal by account.
    Here is what the data looks like in the report
    ACCTNO     METER SIZE   READ DATE/TIME               READ_USAGE    Counter
    001022-05                    
    001022-05     2.00              9/28/2009  9:42:00 AM      0.00                     1
                                                                                    1
    001110-09               
    001110-09     2.00             3/2/2009  9:54:13 AM         0.00                      1
    001110-09     2.00             3/26/2009  1:32:28 PM        0.00                      1
    001110-09     2.00             4/27/2009  11:02:11 AM     0.00                      1
    001110-09     2.00             5/27/2009  1:13:53 PM        0.00                      1
    001110-09     2.00             6/19/2009  11:41:20 AM     0.00                      1
    001110-09     2.00     9/1/2009  8:13:25 AM         0.00                      1
                                                                                    6
    My report shows all accounts that have zero usage.  I want to filter the report to only show the accounts that have at least six zero usage reads.  I thought I could add a running total, sum it, and filter the data by using the selection formulas.  Unfortunately I keep getting an error message saying "this field cannot be used becuase it is being evaluated later."  Any help would be appreciated.  This is the first report I have created using crystal.
    Edited by: smwdrw2 on Oct 28, 2009 4:29 PM

    You could Conditionally suppress the account numbers where your running total is less than 6
    You will probably have to put your account number summaries in the group footer, instead of the header.
    Then:
    go to the section expert, click on the group footer for the account number, on the right, next to the word "Suppress" click on the box that says "X-2". In the formula put
    IF<6 then True
    Save and close
    The only way this would not work for you is if you have some sort of grand total that you don't want to include the other groups in.

  • How to find the last run date of the report..

    please any one one help me
    how to find last run date of the report...
    for example if my report is zgrir...if i am exuted in last week
    if want to find when it executed
    last run date is req
    please any one help me...

    The trasaction stat is limited because i want all the execution date even if it is 3 years ago.
    I have tryied the transaction st03 but it is limited to 3 months ago.
    check transaction STAT and it's report RSSTAT00.
    U can copy RSSTAT00 into ZRSSTAT00 and modify corresponding.
    *& Report ZDSAP *
    REPORT ZDSAP .
    DATA: d_ref TYPE REF TO data,
    d_ref2 TYPE REF TO data ,
    i_alv_cat TYPE TABLE OF lvc_s_fcat,
    ls_alv_cat LIKE LINE OF i_alv_cat.
    TYPES tabname LIKE dcobjdef-name .
    parameter: p_tablen type tabname.
    data: begin of itab occurs 0.
    INCLUDE STRUCTURE dntab.
    data: end of itab.
    FIELD-SYMBOLS : <F_FS> TYPE table,
    <F_FS1> TYPE TABLE,
    <F_FS2> TYPE ANY,
    <F_FS3> TYPE TABLE.
    REFRESH itab.
    CALL FUNCTION 'NAMETAB_GET'
    EXPORTING
    langu = sy-langu
    tabname = p_tablen
    TABLES
    nametab = itab
    EXCEPTIONS
    no_texts_found = 1.
    LOOP AT itab .
    ls_alv_cat-fieldname = itab-fieldname.
    ls_alv_cat-ref_table = p_tablen.
    ls_alv_cat-ref_field = itab-fieldname.
    APPEND ls_alv_cat TO i_alv_cat.
    ENDLOOP.
    internal table build
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING it_fieldcatalog = i_alv_cat
    IMPORTING ep_table = d_ref .
    ASSIGN d_ref->* TO <F_FS>.
    SELECT * FROM (p_tablen) INTO CORRESPONDING FIELDS OF TABLE <F_FS>.
    LOOP AT <F_FS> ASSIGNING <F_FS2>.
    *your code goes here.
    ENDLOOP.

  • How can I cut and paste my formulas and running totals to another report?

    Post Author: RobotSlave
    CA Forum: Formula
    is this possible or do I have to just waste a bunch of my time?

    Post Author: kcheeb
    CA Forum: Formula
    To the best of my knowledge, unless the datasource and the field names are the same in both reports, you'll have to change them in the second report.
    Cut and paste takes the text as is and does not do any intelligent updates based on the datasourec & field names.

  • How to update SQL Database with totals from Crystal Report

    Hello,
    I am converting a Crystal Report done using CR 11 and VB6 to VB.Net and Visual Studio 2010.  The report is now working fairly well but there is 1 last thing to figure out.  In the vb6 version there was a report footer event that I used to update the report totals to a record in a database table. 
    It appears that in the .net version we have less events to allow outside processing to occure when a report is produced. Looking thru the available events I don't see a way to do this. Would some be so kind as to suggest a way this might be accomplished?
    Thanks,
    Vic

    Only thing I can think of is the InProc RAS SDK and using the RowSet Controller to query the footer, then parsing out the info you need to submit to the database.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • How to create running total in Analysis

    Hi Experts,
    How can I create a running total in Analysis?
    below is the scenario:
    Account - - - - Quantity
    ACCT1 2
    ACCT2 4
    ACCT3 6
    ACCT4 8
    I need to get the total count for Quantity Column and the total count should be display in the Analysis (20 should be display)
    Thanks,

    HI,
    We have a option in the pivot view properties to display the sum/total at the end/first....You can Use that.Else you can aslso use the Running aggregate functions in the fx tab.
    Edit--->pivot view properties-->columns--->summation symbol is there--->Place the total as you like.
    mark if helpful/correct...
    thanks,
    prassu

  • RUNNING TOTAL IN REPORTS

    Hi,
    Can any one tell me how to create a running total in Oracle reports. I have two fields pulled in the SQL called CR and DR. I want to do the running total at report level. Here what I want
    CR------DR-------RTOTAL
    20-----10---------10 ( here the RTOTAL Field is (20 - 10) )
    30-----15---------25 ( here the RTOTAL Field is (30 - 15) + 10)
    50-----25---------50 ( here the RTOTAL Field is (50 - 25) + 25)
    75-----35---------90 ( here the RTOTAL Field is (75 - 35) + 50)
    Thanks
    -Feroz

    Hello,
    You can use the following SQL query :
    select cr,dr,cr-dr cr_minus_dr from <table> ...
    and create a Summary Column in the Reports :
    Source : the field cr_minus_dr
    Function : Sum
    Regards

  • Running Total of Statuses?

    Apparently I need to create a SQL to pull a "running total" to track certain statuses over its life.
    So for example, i would have PENDING->PREAPPROVED->APPROVED
    A person may move through these 3 statuses over an unspecified amount of time.
    Lets say I have 2 people that start in May at PENDING
    For the month of May PENDING count would be equal to 2 and i would display this
    Next month, one of the people goes to PREAPPROVED
    Now in June I would have 1 PENDING and 1 PREAPPROVED (no longer a total of 2)
    and so forth.
    I have an idea or two to get a full running total, but im not sure how to "subtract" from this running total. Like if it were PENDING at count of 2 then i can carry that forward, not sure how i can subtract this value?
    Any suggestions appreciated as always!

    Im not familiar with the OVER command, but have been googling around trying to figure out what it does.
    A quickie sample table i threw together is as follows
    CREATE TABLE EDL_OWNER.APPLICATION_STATUS_FACT
      ID NUMBER(38, 0) PRIMARY KEY
    , APPLICATION_ID NUMBER(38, 0) NOT NULL
    , STATUS_REASON_ID VARCHAR2(30)
    , STATUS_TS TIMESTAMP(6) NOT NULL
    Insert into APPLICATION_STATUS_FACT (ID,APPLICATION_ID,STATUS_REASON_ID,STATUS_TS) values (2200948,1575467,PENDING,to_timestamp('11-02-10 07:41:58.000000000','RR-MM-DD HH24:MI:SS.FF'));
    Insert into APPLICATION_STATUS_FACT (ID,APPLICATION_ID,STATUS_REASON_ID,STATUS_TS) values (2200947,1575467,PREAPPROVED,to_timestamp('11-03-10 07:42:06.000000000','RR-MM-DD HH24:MI:SS.FF'));
    Insert into APPLICATION_STATUS_FACT (ID,APPLICATION_ID,STATUS_REASON_ID,STATUS_TS) values (2200949,1575467,APPROVED,to_timestamp('11-04-10 07:42:06.000000000','RR-MM-DD HH24:MI:SS.FF'));
    Insert into APPLICATION_STATUS_FACT (ID,APPLICATION_ID,STATUS_REASON_ID,STATUS_TS) values (2200964,1575469,PENDING,to_timestamp('11-02-09 14:23:15.000000000','RR-MM-DD HH24:MI:SS.FF'));
    Insert into APPLICATION_STATUS_FACT (ID,APPLICATION_ID,STATUS_REASON_ID,STATUS_TS) values (2200963,1575469,PREAPPROVED,to_timestamp('11-02-09 14:23:23.000000000','RR-MM-DD HH24:MI:SS.FF'));
    Insert into APPLICATION_STATUS_FACT (ID,APPLICATION_ID,STATUS_REASON_ID,STATUS_TS) values (2201030,1575471,PENDING,to_timestamp('11-02-03 10:33:03.000000000','RR-MM-DD HH24:MI:SS.FF'));
    Insert into APPLICATION_STATUS_FACT (ID,APPLICATION_ID,STATUS_REASON_ID,STATUS_TS) values (2201018,1575471,APPROVED,to_timestamp('11-02-03 11:06:08.000000000','RR-MM-DD HH24:MI:SS.FF'));
    Insert into APPLICATION_STATUS_FACT (ID,APPLICATION_ID,STATUS_REASON_ID,STATUS_TS) values (2201026,1575473,PENDING,to_timestamp('11-02-03 10:37:11.000000000','RR-MM-DD HH24:MI:SS.FF'));
    Trying to describe this as best as I can
    --So in the month of Feburary i would have a total count of--
    --PENDING: 4--
    --In March--
    --PENDING:1--
    --PREAPPROVED: 2--
    --APPROVED: 1--
    --April--
    --PENDING:1--
    --PREAPPROVED: 1--
    --APPROVED: 2--
    Approved is the final state, and thus after X number of months should be the biggest number each month incrementing.
    PENDING and PREAPPROVED can increment or decrement depending on current month AND previous month statuses
    I can think of ways to write this outside of SQL where I store off variables, but i cant picture an SQL way of doing things (which is what I need)
    Thanks for the help so far
    Edited by: rodneyc8063 on Jun 19, 2011 3:26 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • RUNNING TOTAL

    Hi,
    Can any one tell me how to create a running total in Oracle reports. I have two fields pulled in the SQL called CR and DR. I want to do the running total at report level. Here what I want
    CR------DR-------RTOTAL
    20-----10---------10 ( here the RTOTAL Field is (20 - 10) )
    30-----15---------25 ( here the RTOTAL Field is (30 - 15) + 10)
    50-----25---------50 ( here the RTOTAL Field is (50 - 25) + 25)
    75-----35---------90 ( here the RTOTAL Field is (75 - 35) + 50)
    Thanks
    -Feroz

    Hi Bernd ,
    I tried this and here is the result.
    Query :
    SELECT MAIN_AC_CODE, JV_NO_T, JV_DATE_T, JV_DR_AMT, JV_CR_AMT, SUM(JV_DR_AMT - JV_CR_AMT) OVER ( PARTITION BY MAIN_AC_CODE ORDER BY MAIN_AC_CODE,JV_NO_T) RUNNING_TOTAL
    FROM FIN_JV_T WHERE MAIN_AC_CODE = 1102071001
    ORDER BY MAIN_AC_CODE, JV_NO_T , JV_DATE_T
    output :
    MAIN_AC_CODE     JV_NO     JV_DATE     DR_AMT      CR_AMT     RUNNING_TOTAL
    1102071001      JV1      05-JUL-06 6000      0           -11650
    1102071001      JV1      05-JUL-06 0           17650      -11650
    1102071001      JV13      15-JUL-06 15000      0           12750
    1102071001      JV13      15-JUL-06 30000      0           12750
    1102071001      JV13      15-JUL-06 7000      0           12750
    1102071001      JV13      15-JUL-06 0           30200      12750
    1102071001      JV13      15-JUL-06 1500      0           12750
    1102071001      JV13      15-JUL-06 1100      0           12750
    1102071001      JV14      16-JUL-06 1100      0           16358
    1102071001      JV14      16-JUL-06 2508      0           16358
    1102071001      JV15      16-JUL-06 3609      0           19872
    1102071001      JV15      16-JUL-06 0      95      19872
    1102071001      JV16      16-JUL-06 0      3608      16264
    1102071001      JV19      17-JUL-06      17000 0           -6668
    1102071001      JV19      17-JUL-06 0           22932      -6668
    1102071001      JV2      05-JUL-06      84000      0           18213
    1102071001      JV2      05-JUL-06 0           59119      18213
    1102071001      JV20      17-JUL-06 0           13000      5213
    1102071001      JV21      17-JUL-06 0      4000      1213
    1102071001      JV4      05-JUL-06      28134      0           -31786.57
    1102071001      JV4      05-JUL-06 0           61133.57      -31786.57
    1102071001      JV5      05-JUL-06 0      2970      -34756.57
    1102071001      JV7      05-JUL-06 5500      0           -29256.57
    1102071001      JV8      09-JUL-06 12500      0           -39147.57
    1102071001      JV8      09-JUL-06 0           22391      -39147.57
    1102071001      JV9      12-JUL-06 6740      0           -45107.57
    1102071001      JV9      12-JUL-06 0           12700      -45107.57

  • Running total as alphabets

    I want to put a running total as alphabets.
    For Example
    1. Question Title
         A) Option 1
         B) Option 2
         C) Option 3
    2. Question Title
         A) Option 1
         B) Option 2
         C) Option 3
    I got the running numbers for Question Title but i am not getting the A,B,... for Answers.
    Have anyone done similar with Crystal Reports Running Total or any other different way?

    Hi Dharmesh,
    Try this:
    1) Group by Title
    2) Create this formula and place it on the Group Header:
    WhilePrintingRecords;
    numbervar i := 64;
    3) Create another formula and place this on the Details Section:
    WhilePrintingRecords;
    numbervar i;
    i := i + 1;
    if i <= 90 then
    chrw(i);
    -Abhilash

  • Running total field which evaluates based on another running total field

    I'm figuring out how to use running totals in my reports.
    For each ProductCategory, there're many Products.
    For each Product, there're different ProductVersions.
    For each ProductVersion, it takes different Parts.
    My report should look like this
    Group1: ProductCategory (e.g. Catergory 1)
    Group2: Product (e.g. Product1)
    Group3: ProductVersion 1
    Details: Version 1: 3 * Part1 + 2 * Part2 + 4 * Part3
    GpFooter3: Total of 9 parts used
    Group3: ProductVersion 2
         Details: Version 2: 1 * Part1 + 2 * Part2 + 3 * Part3
    GpFooter3: Total of 6 parts used
    Group3: ProductVersion 3
         Details: Version 3: 2 * Part1 + 2 * Part2 + 3* Part3
    GpFooter3: Total of 7 parts used
    I've a running total at GpFooter3 to count number of parts, reset on change of Group3.
    But for each Product, I'm only interested in the details of the most recent version, that is the version with the greatest version number. So I hide all details and GpFooter3, and want to show
    GpFooter2: Product1, ProductVersion3, 7 parts
    How can I make a running total at GpFooter2 to select the ProductVersion which has the greatest version number among the Group "Product1"? The problem is, the number of versions for each Prodcut is not fixed, so I can't create a running total which evaluates on a particular version number. I tried to use a running total to obtain the maximum version number per Product, but I can't use this in the running total at GpFooter2 as a evaluation formula.
    Your help is much appreciated. Thank you very much.

    Create formula fields that are placed in Group Footer 3 that store the value(s) in global variables (basic syntax):
    global maxVersion as number
    global numParts as number
    maxVersion = {version}
    numParts = count({part}, {version})  ' Assuming grouped on {version}
    formula = ""
    Then use other formula fields to retrieve the values:
    global maxVersion as number
    formula = maxVersion
    And similarly for numParts...
    HTH,
    Carl

  • CALCULATE RUNNING TOTALS FOR SUBSETS OF THE DATA IN A SECTION

    How can I calculate a running total in BO XI Release 2, (WebI), where my totals only include the value of the current row and the previous 5 rows?
    For Example:
            In the data, behind my BO table, I have transaction dates that roll up to a dimension called Period.  The "Period" represents the Year and Month of the transaction date, which is a month's worth of data at a time.  Each month contains an aggregated value that is the Population of items for that month.  The RunningSum function in BO works well, except that I need the running total to only include the current month along with the last 5 months, for a total of 6 months worth of data per row. 
            See my example below.  The Period of JAN 2009 includes the Population for JAN 2009 plus the sum of the Populations from AUG 2008 through DEC 2008 for a total of 6 months worth of data.  FEB 2009 includes SEP 2008 through FEB 2009.  MAR 2009 includes OCT 2008 through MAR 2009...
    __________Period_______Population_______6 MOS
    __________200801__________54___________54
    __________200802__________60__________114
    __________200803__________50__________164
    __________200804__________61__________225
    __________200805__________65__________290
    __________200806__________58__________348
    __________200807__________70__________364
    __________200808__________64__________368
    __________200809__________59__________377
    __________200810__________62__________378
    __________200811__________66__________379
    __________200812__________75__________396
    __________200901__________62__________388
    __________200902__________53__________377
    __________200903__________63__________381
    __________200904__________67__________386
    Six months is obviously no magic number.  I'd like the solution to be flexible enough to use for 3, 12, 18, or 24 month periods as well.

    Hi Frank,
    can you consider building the rolling sums directly in your database using subselects in the select statement:
    eg. select attr1, attr2,key2, (select sum(key1) from B where B.month<=A.month and B.month>=A.month-6) from A
    Just create a key figure in your universe and add the subselect statement select sum(key1) from B where B.month<=A.month and B.month>=A.month-6 as select-clause.
    ATTENTION: This is SQL pseudo code.
    Regards,
    Stratos

  • Sub-Report Running Total

    Post Author: Set_Shot_Dave
    CA Forum: General
    Hello All,
    Let me set up my problem first.
    I have a running total from a subreport and a running total from my main report.
    I shared my running total from both reports ( it didn't work when I did or didn't).
    when I do my calculation I get a boolean true as my answer.
    By the way my running total from my main report is controled by a formula.
    In subreport I did the following;
    Called the formula share1
    shared numbervar Cong1;
    cong1 = sub-report-running total
    in main report i did the follwing
    called the formula share2
    shared numbervar Cong2;
    Cong2 = main-report-running total
    Still in main report
    I create a a field called Calcuation
    shared numbervar Cong1
    shared numbervar Cong2
    numbervar calculation
    calculation = Cong1 / Cong2
    I get a boolean True

    Post Author: Set_Shot_Dave
    CA Forum: General
    I brought in the shared variable into the report on its own.
    No calculation just a formula field as followed
    @calculation
    shared numbervar share1;
    numbervar calculation;
    calculation:= share1
    I get  0.00
    The fields are in the report footer of the main report and report footer of the sub-report is there a problem with this
    the

  • Running Total on a Running Total

    Post Author: MikeA-ICE
    CA Forum: General
    I have set up a running total on a field in a subreport and it is calculating correctly. I set the running total in the Report Footer of the report, then I created a variable which passes the running value back to the main report. The variable is placed in a Group Footer on the main report and it resets on each change of the group. However, now I need the grand total of that running total to appear in the Report Footer of the main report. I created a manual running total formula and placed it it in the Report Footer of the main report. Here it is:NumberVar Sect2MatlTotal;WhilePrintingRecords;NumberVar Sect2MatlTotal := NumberVar RunningSect2MatlTotal + {@Material$Var2a}  The problem is that the value that comes out is grossly larger than it should be. It should be $112,350,582 but it comes back as $212,603,556, which is nearly double what it should be. Can anyone suggest a method that would allow me to place the running total in the Report Footer of the main report and get the correct value that is visible in the Group Footer just above it?

    Post Author: V361
    CA Forum: General
    you may need to select evaluate on group, or reset on group to get this to work.  or just use the shared variable to bring the total down.

Maybe you are looking for

  • Abend Bad Resource Tag passed to LSLReturnRcvECB

    Server with 6.5 SP7 GRW 7.04 +FTF , BM 3.8 sp5 , GWIA WEBACC , ARCSERVE R11 SP3 today had 2 Abends at 13:37 and 16:12 for the same reason , never had this reason before . Does this happen elsewhere? Any idea as to reason or cause ? Possible fixes suc

  • Not enough Ram memory and cannot save due to a program error in photoshop cs6

    Hi, I'm currently a beginner at photoshop cs6, and I've been using it since december last year, mostly to draw stuff and it has worked fine with few to no errors at all. However, recently when I've been drawing, the same message keeps popping up over

  • Tecra S2 - resolution for external monitor on NVIDIA GeForce Go 6600

    Hello! I'm new here ... I have a Tecra S2 with Windows XP SP2 and graphic card NVIDIA GeForce Go 6600. Internal resolution (display of notebook) is 1024 x 768. Its work fine. But I work with an external monitor VGA with "DualView" function. It is a S

  • Data extraction through generic data source

    Hi sap-BI experts,       i created the infoset query by using these transactions SQ01, SQ02, SQ03 and the tables used are EKKO,EKPO and MARA. and when i wanted to extract data from generic data source through infoset query i am getting an error like

  • Oracle EBS financials/Manufacturing/HRMS Functional consultants vacancies

    TES (The Employment Solution) is searching for an experienced professionals for our client's various projects around Canada. We are currently searching for the following professionals: Oracle EBS Manufacturing Functional Consultant Required skills: -