2 Replies Latest reply on Feb 17, 2015 4:23 PM by ChrisJohnston

    Set up Script to Print 1st record only and combine the chart into another report to make 1 PDF

    artworking

      Title

      Set up Script to Print 1st record only and combine the chart into another report to make 1 PDF

      Post

      have one report which lists all the artwork and I can print each page or save it to a PDF. I have another report/table with a chart, but there are 5 records of the same piece/ How could one set it up to print only 1 of the records (the one with the chart) including the header and footer, not all 5 records? Would it be possible to add to that another report as page 3 for example in effect combining the two of them?

      Thanks

       

        • 1. Re: Set up Script to Print 1st record only and combine the chart into another report to make 1 PDF
          ChrisJohnston

          Yes, totally doable. Your found set will do just that. Setup your report with a header and footer via Layouts -> Part Setup. If you make a page and it totals 8.5 x 11 you header and footer have to be within that dimension. If you then have only a found set of 1 ( in your case the calendar record) That is exactly what you will get.  If you had a field like DATA::pageName and the five name were:

          Standard page 1, Standard page 2, Charting Page, Standard page 3, Special page

          You can construct a script something like so.

           

          
          Go to Layout [ "DATA" (DATA) ]
          Enter Find Mode [ ]
          Set Field [ DATA::pageName ; "Charting page" ]
          New Record/Request
          Set Field [ DATA::pageName ; "Special page" ]
          Perform Find [ ]
          Print Setup [ ]
          Print [ Records being browsed ; All Pages ; Orientation: Portrait ; Paper size: 8.5" x 11" ]
          [ Restore: Your Printer Name ]
          
          • 2. Re: Set up Script to Print 1st record only and combine the chart into another report to make 1 PDF
            ChrisJohnston

            Would it be possible to add to that another report as page 3 for example in effect combining the two of them?

            Yes, I think a good way to do that is because you are dealing only 5 records in each report is to break your found set up in to 2 parts. Print a found set of page 1 and 2, and than create a found set for the charting page you want, print that and finally make a found set for the last part and print that. If all your data resides in the same table it can be done even simpler, by making one found set that grabs all the records you want. Use the same type of script to construct a found set of just what you need. If in different tables you will need the breaking apart I referred to earlier. Coming from multiple tables you script will have have to navigate to the table and create a separate found set to get the page 3 you need. You will essential be creating a customized print job via a script.