3 Replies Latest reply on Jun 15, 2010 3:09 PM by philmodjunk

    Sub Summary report with portal

    firth5

      Title

      Sub Summary report with portal

      Post

      I am managing a database that tracks scenes as they go through the production process.  (SCENE table)

       

      I recently added a VERSIONS table that tracks the different versions that a scene undergoes, via a portal.  The portal displays the highest version number at the top of the list (descending order.)

       

      I have several report pages that use the SCENE table, and have a portal VERSION, showing only the top portal row (thus displaying only the most current version.)

       

      All of this works great.  However when I sub-summary by one of the fields within the portal, it uses the info in the last portal record (the first version recorded for that scene.)

       

      What should I do?  

      Is there some sort function on the sub-summary field I"m missing?

      Do I redo this report page using the VERSION table as the main fields?  how would I then filter out the previous versions that I don't want to see?

       

      Thanks in advance,

      e

        • 1. Re: Sub Summary report with portal
          philmodjunk

          Please describe this in more detail unless I've guessed correctly here:

           

          "However when I sub-summary by one of the fields within the portal, it uses the info in the last portal record (the first version recorded for that scene.)"

          I guessing that you have placed either a field from the portals table directly in the sub-summary part or you have a calculation field that refers to this field in its calculation.

           

          If either of these two possiblities are the case here, then the problem is that a sort order specified on the portal has nothing to do with which out of many related records will be referenced. That is determined by which record is first in the relationship. You can specify a sort order in the relationship (Manage | Database | relationships, double click the relationship line) or in a calculation, you can use the Last () function to get the most recently created related record. (The most recently created related record will be the last record as long as no sort order is specified for the relationship.)

          • 2. Re: Sub Summary report with portal
            firth5

            Genius!  Thanks Phil!  Yes, I did place a field from the portals table directly in the sub-summary part.  I will adjust per your suggestions below.

             

            Cheers!

            • 3. Re: Sub Summary report with portal
              philmodjunk

              You could also use a sorted, one row portal for this field.