Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: JFreeReport and HTML

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

    Default JFreeReport and HTML

    High everybody,
    I would like to use JFree-Report to make report in HTML pages.
    I made some tests, but it doesn't work.

    I have made an applet in java, and I have integrate a JFreeReport in this applet. There is no problem in JBuilder8 (i can see my applet and the JFreeReport). But when i launch my applet in Internet Explorer 5, it doesn't work.

    If you have any idea, please help me.

    NB : sorry for the English but I have some vocabulary problems.

    Thank you for your help

    Damien

  2. #2
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Hi,

    using a Java2 applet within the IE is hard work.

    First, you must have the Java-Plugin installed (JRE 1.2.2 or higher). If your JavaPlugin is version 1.3.1 or higher, then it will handle the APPLET tag, in any other case, the Microsoft-VM will handle the applet.

    http://java.sun.com/products/plugin/versions.html

    If you are sure that the correct VM is used to launch the applet, then have a look at the Java-Console and search for SecurityExceptions.

    Most likely you will get some of them, as the PDF output target tries to read the installed fonts. If you dont need the PDF output, then you can disable it by setting the pdf plugin property in the file jfreereport.properties to false:

    com.jrefinery.report.preview.plugin.pdf=true
    com.jrefinery.report.preview.plugin.csv=true
    com.jrefinery.report.preview.plugin.html=true
    com.jrefinery.report.preview.plugin.excel=true
    com.jrefinery.report.preview.plugin.plain=true

    This file can be found in the JAR file, you can also override all properties in an additional file, which should be placed into the root of your classpath (so that it is reachable via Class.getResource("/jfreereport.properties").

    If you need the PDF output, then define the security as specified by Sun:

    http://java.sun.com/j2se/1.4.1/docs/...rmissions.html

    If it still fails, post the exceptions from the JavaConsole and we will make it work ...

    Have more fun,
    said Thomas

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

    Default

    Hi,

    In fact I don't think the problem is in the security (But i'm not so sure of that).
    I can launch my applet but i have the following message in my java console.

    java.lang.NoClassDefFoundError: com/jrefinery/report/io/ReportGenerator

    at essaipdfbis.Applet1.init(Applet1.java:61)

    at sun.applet.AppletPanel.run(Unknown Source)

    at java.lang.Thread.run(Unknown Source)


    I work with JBuilder8, and I have included all the packages of JfreeReport.
    Maybe the problem is coming from Internet Explorer.

    NB : i'm a student and i'm working as a trainee in France. Sorry if my level in data processing is not very high.

    Thank you very much for your help.
    Damien

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

    Default

    J found the problem.
    The problem was in my HTML page.
    The syntaxe for the applet is the following one :

    <applet
    codebase = "."
    archive = "jfreereport-0.8.3.jar,bsh-1.2b6.jar,gnujaxp.jar,itext-0.99.jar,jakarta-poi-1.10.0-dev-20030222.jar,jcommon-0.8.2.jar,junit.jar,pixie-0.8.0. "
    code = "essaipdfbis.Applet1.class"
    name = "AppletTest"
    width = "400"
    height = "300"
    hspace = "0"
    vspace = "0"
    align = "middle"
    >

    And all the jar files have to be in the same directory as the HTML page.
    That's it

    Damien

  5. #5
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Hi,

    the JUnit.jar is not needed, you can safely remove that file.

    Have more fun,
    said Thomas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.