how do I use application.isLastPrintPreviewPrinted()

Hai,

Anybody any idea how to use this? I have tested but can’t get it to work the way it should.

The sample doesn’t help me enough to get it going…

Thanks in advance…

Thanks to the help of Jan Blok I got this thing going!

Before doing a printPreview, either from a method or from the onPrintPreview event we have to set a globals.showPrintPreview = 1.

After that we define a method at the onShow event of the form we come from before printing and that is shown after printing.
This method has the code that evaluates the printing (see sample code, use this to see if it works).

And voila, it works…

So to clarify…

if (globals.showPrintPreview == 1)
{
globals.showPrintPreview = 0;//clear for next time
if (application.isLastPrintPreviewPrinted())
{
Marked_Shipped();
}
}

… goes on the onShow of a form your a printing from. The Marked_shipped(); method is the method you want to execute after you print prieview on a separate method that is trippgered when…

globals.showPrintPreview = 1

is set, typically, on the method you are printing or previewing from.

.. goes on the onShow of a form your a printing from.

It goes on the onShow of the form you INITIATE you printing from and, as a result, you return to when you stop printing. Don’t know what happens though when you print from the same form. You should check that with an ```
application.output(“am i printing”)