13 Replies Latest reply on Apr 16, 2009 8:32 AM by mikelski

    Problem with report grouping

    mikelski

      Title

      Problem with report grouping

      Post

      I can't find anything on this in the forum, so I'm probably doing something wrong.  I've created a simple report based on one table with two group headings.  The first is Status (either Open or Closed).  The second is an ID (that can have duplicate entries as it's a foreign key field).  When first created, the report works perfectly, displaying the data as intended.  When I revisit it later, it just displays the flat records, i.e. no grouping, regardless of the display mode.  I even recreated the report, and exactly the same thing happened again; first run - perfect, subsequent runs - no grouping.  Any light shed on this will be most welcome.  Thanks.

        • 1. Re: Problem with report grouping
          comment_1
             It looks like your records have become unsorted (or sorted in different order), while you were away.
          • 2. Re: Problem with report grouping
            mikelski
               The formatting miraculously reappeared when I reverted to the original sort order!  I'm used to reports that work as intended regardless of sort order.  I'll just have to get used to a different way of working.  Many thanks for the advice. 
            • 3. Re: Problem with report grouping
              philmodjunk
                

              Mike Scott wrote:
              I'm used to reports that work as intended regardless of sort order.  I'll just have to get used to a different way of working. 

              In this case, no database can give you the report you want without sorting the records in a specific order, since the sorting is needed to group your records under their respective group headings (sub-summary parts). If you are using FMP 10, you may want to set up a script trigger that automatically sorts the records into correct order whenever a user switches to this layout.

               


              • 4. Re: Problem with report grouping
                mikelski
                   Yes I know what you mean about sorting on reports.  It's the disappearing group headings that I don't understand.  I would have thought they'd remain as-is irrespective of the underlying sort order, but obviously not.  We're still on FP9 here, so I've had to get around this another way, but thanks again for the heads up and quick response.
                • 5. Re: Problem with report grouping
                  comment_1
                    

                  Mike Scott wrote:
                  It's the disappearing group headings that I don't understand.

                  Do you mean sub-summary parts? They only appear when records are sorted by the same breakfield as defined for the part. That's actually a useful feature, because you can use the same layout for several report types just by changing the sort order.


                  • 6. Re: Problem with report grouping
                    philmodjunk
                      

                    How can you have the group headings without the sort to group them? I work with other DB systems in addition to filemaker. You wouldn't get any better results from them in this situation either. In fact, showing the headings without a matching sort could be very misleading to the user.

                     

                    Imagine: you have a list of sales persons grouped by state or province where they work. If you don't sort the records by the state field, what view of the data should appear that includes the headings that won't appear to put sales persons in the wrong state?

                     

                    At least with FMP 10, you can see the sub-summary headings in Browse mode when the found set is correctly sorted. In earlier versions you have to preview or print to see them. :smileywink:

                    • 7. Re: Problem with report grouping
                      mikelski
                         I presumed (incorrectly it now appears) that the very act of using Filemaker's version of a wizard to create a grouped report would retain the group sorting when created by default.  Still at least I now know how to deal with it!
                      • 8. Re: Problem with report grouping
                        philmodjunk
                           You could make that a feature request, I suppose. It's a good point and with the latest version of filemaker, it would seem to be fairly easy to implement as an option during the initial creation of the layout...
                        • 9. Re: Problem with report grouping
                          mikelski
                             Thanks - as a new contributor, I'm well impressed with the speed of response on this forum.  I'm definitley puzzled by some of Filemaker's oddities such as scripts that work one minute and don't the next.  I'll be posting details of same in the hope of an equally quick resolution tomorrow!
                          • 10. Re: Problem with report grouping
                            philmodjunk
                              

                            Mike Scott wrote:
                            I'm definitley puzzled by some of Filemaker's oddities such as scripts that work one minute and don't the next. 

                             

                            The latest versions of Filemaker are very "layout sensitive". Your scripts may be failing to work as expected, if the same layout is not current each time you run your script. Other script steps such as Go To Related record can fail to work as expected unless conditions are exactly right or you specifically trap for those condition.
                            • 11. Re: Problem with report grouping
                              mikelski
                                 The script in question is run from a menu.  It switches to a layout and carries out a pre-defined search.  If no records are found it's supposed to return the user to the menu and display an advisory message.  I used the Filemaker help suggestion of switching on error capture and using a global to trap the error.  This worked perfectly for a while, and if no records were found, it appeared to the user that they'd never left the menu.  The script hasn't been changed at all.  I've even tried taking out the error capture which results in the standard "no records found - continue?" Filemaker default message.  The global is set to 0 at the beginning of the script and debugging shows it remains at 0 throughout.
                              • 12. Re: Problem with report grouping
                                philmodjunk
                                  

                                I suggest starting a new thread as this is a new problem and put in a detailed list of the script, tables, layouts and relationships involved.

                                • 13. Re: Problem with report grouping
                                  mikelski
                                     Will do