Been busy writing reports lately, but I thought that I would try to publish a few quick tips that I have turned up.
One of the issues I have faced is that when a report is being formatted for PDF layout, I want it to be constrained to the page dimensions and to have it in portrait style. At the same time, when it is displayed for HTML, I want to have it in Landscape mode since the rendering seems to be better for HTML.
This little section of script placed in the beforeFactory method of the ReportItem will do that for you.
var renderO = reportContext.getRenderOption().getOutputFormat();
// change layout
if (renderO == "pdf"){
reportContext.getDesignHandle().getMasterPages().get(0).setProperty("orientation","portrait");
} else if (renderO == "html")
reportContext.getDesignHandle().getMasterPages().get(0).setProperty("orientation","landscape");