4 Replies Latest reply on May 9, 2015 12:13 PM by rtolliver

    Printing a report for each record in a portal

    rtolliver

      Title

      Printing a report for each record in a portal

      Post

      I have a layout with a related portal, I've created a go to related records button on the portal to print a report for that record's information.  I'm having some problems with creating a second button on the main layout to print a  report for all records in the portal.

      I need suggestions or recommendations.

      Thanks

        • 1. Re: Printing a report for each record in a portal
          philmodjunk

          And what problems are you having?

          Printing with the "records being browsed" option could print some types of reports all at once with each record's report starting a new page.

          And scripts can loop through a found set when such is needed in order to print one at a time as well.

          • 2. Re: Printing a report for each record in a portal
            rtolliver

            One of the problems is "the found set", if the portal has 3 records in it when I click the print all button, every record in the database tries to print.  I'm using a script for the button that has go to related record based on table occurrence relationships and the Print command to allow the print dialog. Do I also need to add a loop command?

            • 3. Re: Printing a report for each record in a portal
              philmodjunk

              if the portal has 3 records in it when I click the print all button, every record in the database tries to print.

              That would indicate that at the time your Print script step executes, you have a found set that consists of all records in the current layout's underlying table with "records being browsed" specified.

              Unless you are changing layouts to a layout based on the portal's table, the number of records in a portal has nothing to do with a "found set"--which is what  print with "records being browsed" will use to create that report..

              Go To Related Records, with the correct options specified, could be used to pull up a found set of just the records in an unfiltered portal Then Print, with the "records being browsed" option, would print a report based on just the records original showing in the portal.

              If that is not enough info to get this working, I suggest backing up and describing the report that you want to print and the records/tables/relationships that hold the data from which you want to create this report.

              • 4. Re: Printing a report for each record in a portal
                rtolliver

                Changing the options corrected the problem with print all. Thanks!

                I now have a problem with the line item print button. After correcting the print all problem I went back to verify the single record print on the portal and found that it does open the correct layout with the first records information.  In my test solution I have 3 records in the portal, when I click the button (Button Setup: Go to Related Record) for any of the other records the first records' information remains in the layout.