Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Pentaho for java developers + view reports as HTML + interactive reports

  1. #1
    Join Date
    Nov 2009
    Posts
    27

    Default Pentaho for java developers + view reports as HTML + interactive reports

    Hello
    I read the book Pentaho For Java Developers and I have the following doubt.
    I am trying to make an interactive report ( chapter 9 ) but it isnt working.
    I use the this code to view the reports as html
    Code:
    else if ("html".equals(outputFormat)) {
    String reportLoc = "report_" + reportNum++;
    String path = this.getServletContext().getRealPath(reportLoc);
    File folder = new File(path);
    folder.mkdir();
    HtmlReportUtil.createDirectoryHTML(report,
    path + File.separator + "index.html");
    response.sendRedirect(reportLoc + "/index.html");
    }
    The reports works perfectly
    The url of this html report is
    http://localhost:8080/chapter9/report_5/index.html

    And then I put in the report`s append header, append body footer and xml id the same as in the book.

    However, when I select one option from the drop down list of the html report nothing happens

    Does anyone know how to make an interactive report correctly?
    Is it possible to view html reports in a different way?

    Thank you!

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

    Default

    Well, the HTML you inject via these options is just the first step. On the server side your servlet has to understand the incoming request with its new parameters and has to act on it accordingly.

    So check that:
    (1) You send a correct request to the server when the options change.
    (2) Your servlet actually handles the incoming request correctly.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3
    Join Date
    Nov 2009
    Posts
    27

    Default

    I couldn t catch what you are trying to tell me.

    Are you saying that I have to edit the new html from the servlet?
    How should I do that?
    I think that I am failing here :
    (2) Your servlet actually handles the incoming request correctly.

    When I select an option in the new form, in the url it is shown this :
    index_3/reporting?Parameter=Option1 or something similar.
    What happens is that I dont know how to call that Parameter=Option1 on the new html

    Thanks for helping me
    Last edited by mcasal; 11-17-2009 at 07:54 AM.

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.