Package de.forsthaus.webui.reports.template

Examples of de.forsthaus.webui.reports.template.DJReportStyles


    String rigType = Labels.getLabel("listheader_SecRightList_rigType.label");

    DynamicReportBuilder drbContent = new DynamicReportBuilder();

    // get the styles
    DJReportStyles djrst = getDjReportStyles();

    DynamicReport drHeaderSubreport = new DJLetterHead();
    drbContent.addSubreportInGroupHeader(1, drHeaderSubreport, new ClassicLayoutManager(), "", DJConstants.DATA_SOURCE_ORIGIN_FIELD, DJConstants.DATA_SOURCE_TYPE_COLLECTION);

    // Sets the Report Columns, header, Title, Groups, Etc Formats
    // DynamicJasper documentation
    drbContent.setTitle(zksample2title);
    drbContent.setTitleStyle(djrst.getTitleStyle());
    drbContent.setWhenNoDataAllSectionNoDetail();
    // drb.setSubtitle("DynamicJasper Sample");
    drbContent.setSubtitleStyle(djrst.getSubtitleStyle());

    drbContent.setHeaderHeight(20);
    drbContent.setDetailHeight(15);
    drbContent.setFooterVariablesHeight(10);
    drbContent.setMargins(20, 20, 30, 15);

    drbContent.setDefaultStyles(djrst.getTitleStyle(), djrst.getSubtitleStyle(), djrst.getHeaderStyleText(), djrst.getColumnStyleText());
    drbContent.setPrintBackgroundOnOddRows(true);

    /**
     * Columns Definitions. A new ColumnBuilder instance for each column.
     */
    // Right name
    AbstractColumn colRightName = ColumnBuilder.getNew().setColumnProperty("rigName", String.class.getName()).build();
    colRightName.setTitle(rigName);
    colRightName.setWidth(60);
    colRightName.setHeaderStyle(djrst.getHeaderStyleText());
    colRightName.setStyle(djrst.getColumnStyleText());
    // Right type
    AbstractColumn colRightType = ColumnBuilder.getNew().setCustomExpression(getMyRightTypExpression()).build();
    colRightType.setTitle(rigType);
    colRightType.setWidth(40);
    colRightType.setHeaderStyle(djrst.getHeaderStyleText());
    colRightType.setStyle(djrst.getColumnStyleText());

    // Add the columns to the report in the whished order
    drbContent.addColumn(colRightName);
    drbContent.addColumn(colRightType);

View Full Code Here


    FastReportBuilder drb = new FastReportBuilder();
    DynamicReport dr;

    // get the styles
    DJReportStyles djrst = getDjReportStyles();

    /**
     * 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 artNo = Labels.getLabel("common.Article.No");
    String artShortText = Labels.getLabel("common.Description.Short");
    String artPrice = Labels.getLabel("common.Price");

    drb.addColumn(artNo, "artNr", String.class.getName(), 20, djrst.getColumnStyleText(), djrst.getHeaderStyleText());
    drb.addColumn(artShortText, "artKurzbezeichnung", String.class.getName(), 50, djrst.getColumnStyleText(), djrst.getHeaderStyleText());
    drb.addColumn(artPrice, "artPreis", BigDecimal.class.getName(), 20, djrst.getColumnStyleNumbers(), djrst.getHeaderStyleNumbers());

    // Sets the Report Columns, header, Title, Groups, Etc Formats
    // DynamicJasper documentation
    drb.setTitle(this.zksample2title);
    drb.setSubtitle("Article-List: " + ZksampleDateFormat.getDateFormater().format(new Date()));
    drb.setTitleStyle(djrst.getTitleStyle());
    drb.setPrintBackgroundOnOddRows(true);
    drb.setUseFullPageWidth(true);
    dr = drb.build();

    // Get information from database
View Full Code Here

TOP

Related Classes of de.forsthaus.webui.reports.template.DJReportStyles

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.