Here is what I use. Maybe someone will add it to pikwiki for me.
SUBROUTINE RUNNING_TOTAL(CUR.TOT, AM.PTR, AMT, RESET.DATA)
* RUNNING_TOTAL Keeps a Running Total for Reports
* by David A. Green -- 9/12/01
* www.DAGConsulting.com (480) 813-1725
*
* AM.PTR for multiple running totals.
* AMT for the Amount you want to add to the Running total
* RESET.DATA for Break Point.
*
COMMON /RUNTOT/ RUNTOT.REC(10)
*
EQUATE RUNTOT.FLAG TO RUNTOT.REC(1)
EQUATE RUNTOT.TOTS TO RUNTOT.REC(2)
EQUATE RUNTOT.LAST TO RUNTOT.REC(3)
*
TEST.FLAG = @DATE:@TIME
*
IF TEST.FLAG # RUNTOT.FLAG THEN
RUNTOT.FLAG = TEST.FLAG
RUNTOT.TOTS = ""
RUNTOT.LAST = ""
END
*
IF RESET.DATA # RUNTOT.LAST<AM.PTR> THEN
RUNTOT.LAST<AM.PTR> = RESET.DATA
RUNTOT.TOTS<AM.PTR> = 0
END
*
RUNTOT.TOTS<AM.PTR> += AMT
CUR.TOT = RUNTOT.TOTS<AM.PTR>
*
RETURN
Thanks,
David A. Green
www.dagconsulting.com
(480) 813-1725
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Kebbon Irwin
Sent: Thursday, July 23, 2009 8:22 AM
To: [email protected]
Subject: [U2] FW: Running total from UniData dict
I read this with great interest as I have an identical requirement.
However, I use Unidata and this technique does not seem to work, in either
ECLTYPE. Does anybody have a UDT solution?
Cheers,
Kebbon
> From: [email protected]
> To: [email protected]
> Date: Tue, 30 Jun 2009 10:13:58 +1000
> Subject: Re: [U2] Running total from UniVerse dict
>
> Hi Kate,
>
> Try this... This will show the running total for every printed line
>
> >ED DICT FILENAME RUNNING.TOTAL
> This is a Type "I" Descriptor last compiled on 30/06/09 at 09:07.
> 20 lines long.
>
> ----: P7
> 0001: I
> 0002: @1...@record<8>
> 0003: MD2
> 0004: RUNNING TOT
> 0005: 10R
>
> Regards
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Kate Stanton
> Sent: Tuesday, 30 June 2009 9:55 AM
> To: U2 Users List
> Subject: [U2] Running total from UniVerse dict
>
> I am sure we used to be able to do this using I-type, but I cannot
remember
> how.
>
> Now we are using I-types again (not just ocreelatives), I want to be able
to
>
> show each item outstanding for an account, with a running balance.
>
> Can anyone help?
>
> I have been to the doc, and read about CALC and TOTAL, but they seem to
> apply to totalling lines (and I can't make that work either - I am feeling
> very inadequate).
>
> TIA, Kate
>
> Kate Stanton
> Walstan Systems Ltd
> 4 Kelmarna Ave, Herne Bay, Auckland 1011, New Zealand
> Ph: +64 9 360 5310 Fax: +64 9 376 0750 Mobile: +64 21 400 486
> Email: [email protected]
>
> _______________________________________________
> U2-Users mailing list
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> --
> Message protected by DealerGuard: e-mail anti-virus, anti-spam and
content
> filtering.
> http://www.pentanasolutions.com
>
> Click here to report this message as spam:
> https://login.mailguard.com.au/report/1xLyloqUd9/dBLuI50jon61fjTIRoMZh/0
>
>
> _______________________________________________
> U2-Users mailing list
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users