Open Printing
Terence Heaford
t.heaford at btinternet.com
Mon Nov 17 09:13:01 EST 2014
Think I’ve resolved it.
Should have a Print Break in the repeat loop.
All the best
Terry
> On 17 Nov 2014, at 13:47, Terence Heaford <t.heaford at btinternet.com> wrote:
>
> 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
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list