[math show=f]RunningSubtotal=0[/math] [/ShowIf] [/HideIf] This hour: [whours]
[math show=f]LastDate=[date][/math] [math show=f]RunningSubtotal=RunningSubtotal+[whours][/math] [/FoundItems] Total for date: [math] RunningSubtotal[/math]
[/Search]This (untested) snip is based on some code that I have used to insert blanklines between months in a listing of events. You'll need to tweak somestuff (like the date comparisions, depending on your date format), but itshould do what you need. I'm not sure if there are any advantages to thisover Grant's two-search method, but there's always more than one way toskin a cat.-DaveAt 8:50 PM 6/19/98, PCS Technical Support wrote:>>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.>>To get the date break, you would do a summary sort by date so that only>unique dates are shown, then do a nested search inside that for each date>the outer search finds.>>(untested)>[search db=hours.db&equserdata=[username]&wdatesumm=T&aswdatesort=1]> [FoundItems]> Date: [wdate]> [Search db=hours.db&equserdatarq=[username]&eqwdatedatarq=[wdate]] <-->this wdate comes from the outer search -->> [math show=f]runningtotal=0[/math]> [founditems][math>show=f]runningtotal=runningtotal+[whours][/math][/founditems]> [math]runningtotal[/math]
> [/Search]> [/FoundItems]>[/search]>>Technical Support | ==== eCommerce and Beyond ====>Pacific Coast Software | WebCatalog, WebMerchant,>11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,>San Diego, CA 92128 | Typhoon>619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/o--------------- Dave MacLeay --+o----------- Digital Frontier --+o--- dave@digitalfrontier.com --+
Associated Messages, from the most recent to the oldest:
|
[math show=f]RunningSubtotal=0[/math] [/ShowIf] [/HideIf] This hour: [whours]
[math show=f]LastDate=[date][/math] [math show=f]RunningSubtotal=RunningSubtotal+[whours][/math] [/FoundItems] Total for date: [math] RunningSubtotal[/math]
[/Search]This (untested) snip is based on some code that I have used to insert blanklines between months in a listing of events. You'll need to tweak somestuff (like the date comparisions, depending on your date format), but itshould do what you need. I'm not sure if there are any advantages to thisover Grant's two-search method, but there's always more than one way toskin a cat.-DaveAt 8:50 PM 6/19/98, PCS Technical Support wrote:>>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.>>To get the date break, you would do a summary sort by date so that only>unique dates are shown, then do a nested search inside that for each date>the outer search finds.>>(untested)>[search db=hours.db&equserdata=[username]&wdatesumm=T&aswdatesort=1]> [founditems]> Date: [wdate]> [Search db=hours.db&equserdatarq=[username]&eqwdatedatarq=[wdate]] <-->this wdate comes from the outer search -->> [math show=f]runningtotal=0[/math]> [founditems][math>show=f]runningtotal=runningtotal+[whours][/math][/founditems]> [math]runningtotal[/math] DOWNLOAD WEBDNA NOW!
> [/Search]> [/FoundItems]>[/search]>>Technical Support | ==== eCommerce and Beyond ====>Pacific Coast Software | WebCatalog, WebMerchant,>11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,>San Diego, CA 92128 | Typhoon>619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/o--------------- Dave MacLeay --+o----------- Digital Frontier --+o--- dave@digitalfrontier.com --+
Dave MacLeay
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...