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 a running subtotal into a [foundItems] context that breaks at each date change and totals the hours for each date. The search at the bottom is hard-coded to return results for 6/12 just as a test. Anyway, since this output will encompass two weeks, perhaps three, of data, I cannot come up with a way to handle a running subtotal short of doing 14 separate [search] and [founditems] contexts, one for each date, and then 14 more for the running subtotals. Any insights would be much appreciated. (Note that 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] [format days_to_date %a][wdate][/format]., [format days_to_date][wdate][/format][ccode] [lookup db=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:

    
  1. Re: Running subtotal? (Dave MacLeay 1998)
  2. Re: Running subtotal? (PCS Technical Support 1998)
  3. Running subtotal? (Gil Poulsen 1998)
  4. Running subtotal? (Gil Poulsen 1998)
Here's one that's way beyond my mortal abilities. I am trying to insert a running subtotal into a [founditems] context that breaks at each date change and totals the hours for each date. The search at the bottom is hard-coded to return results for 6/12 just as a test. Anyway, since this output will encompass two weeks, perhaps three, of data, I cannot come up with a way to handle a running subtotal short of doing 14 separate [search] and [founditems] contexts, one for each date, and then 14 more for the running subtotals. Any insights would be much appreciated. (Note that 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] [format days_to_date %a][wdate][/format]., [format days_to_date][wdate][/format][ccode] [lookup db=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:

Sendmail problem on UNIX (2000) Emailer Error 472? (2004) X Server (1999) WebCat2b15MacPlugin - showing [math] (1997) [WebDNA] Encode cookies ONLY via "method=Base64" (2008) File perms (2002) Online reference (1997) Digest Version (2000) Using [redirect] in the middle of a page? (1999) Trouble with Netscape (1998) WebCat2 - Getting to the browser's username/password data (1997) creative use of webcatalog (1998) [Sum] function? (1997) A multi-processor savvy WebCatalog? (1997) Don't tick me off :) [elaspedtime] (1997) different ship dates and shopping carts -- how to? (1997) Email within tmpl ? (1997) RE: Multiple Stores and WebCatalog Prefs (1997) Almost a there but..bye bye NetCloak (1997) webDNA and ASP pages (1997)