Can anybody please explain how I get the showPrintPreview to display and print in landscape ?
I’ve tried the following but when I add the setPageFormat I always get a blank page, if I remove the setPageFormat it displays with data as I’d expect but its as portrait.
The code below will set the page to an A4-sized page, landscape with a 10mm margin
the preview command sets the ‘printCurrentRecordOnly’ property to true and the ‘zoomFactor’ property to 75%.
Please be aware this is nothing more or less than the sample code that’s inside Servoy.
So rightclick on a function choose ‘moveSample’ and in most cases you’ll find a documented example of how this function is to be used.
I see the problem now, with portrait it starts off displaying data on page 1 yet with the landscape it has displayed the data on page 2.
The extra page throw was caused by the width not being large enough. Strange that it does not display any data on page 1 though yet displayed all data correc tly on page 2 ?