Search in sources :

Example 1 with FastReportBuilder

use of ar.com.fdvs.dj.domain.builders.FastReportBuilder 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;
}
Also used : FastReportBuilder(ar.com.fdvs.dj.domain.builders.FastReportBuilder) ElementColumnBuilder(org.asqatasun.webapp.report.layout.column.builder.ElementColumnBuilder) DynamicReportBuilder(ar.com.fdvs.dj.domain.builders.DynamicReportBuilder) Map(java.util.Map) HashMap(java.util.HashMap)

Aggregations

DynamicReportBuilder (ar.com.fdvs.dj.domain.builders.DynamicReportBuilder)1 FastReportBuilder (ar.com.fdvs.dj.domain.builders.FastReportBuilder)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 ElementColumnBuilder (org.asqatasun.webapp.report.layout.column.builder.ElementColumnBuilder)1