}
}
public void doPrint() throws JRException, ColumnBuilderException, ClassNotFoundException, IOException {
final FastReportBuilder drb = new FastReportBuilder();
DynamicReport dr;
/**
* Set the styles. In a report created with DynamicReportBuilder we do
* this in an other way.
*/
// Rows content
Style columnStyleNumbers = new Style();
columnStyleNumbers.setFont(Font.VERDANA_SMALL);
columnStyleNumbers.setHorizontalAlign(HorizontalAlign.RIGHT);
// Header for number row content
Style columnStyleNumbersBold = new Style();
columnStyleNumbersBold.setFont(Font.VERDANA_MEDIUM_BOLD);
columnStyleNumbersBold.setHorizontalAlign(HorizontalAlign.RIGHT);
columnStyleNumbersBold.setBorderBottom(Border.PEN_1_POINT);
// Rows content
Style columnStyleText = new Style();
columnStyleText.setFont(Font.VERDANA_SMALL);
columnStyleText.setHorizontalAlign(HorizontalAlign.LEFT);
// Header for String row content
Style columnStyleTextBold = new Style();
columnStyleTextBold.setFont(Font.VERDANA_MEDIUM_BOLD);
columnStyleTextBold.setHorizontalAlign(HorizontalAlign.LEFT);
columnStyleTextBold.setBorderBottom(Border.PEN_1_POINT);
// Subtitle
Style subtitleStyle = new Style();
subtitleStyle.setHorizontalAlign(HorizontalAlign.LEFT);
subtitleStyle.setFont(Font.VERDANA_MEDIUM_BOLD);
// Localized column headers
String filNr = Labels.getLabel("common.Office.ID");
String filBezeichnung = Labels.getLabel("common.Description.Short");
String filName1 = Labels.getLabel("common.Name1");
String filName2 = Labels.getLabel("common.Name2");
String filOrt = Labels.getLabel("common.City");
drb.addColumn(filNr, "filNr", String.class.getName(), 20, columnStyleText, columnStyleTextBold);
drb.addColumn(filBezeichnung, "filBezeichnung", String.class.getName(), 50, columnStyleText, columnStyleTextBold);
drb.addColumn(filName1, "filName1", String.class.getName(), 50, columnStyleText, columnStyleTextBold);
drb.addColumn(filName2, "filName2", String.class.getName(), 50, columnStyleText, columnStyleTextBold);
drb.addColumn(filOrt, "filOrt", String.class.getName(), 50, columnStyleText, columnStyleTextBold);
// Sets the Report Columns, header, Title, Groups, Etc Formats
// DynamicJasper documentation
drb.setTitle(this.zksample2title);
drb.setSubtitle("List of Offices: " + ZksampleDateFormat.getDateTimeFormater().format(new Date()));
drb.setSubtitleStyle(subtitleStyle);
drb.setPrintBackgroundOnOddRows(true);
drb.setUseFullPageWidth(true);
dr = drb.build();
// Get information from database
OfficeService as = (OfficeService) SpringUtil.getBean("officeService");
List<Office> resultList = as.getAllOffices();