Dynamic Jasper ignore page setting if also loading using template
Brought to you by:
djmamana,
martingoros
Dynamic Jasper ignore page setting if also loading using template
In example below my template's page size is letter format
I am adding columns and then changing page width based on number of column added
but when I get output it is defaulting to page size in template.
DynamicReportBuilder dj = new DynamicReportBuilder();
dj.setReportName(reportName)
.setPrintColumnNames(true)
.setIgnorePagination(true)
.setMargins(5, 5, 5, 5)
.setTemplateFile(includeDir + "GWUTemplateDJ.jrxml");
Page page = new Page(3000, 3000, true);
// log("Changing Width to " + pwidth + " from " + page.getWidth());
// if (pwidth > page.getWidth()){
// page.setWidth(pwidth);
// }
// page.setHeight(130);
dj.setPageSizeAndOrientation(page);
This is not a but, and such behaviour will not change. If you use a template, there are known limitations (as per documentation: http://dynamicjasper.com/2010/10/06/how-to-use-custom-jrxml-templates/) and things you cannot change