//Show this form in print preview
controller.showPrintPreview();
//to print current record only
//controller.showPrintPreview(true);
It would be useful to mention in the code sample that you have to create an “onClose” method for the form to close the print preview.
I can see from the forum I’m not the only one who has wondered why the “close” button does not ‘work’.