4 Replies Latest reply on Mar 15, 2010 3:09 PM by MonicaS.

    Showing portal records on a labels report

    MonicaS.

      Title

      Showing portal records on a labels report

      Post

      Hi,

       

      I've got a simple form called Projects. It includes a portal of related images (jpgs) from the Images table. It's a simple one-to-many relationship (many images per project)

       

      From this Projects form, I want to create a report where you can see all the images of the project displayed in a grid (so that it looks like a contact sheet). I'm assuming the label setup is the way to go for this. Right now, I have a script that opens a labels report in a new window, but it displays ALL images in the database, instead of only those related to the project specified in the project name field (the ones that show up in the portal). Any ideas?

       

      I'm using FM 10.

       

      Thank you, Monica

        • 1. Re: Showing portal records on a labels report
          philmodjunk

          You can use Go To Related Records for this. Or you can capture your project ID number in a variable and use it to perform a find on your labels layout.

           

          This is a pretty safe use of Go To Related Records, but there are issues to look out for if you haven't used this script step before.

           

          Go To Related Records is a very useful tool, but which is very poorly documented. To learn more about GTRR, click the following link:

          The Complete Go To Related Record

          • 2. Re: Showing portal records on a labels report
            MonicaS.

            Thanks. I read the GTRR article and I feel that I understand it; however, I need a hint about where to run the GTRR script (I'm still a novice at all this).

             

            I have a button on the Projects form. Right now, I have it set up so that that button runs a script like this:

             

            New Window

            Go To Layout ["Project Report" (Images)]

            Enter Preview Mode

             

            Then, Project Report (the one that's set up as a labels report) opens up and shows ALL the images in the database.

             

            Where should I put the GTRR command line? Somewhere in this button script? Or, somewhere in the script triggers of the Project Report itself? Or somewhere else entirely?

             

            Thanks, Monica

            • 3. Re: Showing portal records on a labels report
              philmodjunk

              Change:

               

              New Window

              Go To Layout ["Project Report" (Images)]

              Enter Preview Mode

               

              To:

              GTRR (specify the new window option in the GTRR line)

              Enter Preview Mode

               

              Note: you could streamline the script like this:

               

              Allow User Abort [Off]

              Enter Peview Mode[Pause]

              Close Window [Current WIndow]

               

              This keeps the window to the front, but pressing the numeric keypad's enter key or clicking continue in the status area closes the new window and returns you to the original layout.