4 Replies Latest reply on Sep 17, 2012 2:11 PM by BobO'Neal

    Collecting data from Found Sets

    BobO'Neal

      Title

      Collecting data from Found Sets

      Post

           I am doing multiple Finds from a table of names & printing each of these individual Finds with the selected Data fields.

           I have a Script for each of the categories I want to print, and I can combine the individual Scripts to print multiple pages for each category. I print to a Table Layout.

           Here's what I can't figure out. I want to print some calculation results based on the Finds on each page. 

           In each sub-Script I Find & list names with a field showing attendance (P or A).

           For each category, I want to calculate & print the count of found names and the count of attendance & absences.

            I am trying to figure out how to "Get" these counts & put them in a Field. I am thinking I could then print these calculation results in the  Footer of the table layout.

           Any help & suggestions appreciated.

        • 1. Re: Collecting data from Found Sets
          philmodjunk

               Footer or maybe a trailing grand summary.

               A count of the total records in your found set is simple. You can use an unstored calculation field with get ( FoundCount ) to report the number of found records.

               The number of records that fall in a particular category will be easy to report in a list view layout if you can group the records into those categories by sorting them. In your example, if you are ok with sorting the records by the value in the attendance field so that all the records with "A" appear in one group and all the records with "P" appear in another, Then you can add a sub summary layout part "when sorted by" the attendance field and you can place a summary field defined as the "count of" some nevery empty field such as the attendance field and you'd get a count for both groups. The same field, by the way, placed in a grand summary, header or footer layout part will report the total of all records in your found set so it would serve in place of the calculation field that I mentioned earlier.

               But if you don't want the records in groups with a total placed with each group, then you have to put in a bit more work.

               Define two calculation fields: cPresent, cAbsent with these expressions for their calculations:

               Attendance = "P"

               Attendance = "A"

               Thend define two summary fields as the Total of cPresent and cAbsent respectively. Put these summary fields in the footer or a trailing grand summary to show the total absent and total present for your found set of records.

          • 2. Re: Collecting data from Found Sets
            BobO'Neal

                 I am still working this layout without any luck. I am trying a simple example, afew names in PHASE 1 & a few names in PHASE 2. In each phase the attendance is in one field as an "A" or "P". I want to print the layout with the the PHASE 1 names listed together, then the PHASE 2 names in a following group. (with a little space between the 2 PHASES). 

                 I have tried many layouts, List, Report, Table, but must be missing something. I did the Report layout and got the two groups of Phase names listed like I wanted, but when I go back to the table & run the script to go to this layout for printing, the layout has changed to just one grouping of the 2 phases.

                 Which layout type should I consentrate on, & why does the layout change after I have set it up?

                 Maybe there is a brute force method I can script that sorts & separates the PHASES before I go to the output layout?

            • 3. Re: Collecting data from Found Sets
              philmodjunk
                   

                        I did the Report layout and got the two groups of Phase names listed like I wanted, but when I go back to the table & run the script to go to this layout for printing, the layout has changed to just one grouping of the 2 phases.

                   This sounds like you are very close to getting what you need.

                   Are "PHASE 1" and "PHASE 2" different values in the same field such that phase 1 records have "phase 1" in this field and phase 2 records have "phase 2" in it?

                   Did you use a sub summary layout part to get your two groups of records?

                   If so, then make sure that your script sorts the records into the correct order before printing them. The sort order must include the same field as is specified as the "sorted by" field in the part setup for your sub summary layout part.

              • 4. Re: Collecting data from Found Sets
                BobO'Neal

                     Thanks Phil. I have the layouts working good now. I solved some of my formating by reworking the scripts the organized & sorted the records.