I am trying to use Open Printing to print multiple pages of a DataGrid. Here is 
my script, however I only seem to get 1 page, the initial page of the DataGrid.

tNumOfPages actually calculates to 110 pages but when I select Open PDF in 
Preview I only get 1 page, the first.

Am I doing something wrong or is this a bug?

Thanks

Terry

on mouseUp
   lock screen
   put the dgNumberOfRecords of group "tranTable" into tNumOfRecs
   
   put tNumOfRecs/20 into tNumOfPages
   put 1 into tLine
   
   answer page setup as sheet
   if the result = "cancel" then
      exit mouseUp
   end if
   
   put the topLeft of grp "tranTable" into tTopLeft
   put the bottomRight of grp "tranTable" into tBottomRight
   
   open printing with dialog as sheet
   
   repeat with tPage = 1 to tNumOfPages
      if tPage = 1 then
         put 1 into tLine
      else
         put tPage * 20 into tLine
      end if
      
      dispatch "ScrollLineIntoView" to group "tranTable" with tLine
      print card from tTopLeft to tBottomRight into the printPaperRectangle
      
   end repeat
   
   close printing
   
   unlock screen
end mouseUp
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to