DynamicJasper font encoding problem

Posted by user266956 on Stack Overflow See other posts from Stack Overflow or by user266956
Published on 2010-02-05T10:26:57Z Indexed on 2010/03/17 8:51 UTC
Read the original article Hit count: 561

Filed under:
|

Hello All, I'm new to DynamicJasper, I think it's a great project but for a few days I cannot run simple example which will display polish fonts properly. Details sections is generated without any problems automatically displaying polish letters like 'c z z a' etc. where title and column headers contain strange letters instead. I was trying to do the following, but it doesn't work:

  FastReportBuilder drb = new FastReportBuilder();
        Font font = new Font(25, "SansSerif", "Helvetica", Font.PDF_ENCODING_CP1257_Baltic, true);
        Style titleStyle = new StyleBuilder(false).setFont(font).build();

        DynamicReport dr = drb.addColumn("State", "state", String.class.getName(),30)
                        .addColumn("Branch", "branch", String.class.getName(),30)
                        .addColumn("Product Line", "productLine", String.class.getName(),50)
                        .addGroups(2)
                        .setTitle("November 2008 Zrebie  aczc!")
                        .setTitleStyle(titleStyle)
                        .setSubtitle("This report was generated at " + new Date())
                        .setPrintBackgroundOnOddRows(true)
                        .setUseFullPageWidth(true)
                .build();


        JRDataSource ds = new JRBeanCollectionDataSource(this.simples);
        JasperPrint jp = DynamicJasperHelper.generateJasperPrint(dr, new ClassicLayoutManager(), ds);
        JasperViewer.viewReport(jp);    //finally display the report report

Any help would be highly appreciated as dynamicjasper forums seems to be dead and constantly spammed. Thanks in advance! Kris

© Stack Overflow or respective owner

Related posts about dynamic

Related posts about jasper