Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: problem with servlet upgrading from JFreeReport

  1. #1
    Join Date
    Dec 2007
    Posts
    9

    Default problem with servlet upgrading from JFreeReport

    Hi,
    untill now, I was using JFreeReport 0.7.x.
    Now I upgraded to pentaho-reporting-engine-classic-0.8.9.2. For desktop application i was able to modify my sources in the right way but for a J2EE application I have some trouble. I use an XML file with report definition.
    My old code was:

    res.setContentType("application/pdf");
    final URL in =
    ObjectUtilities.getResource(
    DemoConstants.REPORT_DEFINITION,
    StampaRivalutazioni.class);
    final ReportGenerator generator = ReportGenerator.getInstance();

    // display the content in the browser window (see RFC2183)
    res.setHeader(
    "Content-Disposition",
    "inline; filename=\"" + toPrint + ".pdf\"");
    final JFreeReport report =
    generator.parseReport(new java.io.File("myfile.xml"));

    ServletOutputStream outputStream = res.getOutputStream();

    report.setData(filtraModTab(tabCalc, ses));

    final PDFOutputTarget target =
    new PDFOutputTarget(outputStream);
    target.configure(report.getReportConfiguration());
    target.open();
    final PageableReportProcessor proc =
    new PageableReportProcessor(report);
    proc.setOutputTarget(target);
    proc.processReport();
    target.close();
    outputStream.close();
    The red methods are incorrect with this new version.
    It seems that the constructor
    PageableReportProcessor now wants 2 parameters and that the setOutputTarget method doesn't exist yet.
    What I have to do?
    Thanks in advance.

  2. #2

    Default

    Do you know what jar file has the classes for PDFOutputTarget.java and ReportGenerator.java


    Thank you.

  3. #3
    Join Date
    Dec 2007
    Posts
    9

    Default

    But now there is only one jar: pentaho-reporting-engine-classic-0.8.9.2.jar
    I don't find any other jar!

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.