Using an alternative form when going to print preview

I’ve tried, and failed, to give the end user a button which will take them into print preview on an alternative form than the one with the button.

Why would I want to do this? Because the form containing the button is a mutli-purpose form. The fields to be printed are positioned for display purposes, not top left for printing. The form is also displayed as a Form In Dialogue, which may be complicating matters.

I’d greatly like the option to invisibly switch forms when going into print preview.

Lacking an obvious way to do this, I’m currently taking the user to a second FID suitable for printing and asking them to press another button to actually go into print preview. I’ve tried and failed to combined all this into a single routine.

Not a big deal, but an option to switch layouts would be nice.

Thanks.

By the way, all seems to be moving along here quite swiftly and smoothly. Thanks for that as well.

Hi Morley,

I use other forms for printing all the time without actually switching to that form with the following print (oneliner) method:

forms.myPrintForm.controller.showPrintPreview(true);

When closing the preview you end up in the form you started from.

Hope this helps.

ROCLASI:
I use other forms for printing all the time without actually switching to that form with the following print (oneliner) method:

forms.myPrintForm.controller.showPrintPreview(true);

When closing the preview you end up in the form you started from.

Oh so obvious. Thanks Robert. Works like a charm.