Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Creating inline SubReport using Pentaho Reporting API

  1. #1
    Join Date
    Aug 2010
    Posts
    5

    Default Creating inline SubReport using Pentaho Reporting API

    Can someone show me some code snippet on how to create an inline SubReport using Pentaho reporting API?

    No matter what I do, the subreport I created turned out to be "banded".

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

    Default

    How about:
    Code:
    Subreport sr;
    band.addElement(sr);
    Make sure you also provide the correct styling for your subreport element according to the layout manager used in the band.

    To compare: A banded subreport is created via:
    Code:
    SubReport sr;
    rootLevelBand.addSubreport(sr);
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3
    Join Date
    Aug 2010
    Posts
    5

    Default

    What makes a root level band vs a not root level band?

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

    Default

    Anything that implements "RootLevelBand" is a rootlevel band. Or speaking more from a end-user view: Any of the predefined structural bands like GroupHeader etc that you can see when opening a new report in PRD are root-level bands. They are called that way because they are the root-elements of each of the content areas that are printed when the report is processed.

    Banded Subreports can be added to any band that actually extends "AbstractRootLevelBand", like Group- and Report Header and Footer, Itemband etc. The javaDoc lists all known implementations.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

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.