ADF: displaying a running total, howto/code sample needed

Hi,
can anyone point me towards and example of how to display a running total on a page? I have a read only table which i want to display a total of a numeric column.
thanks in advance,
Brenden

Which technology are yoo using? JSP/UIX? JSF?
In JSF this would be easy, you can just create a backingBean for this, since you have access to the iterator in the backingbean, you can calculate any totals you want and display it on your page.
For UIX/JSP you can create a custom method on your app module to calculate your totals, and put them in the requestscope.
Anton

Similar Messages

  • SSRS Running Totals Custom Code

    I have a report in which I need to total a column with an expression and created simple code to have a running total.  When I run the report through report builder, the total only reflects the current page (it is 6 pages long) but if I export the report
    out to Excel, the total is correct.
    Below is the code:
    Public running_roy as Double = 0
    Public Function roy_tot(ByVal cust_type, ByVal roy, ByVal ret_value) as Double
    Dim temp_var as Double
    if cust_type = 0 then
    running_roy = running_roy + roy
    if ret_value = 0 then
    temp_var = roy
    else
    temp_var = running_roy
    end if
    ELSE
    temp_var = 0
    end if
    return temp_var
    End Function
    If I change the Public variable to "Public Shared" the totals change as I flip back and forth between the pages in report builder.
    Any suggestions?

    Hello alan2624,
    Thanks for your clarification.
    In the report, the custom code will be compiled as a class before it is used. Every time the page is loaded, the class on the page will be initialized. The un-shared (non-static) instance will be reset. Therefore, you will see the value is reset back to
    zero if the public variable is not announced as "Shared". If you announced it as shared, then the variable is on the class level. It will not be changed by instance initializing. In addition, any operations on the variable will be recorded. This is not the
    bug, but it is by design of the VB.net code.
    If you export the report to the Excel, I think it will only generate a single page, and the total value is only the last one. It should be correct. If it is used in the pages in browser, I suggest you need design your code carefully for VB.net design.
    If you have any questions about this issue, please let me know.
    Regards,
    Edward
    Edward Zhu
    TechNet Community Support

  • Running Total Grouping Formula

    I have a running total condition that I need to summarize the field CAWP.BAC. I would typicaly evaluate this total for change of group 4 and reset on change of group 3. I need to condition the evaluation for ".900" in {CAWP.WP} but i also need to evaluate for change of group 4. Does any one have any examples of a formula for evaluation "on change of group"?

    Hi John,
        For this you can try using manual running total formula's.
    1) Create a @reset formula as below and place it in group header 3.
        Formula :
        Whileprintingrecords;
        Numbervar i:=0;
    2) Create an @evaluation formula and place it in detail section.
       Formula:
       whileprintingrecords;
       numbervar i;
       if {CAWP.WP} = ".900" then
          i:= i+ {CAWP.BAC}
    3) Create a @display formula and place it in group footer 4.
        Formula:
        whileprintingrecords;
        numbervar i;
    Hope this will help!!
    Regards,
    Vinay

  • Percent on Running totals

    Post Author: llcoolt
    CA Forum: Formula
    I have a couple of group running totals:
    TotalItems
    TotalCompleteAtExp
    I need to create a formula that finds the percentage of the two.  Any help?  Would this be in a running total?

    Post Author: llcoolt
    CA Forum: Formula
    but it's calculated at a group level, not as a percentage for the whole report. 
    The running totals were grouped by vendors.  The percentage I was looking for was also grouped by vendor, not a percentage of ALL service orders and the vendors they were assigned to, but percentages run per vendor based on those completed by vendor.

  • Sum values to display total (running total)

    I apologize for posting such a rudimentary question but I haven't been able to find an answer by searching the forum.
    Basically, I have several sensor inputs that are all factored into an equation that yeilds heat output (btu/hour). I need to take this value, which I have iterating once every second, and add it to itself every time it increments. In other words, say the first value is 10 (btus), the next second the value is 16, the code calculates and displays a value of 26 on the front panel and waits for the next second (or whatever iteration I choose) at which time it will add the new value to the running total.
    Thanks for your input
    Jake 
    Solved!
    Go to Solution.

    The Loopback function (<--) is basically a miniature shift register.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • How can I display the vendor associated with result of my running total sum

    I have a report that lists vendors with their most vecent order dates.  I need to set up a rotation so that the vendor with the latest order date is next to be selected.  I used the running total summary to pick the latest date.  How can I display the vendor associated with result of my running total summary?

    If your "latest" order date means the "oldest" order date, why don't you try this:
    Go to Report tab -> Record Sort Expert -> Choose your order date in ascending order
    This will make your oldest order your first record shown. 
    You can then create a running total count for each record.
    Lastly, in your section expert under conditional suppress X+2 formula, write this:
    {#CountRecords}>1
    The result will only show the oldest record in your report.
    I hope that helps,
    Zack H.

  • DISPLAY RUNNING TOTAL IN GROUP HEADER

    Post Author: sharonmtowler
    CA Forum: Formula
    I know there is a way to do this, just forgot how. i am in version 8.5.  i have a manual running total which calculates order qty for the entire sales order.i (dont like using the rt wizard-buggy)
    the knowledge base says to use a cross tab, but there hit or miss also.
    does anyone know how to show the display formula for a manual runnning total in the group header instead of group footer?

    Post Author: pandabear
    CA Forum: Formula
    Hi Sharon,
    I wanted to try this before I sent it to you, but my Crystal is down because (blah, blah, long story here....yawn....).
    I think I understand.  You want to show the "Total" for each group, in the group header instead of the group footer?
    My experience is that Crystal works from the top down (read: limiting), so I need a work around to do this.
    1 - Do the calculation in the query...sum by group, filter with a "Case" statement, etc.  If there's a reason you can't do that then
    2 - (and this is what I wanted to try first) see if you can group on the same field twice. 
    Group 1 - Test.field
    Group 2 - Test.field (same field)
    If you can,
    then just carry the total from the group footer of the previous group (same field) above you, and bring it down
    (shared var ?) to the group below.
    My 2 cents is up.
    Hope this helps,
    The Panda

  • My Code Samples Don't Always Display

    I have table that contain code samples. The help system
    renders everything except the code. If I reload, the code appears:
    http://help.marketbright.com/index.html#adding_tracking_codes.htm
    What's the proper way of "wrapping" code samples so that it's
    not considered part of the help topic's html? I don't know if
    that's the cause, but I thought I'd ask.
    Thank you,
    Angela

    I'm not clear on the problem here. I followed your link and
    the code displays OK. Please explain where things are not working.
    Putting code in a table as you have done and letting the
    table force the wrapping is an accepted way of displaying code.

  • Running total in group header doesn't display when it's at page bottom

    Post Author: Charles Denight
    CA Forum: Formula
    Hi, Using v.9 of Crystal Reports I've created some running totals using a cross-tab workaround to get the running totals into the group headers, but when the group header falls at the bottom of the page then the running total doesn't show up.Would appreciate knowing why and how to fix this.

    Replacing an item that is malfunctioning because of a manufacturing error is the bare minimum I would expect from customer service for any electronics item.
    The thing Apple does extremely well is their flat fee policy for repairs on their computers.
    I managed to break my MacBook pretty seriously (logic board needed to be replaced) and I'm sure it cost them more to repair the unit than the $328 they charged me.
    I probably would have been angry if it was something minor, but I'm guessing that most repairs to screens/motherboards/etc cost more than their flat fees.

  • Running total of calculated field in pivot

    VERSION: ORACLE 11
    TABLE:
    create table chart_detail (
    DIS        NUMBER,
    BLD_MO VARCHAR2(7),
    BLD        NUMBER(10),
    RPLC      NUMBER(10));DATA:
    insert into chart_detail values (60,'2011-03',0,2);
    insert into chart_detail values (150,'2011-04',10572,0);
    insert into chart_detail values (120,'2011-04',26449,5);
    insert into chart_detail values (30,'2011-04',0,1);
    insert into chart_detail values (60,'2011-04',0,7);
    insert into chart_detail values (90,'2011-04',0,9);
    insert into chart_detail values (120,'2011-05',5714,0);
    insert into chart_detail values (90,'2011-05',24557,1);
    insert into chart_detail values (60,'2011-05',0,4);
    insert into chart_detail values (30,'2011-05',0,0);
    COMMIT;EXPECTED RESULTS:
         2011-04                    2011-05               
    DIS     RPLC     BLD     TBLD     IPTV     RPLC     BLD     TBLD     IPTV
    30     1     0     37021     0.03     0     0     30271     0.00
    60     7     0     37021     0.22     4     0     30271     0.13
    90     9     0     37021     0.46     1     24557     30271     0.17
    120     5     26449     37021     0.59     0     5714     5714     0.17
    150     0     10572     10572     0.59               0     
    180               0                    0     
    TOTAL     22     37021               5     30271          PROBLEM: I need to have a running total of IPTV like in the above example. I can get the IPTV for each DIS/bld_mo but I don't know how to get the running total of it. In the script below I just used an example where I tried summing the IPTV like was done for build. I know it can't be done that way because IPTV is a calculated field in the query but if I substitute "APR_IPTV" with the formula for IPTV I get an error that window functions aren't allowed here. I do not know a way around this. I commented out the bad piece of code.
    PROBLEM SCRIPT:
    WITH  pivot_results  AS
      SELECT    dis
      ,    NVL (apr11_rep,  0)  AS apr11_rep
      ,    NVL (apr11_bld,   0)  AS apr11_bld
      ,    NVL ( SUM (apr11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0
                    )        AS apr11_tbld
    ,      DECODE(NVL ( SUM (apr11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),0,0,ROUND(NVL(apr11_rep, 0)*1000/ NVL ( SUM (apr11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),2
                    ))        AS apr11_iptv               
    ,      NVL ( SUM (apr11_iptv)
                      OVER (ORDER BY dis DESC)
                    ,                 0
                    )        AS apr11_tiptv  
      ,    NVL (may11_rep,  0)  AS may11_rep
      ,    NVL (may11_bld,   0)  AS may11_bld
      ,    NVL ( SUM (may11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0
                    )        AS may11_tbld
    ,      DECODE(NVL ( SUM (may11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),0,0,ROUND(NVL(may11_rep, 0)*1000/ NVL ( SUM (may11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),2
                    ))        AS may11_iptv
    ,      DECODE(NVL ( SUM (may11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),0,0,ROUND(NVL(may11_rep, 0)*1000/ NVL ( SUM (may11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),2
                    ))        AS may11_tiptv               
      FROM     chart_detail
      PIVOT     (  MAX (rplc)  AS rep
              ,  MAX (bld)  AS bld
              FOR  bld_mo   IN ( '2011-04'  AS apr11
                                             , '2011-05'  AS may11
    SELECT    CASE
            WHEN  GROUPING (dis) = 0
            THEN  TO_CHAR (dis)
            ELSE  'Total'
        END      AS dis
    ,    SUM (apr11_rep)  AS apr11_rep
    ,    SUM (apr11_bld)  AS apr11_bld
    ,    SUM (apr11_tbld) AS apr11_tbld
    ,    CASE
            WHEN  GROUPING (dis) = 0
            THEN  SUM (apr11_iptv)
        END      AS apr11_iptv
    ,    SUM (apr11_tiptv) AS apr11_tiptv
    ,    CASE
            WHEN  GROUPING (dis) = 0
            THEN  SUM (apr11_tpiptv)
        END      AS apr11_tiptv
    ,    SUM (may11_rep)  AS may11_rep
    ,    SUM (may11_bld)  AS may11_bld
    ,    SUM (may11_tbld) AS may11_tbld
    ,    CASE
            WHEN  GROUPING (dis) = 0
            THEN  SUM (may11_iptv)
        END      AS may11_iptv   
    FROM    pivot_results
    GROUP BY  ROLLUP (dis)
    ORDER BY  pivot_results.dis
    ;Thank you,

    Hi,
    So you know how to compute iptv for an individual row; the problem now is that you want to get a running total of iptv; is that it?
    The problem there is that computing iptv requires an analytic function, and analytic functions can't be nested. To get the results of nesting f (g (x)), where f and g are analytic funtions, you have to compute g in a sub-query, and then use the results as the argument to f in a super-query.
    Here's how to apply that to your situation:
    WITH  pivot_results  AS
         SELECT    dis
    -- April, 2011
           ,           NVL (apr11_rep,   0)  AS apr11_rep
           ,           NVL (apr11_bld,   0)  AS apr11_bld
           ,           NVL ( SUM (apr11_bld)
                                       OVER (ORDER BY dis DESC)
                          , 0
                          )               AS apr11_tbld
         ,      NVL ( 1000 * apr11_rep
                              / NULLIF ( SUM (apr11_bld) OVER (ORDER BY dis DESC)
                                          , 0
                   , 0
                   )               AS apr11_iptv
    -- May, 2011
           ,           NVL (may11_rep,   0)  AS may11_rep
           ,           NVL (may11_bld,   0)  AS may11_bld
           ,           NVL ( SUM (may11_bld)
                                       OVER (ORDER BY dis DESC)
                          , 0
                          )               AS may11_tbld
         ,      NVL ( 1000 * may11_rep
                              / NULLIF ( SUM (may11_bld) OVER (ORDER BY dis DESC)
                                          , 0
                   , 0
                   )               AS may11_iptv
           FROM     chart_detail
           PIVOT    (    MAX (rplc)  AS rep
                    ,    MAX (bld)   AS bld
                    FOR  bld_mo   IN ( '2011-04'  AS apr11
                                      , '2011-05'  AS may11
    SELECT    CASE
                  WHEN  GROUPING (dis) = 0
                  THEN  TO_CHAR (dis)
                  ELSE  'Total'
               END      AS dis
    -- April 2011
    ,           SUM (apr11_rep)  AS apr11_rep
    ,           SUM (apr11_bld)  AS apr11_bld
    ,           SUM (apr11_tbld) AS apr11_tbld
    ,           CASE
                  WHEN  GROUPING (dis) = 0
                  THEN  ROUND ( SUM (SUM (apr11_iptv))
                                          OVER (ORDER BY  dis)
                      , 2
               END      AS apr11_iptv
    -- May 2011
    ,           SUM (may11_rep)  AS may11_rep
    ,           SUM (may11_bld)  AS may11_bld
    ,           SUM (may11_tbld) AS may11_tbld
    ,           CASE
                  WHEN  GROUPING (dis) = 0
                  THEN  ROUND ( SUM (SUM (may11_iptv))
                                          OVER (ORDER BY  dis)
                      , 2
               END      AS may11_iptv
    FROM      pivot_results
    GROUP BY  ROLLUP (dis)
    ORDER BY  pivot_results.dis
    ;Output:
          APR11  APR11   APR11  APR11 MAY11  MAY11   MAY11  MAY11
    DIS    _REP   _BLD   _TBLD  _IPTV  _REP   _BLD   _TBLD  _IPTV
    30        1      0   37021    .03     0      0   30271    .00
    60        7      0   37021    .22     4      0   30271    .13
    90        9      0   37021    .46     1  24557   30271    .17
    120       5  26449   37021    .59     0   5714    5714    .17
    150       0  10572   10572    .59     0      0       0    .17
    Total    22  37021  158656            5  30271   96527As you can see, this is not quite what you wanted on the row where dis='150'. You asked for NULLS in the may11_rep, may11_bld and may11_iptv columns. You can get those results if you need them; just explain the rules that govern whether to display the values and when to display NULL.
    The way you posted the sample data and results, and the quantity of sample data were all excellent; it really helped me find a solution. Thanks.
    It would have also helped it you had explained how iptv is computed. Basically, iptv = 1000 * rep / tbld, right?
    It looks like most of this code:
    ,      DECODE(NVL ( SUM (may11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),0,0,ROUND(NVL(may11_rep, 0)*1000/ NVL ( SUM (may11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),2
                    ))        AS may11_iptvwas a way of avoiding divide by 0 errors; it would have been helpful if you had explained that.

  • Running Total Value or Zero

    Post Author: jligget
    CA Forum: Formula
    Good afternoon,
    I have a 2 running totals that sums either debits or credits. There may be cases where there are no credits so in place of the sum I need to place zero's.
    The running total has a formula in it of {@detail transaction code} in &#91;'22', '32'&#93; and if so it then sums the amount field. (22 or 32 desingate a credit - I have another running total for a debit)
    The problem is that if no credits exist nothing gets summed and I get spaces in my running total field. How can I make it so that it will display zeros instead?
    Thanks,
    Jeannette

    Post Author: Jeffs23
    CA Forum: Formula
    I had some minor issues with my formulas and Running Total so I modified them alittle:
    @TotalTime
    If {Data.ApptTime} = 0 then    0else    {Data.ApptTime}
    @Converted Time
    If {#RTotal0} = 0 then    "--"else    ToText(Truncate({#RTotal0}/60),0,"") + " Hour(s), " + ToText(Remainder({#RTotal0},60),0,"") + " Min(s)"
    My running total stayed the same.......
    Field to Summarize - @TotalTime Type of Summary - sum Under Evaluate Section: "Use a Formula":(onfirstrecord or{Data.ResourceStart} <> previous({Data.ResourceStart}) or{Data.Resource} <> previous({Data.Resource}) ) andminimum({Data.ApptKind},{Data.ResourceStart}) = 1 AND maximum({Data.Column},{Data.ResourceStart}) >= '1' Reset on change of field {Data.Resource}
    Some fake sample data:
    Resource = Francis, William MD
    Facility 1: River Oaks Main Clinic
    Facility 2: Western Medical Hospital
    Date of Service = 10/25/2007
    From 7:15 am to 11:45 am, Patients were treated at Facility 1: River Oaks Main Clinic *** (total time = 4 hours 30 min)
    From 12:15 pm to 1:00 pm, Patients were treated at Facility 2: Western Medical Hospital *** (total time = 45 min)
    From 1:00 pm to 3:15 pm, Patients were treated at Facility 1: River Oaks Main Clinic *** (total time = 2 Hours 15 min)
    The report should tell me Total time at River Oaks Main Clinic = 6 Hours 45 min and 45 min for Western Medical Hospital. What it currently is doing, is reporting the 6 Hours 45 min on the River Oaks Main Clinic and 7 Hours 30 min on the Western Medical Hospital. The time for this facility should be 45 minutes, yet its taking the full provider time and throwing it into this second facility. I am assuming its because the Running total tells it "Reset on change of field {Data.Resource}". Somehow, I need it to evaluate on both the Resource and the Facility. Any suggestions?

  • Running total with Layout Editor with BI Publisher 11g

    Hello,
    I'm trying to create a report with BI Publisher Layout Editor using the "running total" option. My XML looks like this:
    <G_1>
    <REGION>MZ</REGION>
    <G_2>
    <INVOICE_NB>1</INVOICE_NB>
    <VALUE>1000</VALUE>
    </G_2>
    <G_2>
    <INVOICE_NB>2</INVOICE_NB>
    <VALUE>3000</VALUE>
    </G_2>
    </G_1>
    and I want to insert in the layout a data table with this information:
    |REGION | RUNNING TOTAL
    |MZ | 1000
    | | 4000
    I inserted a new data table with the region and the value. I grouped the Region to the left (Grouping -> Group Left).
    Then I selected the Value column and clicked on Formula -> Running Total, but nothing happened with this last step. Am i forgotting something? How can I display Running Totals on a Data Table with BI Publisher (using Layout editor and not RTF Templates)?
    Thank you,
    Josep

    Use the following: Declare a variable before the loop: <?xdoxslt:set_variable($_XDOCTX, 'RTotVar', 0)?>
    In your loop: Include the following code for your Running Total Column: <?xdoxslt:set_variable($_XDOCTX, 'RTotVar', xdoxslt:get_variable($_XDOCTX, 'RTotVar') + VALUE)?><?xdoxslt:get_variable($_XDOCTX, 'RTotVar')?>
    For an example of the RTF : Look for the files under your local BI Publisher Desktop installation: BI Publisher Desktop\samples\RTF templates\Advanced\Running Total
    Thanks,
    Bipuser

  • How can implement running total in oracle forms

    I want to implement a running total in oracle form
    like
    100 100
    300 400
    200 600
    500 1100
    200 1300
    100 1400
    PROCEDURE calculate_srno IS
    current_rownum     integer:=:System.Cursor_Record;
    starting_srno integer:=:rs_1;
    last_rownum integer;
    BEGIN
         last_record;
         last_rownum:=:system.cursor_record;
         go_record(1);
         FOR counter IN 1..last_rownum LOOP
              :sum_1:=:rs_1;
              :rs_1:=:sum_1+:rs_1;
         --     :offered_srno_to:=starting_srno;
              if last_rownum=:System.Cursor_Record then exit;
              end if;
         END LOOP;
    END;
    it is not working after want to insert between in the table

    Why write code for this? Oracle Forms 10g has Calculated/Summary fields that will do this for you without the need of writing any PL/SQL.
    Simply add a non-table item to the data block with the item you want to keep the running total for. Then change the following properties of the item:
    Data Type: Number
    Calculation Mode: Summary
    Summary Function: Sum
    Summarized Block: <Your Data Block>
    Summarized Item: <Your Block Item>
    Number of Items Displayed: 1 (if your item is in a Multi-Record (Tabular) layout else you don't need to change this property.
    You will also need to change the following property of the block: Query All Records: Yes
    If changing the Block's "Query All Records" property causes your form to be too slow because of the number of records in your block, then you could keep a running total manually by using a combination of the Post-Query and When-Validate-Item (WVI) triggers. If your block does not allow data entry, then you could do this with just the Post-Query trigger. For example:
    BEGIN
      /* This code sample assumes you have added a non-table item */
      /* to your block called SUMMARY.  */
      :YOUR_BLOCK.SUMMARY := :YOUR_BLOCK.SUMMARY + NVL(:RS_1,0);
    END;If your block allows data entry, then you would add the following to your existing WVI trigger.
    BEGIN
      /* Perform your data entry validation logic first... */
      IF ....
      ELSE
        ...Validation is successful...
        :YOUR_BLOCK.SUMMARY := :YOUR_BLOCK.SUMMARY + NVL(:RS_1,0);
      END IF;
    END;Hope this helps.
    Craig...

  • Need to sum hh:mm:ss in crystal report using Running Total Fields

    Hello,
    I am new to .Net and crystal reports so please go easy on me.
    I am trying to develop a crystal report using Visual Basic .NET. I have a column which displays the "Inbound Time" in "hh:mm:ss" format. I have to sum the total inbound time and display it.
    I tried using the Running Total and i am not successful.
    Here is the code which I am using in the Running total
    WhilePrintingRecords;
    if isNumeric({Report3;1.TotalInboundTime}) then
    {Report3;1.TotalInboundTime}
    else
    CStr ({Report3;1.TotalInboundTime});
    NumberVar array test2 := [ToNumber(left(CStr({Report3;1.TotalInboundTime}),2)),ToNumber(mid(Cstr({Report3;1.TotalInboundTime}),4,2)),ToNumber(right(Cstr({Report3;1.TotalInboundTime}),2))];
    StringVar test1 := CStr( (ToNumber(test2[1])3600)+(ToNumber(test2[2])60)+(ToNumber(test2[3])));
    InboundTime is the time field which is in "hh:mm:ss"  format.

    Hello Bharathi,
    There are a couple of KBs about this. I haven't tested them myself, but you could give them a try:
    [How sum multiple time fields in Crystal Reports|http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2008378]
    [Creating a running total to show the difference between two datetime fields |http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2010261]
    [Totalling time values that are stored as numbers in the database|http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2005576]
    Cheers,
    Fritz

  • How to create a loop to run total of records for before and after unconstant date

    Post Author: Ann2
    CA Forum: Formula
    Here is the data sample:
    ID period code date
    1  00  I    01/01/1999
    1 00   Z   01/02/1999
    1 00  G   12/05/1999
    1 00  M   01/01/2000
    There are many students with many periods and many codes. I need to save a date when code = 'G' and count separateley records per student/period 2 times - before and equal that date and after that date, so in the end for period 00 I will have 2 values: 3 (before) and 1(after).
    There are periods from 00 to 08. I am counting students abscencies before and after warning letter was sent (code G).
    The result data should look : 00 01 02 03 04 05 06  07  08              00 01 02 03 04 05 06  07  08     Total
                                                3  0   0   0   0   0   0   0   0                 1 0    0   0   0   0   0   0   0        4
    Please help me.
    Thank you.
    Ann2

    Post Author: Ann2
    CA Forum: Formula
    Thank you for your answer, but I do care about the date the 'G' happened, because I need to reset count.
    The logic behind is this:if a student absent for more than 8 times per period - the letter will be sent out to the parents , that will be code 'G' with period '-1' (it may happen that there will never be code 'G' , but I need to track all absencies). Once the letter is sent, the count starts over (the count starts over the next day after code 'G'). The absencies which happened before or the date the letter sent should count toward 'previous'  abscenices, all other - absenices after the letter.
    So basically I need total per period and total per period before or the day with code 'G'.  Running total with reset with formula code = 'G' does not work.
    I created a formula field which has global date (when code 'G' happenned) and it says if globaldate >= periodDate then date (1900,01,01) else (2100,01,01) and that formula is ok, but I can not use it in running total or can not create group on it and insert total.
    Please help me with this. Thank you.
    Ann2

Maybe you are looking for

  • Communicating with the TI agent

    Hi, I am new to the JVMTI world and I seem to be missing something. The examples provided with the JDK are commandline driven with postmortem analysis. My project needs to interact with the agent from the gui but I am not sure how. My java tool is la

  • Unknown error (-124) HELP!!!!!!!!!!!!!!!!

    I'd had some troubles with my ipod software so I downloaded itunes again and the ipod worked perfectly, then midways it stopped and said "unknown error (-124)" and now, the computer won't recognize it. It's a 4G black ipod... I don't know if it makes

  • Using printer with java

    Hi all, I want to take print out of a text file from java. Do we hava any class or any way through which we can do this. Thanks in advance Regards, Arunkumar

  • If I have an good idea that someone will take as a part of there brand. Who do I contact them?SAFER

    Hey. My name is Reidar Johnsen. And think I have a good idea for apple products, the products that will make this fully self-contained. (ipad, ipod, iphone tablets and so on. + + Will help to help many people. And apple brand will expand furter than

  • PS CS5 quits on launch

    Just installed CS5 and all apps are working except Photoshop. I get the usual "The application Photoshop quit unexpectedly... Ignore, Report, Relaunch" window when trying to launch PS CS5. Can anyone give me a few steps to go through it get things wo