US and Worldwide: +1 (866) 660-7555
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Table of contents in pentaho report designer

  1. #1

    Default Table of contents in pentaho report designer

    I want to generete the table of contents and of figures of my report and i couldn't find a way to manage Anyone has an idea how to do it please?

  2. #2

    Default Table of contents and of figures in pentaho report designer

    I want to generete the table of contents and of figures of my report and i couldn't find a way to manage I'm running pentaho report designer 2.0.0 stable.
    Anyone has an idea how to do it please?[/QUOTE]

  3. #3
    Join Date
    Jan 2006
    Posts
    313

    Default same problem

    I am having the same problem. Did you manage to find a solution?

  4. #4

    Default

    I've been trying to get this done with some javascript code and css class names.

    I couldn't get it to work because the PUC report viewer creates a new HTML document for every page, and I couldn't get my Javascript to reference accross pages.
    This did work in PRD (>= 3.5) though, where reports are displayed as a single page.

    HTH,

    Bart

  5. #5
    Join Date
    Jan 2006
    Posts
    313

    Default example

    Bart,

    Thanks for the reply.
    Do you mind sharing with me an example?

  6. #6

    Default

    Gunter,

    See the attached report for a quick and dirty example.

    Cheers,

    Bart
    Attached Files Attached Files

  7. #7
    Join Date
    Mar 2003
    Posts
    7,997

    Default

    Have a look at the CI builds for both 3.6 and 3.7 - and you will now find new icon in the list of available elements. It looks like a subreport, smells like a subreport, but is named "table-of-contents". And it generates what the name says.

    The data-generation can be controlled via a couple of attributes on the toc-element itself. The layout can be defined by ordinary subreport means - so just drag labels, fields and so on onto the subreport and you are there. Please note that redefining the subreports datafactories or queries has no effect, as they get reset at runtime.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  8. #8

    Default

    Very nice! I haven't found a way to create links to the elements the TOC entries point to. Is this possible?

  9. #9
    Join Date
    Mar 2003
    Posts
    7,997

    Default

    Create a IndexTextGeneratorFunction in your main report, name it "index-gen" and then add the following formula to the "html-anchor" style:

    =[index-gen]

    make sure your index-gen function is configured in the same way as your toc-element, so that you get consistent results between the generated index here and the one found inside the TOC report.

    And then in the TOC, just add a "href-target" style-expression to your elements, with the following formula

    ="#" & [item-index]

    The linking works in both HTML and PDF reports, but not in the Swing-preview or in the Excel-target (same behaviour as before).
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  10. #10

    Default

    Cool! Thanks 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
  •