Printing multiple pages

Joe Lewis Wilkins pepetoo at cox.net
Thu Jan 15 22:36:12 EST 2009


Hi Sarah,

I suspect that the value of "x" gets stuck at tPageCount after you've
printed the first time; so I'd add the statement *put 1 into x* just  
prior
to the repeat with line, making sure that x is always initialized to  
1. I
know this sounds kind of stupid, but???

I hope that works.

Joe Wilkins

On Jan 15, 2009, at 7:15 PM, Sarah Reichelt wrote:

> Hi All,
>
> I have a script that splits a report into multiple pages and tries to
> print them one by one. I have a single field that displays the data,
> then I have tried various ways to get the pages to print. I want to
> queue all the pages and have them all print at once.
>
> My basic script is:
>
>    repeat with x = 1 to tPageCount
>        displayPage x
>        print this card
>        --   revPrintField the long name of fld "Report"
>        --  revPrintText the htmltext of fld "Report", , ,the long
> name of fld "Report"
>    end repeat
>
> As you can see, I have tried using revPrintField and revPrintText but
> had to settle on "print this card".
> revPrintField and revPrintText both worked the first time, but after
> that, they only printed the last page.
> "print this card" seems to work every time, but I have to resize the
> stack while printing, and it seems slower.
>
> The displayPage script works perfectly as I put in a "wait" for
> testing and I could see that each page was being displayed.
>
> The only clue I have is that the print progress dialog seems to be
> miscounting. It's sequence for a 3 page report is:
>  Processing page:
>  Processing page: 1
>  Processing page: 2
>
> or if only the last page is going to print:
>  Processing page:
>  Processing page: 1
>  Processing page: 1
>
> Neither of these are completely correct, but they are different.
>
> So does anyone have an explanation for why revPrintField and
> revPrintText would only print the last page?
> Or any suggestions or work-arounds or alternatives that do not use
> "print this card"?
>
> TIA,
> Sarah
>
> Rev 3.5.0-dp-1 & Rev 3.0.0, Mac OS X 10.5.6

--
Please avoid sending me Word or PowerPoint attachments.
See   <http://www.gnu.org/philosophy/no-word-attachments.html>
----------------------------------------
Joe Lewis Wilkins
pepetoo at cox.net








More information about the Use-livecode mailing list