The default paper settings for a report are specified in the .4rp file. Override the defaults in your report program with the .NET APIs.
Each report design document includes details about the page orientation, the page size of the report, and the report margins. These values are set when a report is first created, and can be altered by the report designer. See Set the paper settings of a report for details about setting these values within the report design document (.4rp).
In the .NET report application, you can override these report page and paper settings, thanks to the order of precedence for paper settings:
PXMLConsumer layout = new PXMLLayouter(renderer); // Set the page length (height) and width ((PXMLLayouter)layout).pageLength = "6inch"; ((PXMLLayouter)layout).pageWidth = "8.5inch";
PXMLConsumer layout = new PXMLLayouter(renderer); ((PXMLLayouter)layout).topMargin = "15mm"; ((PXMLLayouter)layout).bottomMargin = "5mm"; ((PXMLLayouter)layout).leftMargin = "4mm"; ((PXMLLayouter)layout).rightMargin = "4mm";
In this example, assume the initial report is a standard A4 portrait report. To change it to an A4 landscape report, use the pageLength() and pageWidth() methods.
PXMLConsumer layout = new PXMLLayouter(renderer); // Change page orientation ((PXMLLayouter)layout).pageLength = "a4width"; // length is now width ((PXMLLayouter)layout).pageWidth = "a4length"; // width is now length