Running subtotal?
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 18370
interpreted = N
texte = Here's one that's way beyond my mortal abilities. I am trying to insert arunning subtotal into a [foundItems] context that breaks at each date changeand totals the hours for each date. The search at the bottom is hard-coded toreturn results for 6/12 just as a test. Anyway, since this output will encompass two weeks, perhaps three, of data, Icannot come up with a way to handle a running subtotal short of doing 14separate [search] and [founditems] contexts, one for each date, and then 14more for the running subtotals. Any insights would be much appreciated. (Notethat I've adopted Ken's date storage and retrieval method here, which I highly recommend.) [search db=hours.db&equserdata=[username]&aswdatesort=1&max=500] [foundItems]
| [formatdays_to_date %a][wdate][/format]., [format days_to_date][wdate][/format] | [ccode] | [lookupdb=codes.db&lookinField=ccode&value=[ccode]&returnField=desc] | [whours] |
[/foundItems]
| Total hours for 06/12/1998: [search db=hours.db&equserdatarq=[username]&eqwdatedatarq=729917][math][founditems][whours]+[/founditems]0[/math][/search] |
-- Gil Poulsen, Webmaster*************************************************************** AltiM@c * Phone: (908) 222-9001 ** 111 Mali Drive * FAX: (908) 222-9002 ** North Plainfield, NJ * e-mail: help@altimac.com ** 07062-2355 * WWW: http://www.altimac.com ***************************************************************
Associated Messages, from the most recent to the oldest:
Here's one that's way beyond my mortal abilities. I am trying to insert arunning subtotal into a
[founditems] context that breaks at each date changeand totals the hours for each date. The search at the bottom is hard-coded toreturn results for 6/12 just as a test. Anyway, since this output will encompass two weeks, perhaps three, of data, Icannot come up with a way to handle a running subtotal short of doing 14separate
[search] and
[founditems] contexts, one for each date, and then 14more for the running subtotals. Any insights would be much appreciated. (Notethat I've adopted Ken's date storage and retrieval method here, which I highly recommend.) [search db=hours.db&equserdata=
[username]&aswdatesort=1&max=500]
[founditems]| [formatdays_to_date %a][wdate][/format]., [format days_to_date][wdate][/format] | [ccode] | [lookupdb=codes.db&lookinField=ccode&value=[ccode]&returnField=desc] | [whours] |
[/foundItems]
| Total hours for 06/12/1998: [search db=hours.db&equserdatarq=[username]&eqwdatedatarq=729917][math][founditems][whours]+[/founditems]0[/math][/search] |
-- Gil Poulsen, Webmaster*************************************************************** AltiM@c * Phone: (908) 222-9001 ** 111 Mali Drive * FAX: (908) 222-9002 ** North Plainfield, NJ * e-mail: help@altimac.com ** 07062-2355 * WWW: http://www.altimac.com ***************************************************************
Gil Poulsen
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Popup Calendar Code (2003)
The Form authentication trick (2000)
Formatting time output (2000)
no global [username] or [password] displayed ... (1997)
E-Mailer (WebCatb15acgiMac) (1997)
[isfile] ? (1997)
Grep and Special Characters (2002)
[WebDNA] CMS in WEBDNA (2009)
Nested vs conditional (1997)
Redirect frame targets (1998)
[WebDNA] TCPconnect and server side certificated (2011)
WebCat2b13 Command Reference Doc error (1997)
WebCat2b13MacPlugIn - [include] (1997)
America Online Issues (1998)
newbie question about zip code search (2003)
WebCatalog2 Feature Feedback (1996)
WC2b15 - [HTMLx]...[/HTMLx] problems (1997)
WebCatalog2 Feature Feedback (1996)
[WebDNA] More wish-list requests implemented (2016)
Database Advice (1996)