Change page orientation for printing
I have a number of reports that I need to print, each report is made up of several layouts containing data from different tables. I have developed a single script that will print each layout then move on to the next layout to print without requiring user intervention, the full report is then printed as a single compiled report. This is done by using a separate table where I name the report sections and specify the layout to use, the script then loops through and prints each section using the nominated layout. This enables users to add or remove sections of the complete report. However some of the sections require landscape while some are use portrait, I would like the script to change the print setup without user intervention as this would require them to know which sections use landscape etc. I would like to be able to change the page orientation based on the value of a field or variable to achieve this. Can some one please advise if this can done as the print setup script step only offers pre determined options which can't be changed without user intervention.
I have two utility scripts in every file. Set Portrait and Set Landscape. These use the Print Setup Script to set the orientation.
When I have a landscape job, I end the print job with a Set Portrait. So it remains the default.