Jean.Stachler | 20 Apr 22:51 2007
Picon

Problem with creating document by data detail


Basically, I am trying to create a report from the detail of various
documents.

I am pulling the document detail from a specified view that is categorized.
The document has the following information:  site, county, product and
quantity.

I am needing to create documents for all of the site locations with a new
document created for each new county and product.

At this time, I am creating a new document for each site.  Within that
site,
I have the listing of all of the counties for that site.  I have the
product and quantity
calculating out correctly.

Can somebody tell me how I can I loop through the documents so that when
a new county appears within the same site, that a new document is created?

Below is a shrunk down example of my code.

Anyones comments concerning this is much appreciated.

Thanks,
Jean

<<<<<CODE>>>>>>

Brining in Month & Year
(Continue reading)

Steven_Murray | 20 Apr 23:17 2007

Re: Problem with creating document by data detail

Must be late on a Friday, 'cause I can't make any sense of this. 
Nevertheless, if I understand correctly, the pseudocode would be something 
like

lastCounty=""
For each site
        get first doc (looks like you have a separate view for each site)
        prevCounty = doc.county(0)
        while not doc is nothing
                If doc.county(0)<>lastCounty
                        write new doc
                        lastCounty=doc.county(0)
                end if
                do whatever you want
                get next document
        wend
        write last doc for site
Next site

There are other ways, but...

lnotes-l <at> ozzie.notesnic.net wrote on 04/20/2007 04:51:20 PM:

> 
> Basically, I am trying to create a report from the detail of various
> documents.
> 
> I am pulling the document detail from a specified view that is 
categorized.
> The document has the following information:  site, county, product and
(Continue reading)

Jean.Stachler | 20 Apr 23:41 2007
Picon

Re: Problem with creating document by data detail


Thanks Steven for your comments.

I should have been a bit more clear, but what this is all ending up to be
is a summation of all of the documents within a sales database for market
analysis.
And, yes it is Friday and my mind is just about fried, and trying to put
this down into words,,,,,  need I say more.

Enjoy the weekend.

Jean

                                                                           
             Steven_Murray <at> hes                                             
             c.com                                                         
             Sent by:                                                   To 
             lnotes-l <at> ozzie.no         Multiple recipients of list         
             tesnic.net                LNOTES-L                            
                                       <lnotes-l <at> ozzie.notesnic.net>       
                                                                        cc 
             04/20/2007 04:35                                              
             PM                                                    Subject 
                                       Re: Problem with creating document  
                                       by data detail                      
             Please respond to                                             
             lnotes-l <at> ozzie.no                                             
                tesnic.net                                                 

Must be late on a Friday, 'cause I can't make any sense of this.
(Continue reading)


Gmane