use of org.asqatasun.webapp.report.layout.column.builder.ElementColumnBuilder in project Asqatasun by Asqatasun.
the class LayoutBuilderImpl method getDynamicReportBuilder.
@Override
public DynamicReportBuilder getDynamicReportBuilder(AuditStatistics auditStatistics, Locale locale, String format) {
DynamicReportBuilder report = new FastReportBuilder();
report.setTitle(titleBuilder.getTitle(auditStatistics, locale));
report.setTitleStyle(titleStyle);
report.setSubtitle(subtitleBuilder.getTitle(auditStatistics, locale));
report.setSubtitleStyle(subtitleStyle);
for (Map.Entry<String, String> entry : fieldMap.entrySet()) {
report.addField(entry.getKey(), entry.getValue());
}
for (ElementColumnBuilder ecb : columnBuilderList) {
report.addColumn(ecb.getElementColumn(locale));
}
if (formatSpecificColumnBuilderList.containsKey(format)) {
for (ElementColumnBuilder ecb : formatSpecificColumnBuilderList.get(format)) {
report.addColumn(ecb.getElementColumn(locale));
}
}
report.setPrintColumnNames(printColumnNames);
report.setIgnorePagination(ignorePagination);
report.setUseFullPageWidth(useFullPageWidth);
report.setMargins(topMargin, bottomMargin, leftMargin, rightMargin);
if (pageOrientation != null) {
report.setPageSizeAndOrientation(pageOrientation);
report.setPageSizeAndOrientation(Page.Page_A4_Landscape());
}
return report;
}
Aggregations