1 Reply Latest reply on May 20, 2010 1:11 PM by philmodjunk

    Batch Printing

    nolak37

      Title

      Batch Printing

      Post

      Hello,

       

      I need a way to batch print files that can be printed by one of 2 layouts.

       

      I Found a way to batch print records by adding 2 fields to the table named "printed" and "printDate".

      opon creation of ne record the printed field is set to "no" and so when the user clicks the print batch button a script runs a search for all files where:     charges::Printed = no    then prints and adds current date to date printed and changes the "printed" field to yes.

       

      This works fine except that there are some records that need to be printed in layout1 and some that need to be printed in layout 2.

       

      Yesterday Phil helped out by providing this script whitch works perfectly when I try printing a single file but when I modified the print batch script to perform this script instead of "print" this does not work,

       

      If [ Count( ChargesTable::nonblankfield) > 6 ]

        Go to layout [2 page layout]

      Else

        Go to layout [1 page layout]

      ENd if

      Print [Restore] //specify current record if you have more than one record in your found set.

       

      Any Ideas?

        • 1. Re: Batch Printing
          philmodjunk

          Just put your script inside a loop

           

          Go To Record [First]

          Loop

            If [ Count( ChargesTable::nonblankfield) > 6 ]

              Go to layout [2 page layout]

            Else

              Go to layout [1 page layout]

            ENd if

            Print [Restore]//Still use the current record option

            Go To Record [ Next ; Exit after Last ]

          End Loop

           

          Note that this will load your print spooler with a separate print job for each record.