US and Worldwide: +1 (866) 660-7555
Results 1 to 7 of 7

Thread: JFreeReport work very slow or I have error in my code

  1. #1
    Join Date
    Mar 2003
    Posts
    4,947

    Default JFreeReport work very slow or I have error in my code

    Hi, in my program I have problem with JFreeReport. Program write to console
    INFO: Pixie library found. WMF file support will be available.
    INFO: Registering fonts for the iText library; using a cached font registry.
    INFO: Completed font registration.


    and in debugger program stop in code

    private JFreeReport createReportDefinition ()
    {

    JFreeReportBoot.getInstance().start();

    final JFreeReport report = new JFreeReport();//here is stop
    andI must kill my program. CPU is 10%, RAM my application 35MB, normal is 30MB.
    In console in my IDE - NetBeans - is no write, any error.

    To this functions I jump from

    final TableModel data = createData();
    final JFreeReport report = createReportDefinition();//here



    Regards Vasek

  2. #2
    Join Date
    Mar 2003
    Posts
    7,560

    Default

    Hi,

    you are working with Windows and you do not have a printer driver installed. Therefore the JDK locks up when it tries to query the default page sizes.

    Use the global report configuration "org.jfree.report.NoPrinterAvailable" and set it to "true".

    Therefore either start your programm with the system property "org.jfree.report.NoPrinterAvailable" set to "true" or create a jfreereport.properties file and put the property there or by adding the following lines to your code:
    Code:
    JFreeReportBoot.getEditableConfig().setConfigProperty ("org.jfree.report.NoPrinterAvailable", "true");
    The concept behind the report configuration is explained here: http://www.jfree.org/phpBB2/viewtopic.php?t=5789

    Regards,
    Thomas

  3. #3
    Join Date
    Mar 2003
    Posts
    4,947

    Default

    Thank you for your help me. I add your code to my functions

    private JFreeReport createReportDefinition ()
    {

    JFreeReportBoot.getEditableConfig().setConfigProperty ("org.jfree.report.NoPrinterAvailable", "true");

    JFreeReportBoot.getInstance().start();

    final JFreeReport report = new JFreeReport();
    report.setName(getDescription());

    any code..........

    but IDE show error non static method getEditableConfig() cannot be referenced from a static context
    JFreeReport report is declared as final





    Thank you

  4. #4
    Join Date
    Mar 2003
    Posts
    7,560

    Default

    Hi,

    sorry my fault: Use

    Code:
     JFreeReportBoot.getInstance().setConfigProperty ("org.jfree.report.NoPrinterAvailable", "true");
    and it will work.

    Regards,
    Thomas

  5. #5
    Join Date
    Mar 2003
    Posts
    4,947

    Default

    I am sorry, but

    cannot find symbol method setConfigProperty. In my GUI
    is show only setUserConfig. It is this method?

    Regards

    Vasek

  6. #6
    Join Date
    Mar 2003
    Posts
    7,560

    Default

    Hi,

    sorry, the correct call is:

    Code:
        JFreeReportBoot.getInstance().getEditableConfig().setConfigProperty(String, String);
    Regards,
    Thomas

  7. #7
    Join Date
    Mar 2003
    Posts
    4,947

    Default

    Thank you very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •