Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: subreport in subreport behaviour

  1. #1
    Join Date
    Mar 2008
    Posts
    364

    Default subreport in subreport behaviour

    Hi!
    I encounter a strange behaviour with subreports in subreports (PRD3.5) that I can reproduce but not explain. Maybe someone also had this issue before:

    1) Make a Master-Report that contains a group that would repeat several times in with your result.
    2) Put a subreport in the group's footer. The subreport contains a detail-query on your group key. -> everything works fine so far
    3) Put another subreport into the first subreport's details-band -> now the group from the master report is only rendered once (first occurence, subreports for that one group render correctly).
    4) Now set the inner subreport visible=false -> all groups render ok again.

    No error message is being shown. Any ideas? Can anyone reproduce this?

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

    Default

    I was able to replicate the bug. PRD-2287
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

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

    Default

    The issue has been resolved in TRUNK.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  4. #4
    Join Date
    Mar 2008
    Posts
    364

    Default

    Very nice
    There is another issue regarding subreports and crosstabs that I came across:

    I have a crosstab report that works ok. When I put that crosstab-report as a subreport into my master report it never works. I can also reproduce this with any subreport that contains a crosstab:

    While rendering I get:
    Code:
    java.util.EmptyStackException
        at org.pentaho.reporting.libraries.base.util.FastStack.peek(FastStack.java:111)
        at org.pentaho.reporting.engine.classic.core.states.crosstab.CrosstabProcessorFunction.groupFinished(CrosstabProcessorFunction.java:198)
        at org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireGroupFinishedEvent(SubLayoutProcess.java:320)
        at org.pentaho.reporting.engine.classic.core.states.SubLayoutProcess.fireReportEvent(SubLayoutProcess.java:213)
        at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.fireReportEvent(ProcessState.java:957)
        at org.pentaho.reporting.engine.classic.core.states.process.EndGroupHandler.advance(EndGroupHandler.java:41)
        at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.advance(ProcessState.java:774)
        at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processPrepareLevels(AbstractReportProcessor.java:345)
        at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.performStructuralPreprocessing(AbstractReportProcessor.java:497)
        at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:411)
        at org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.PrintReportProcessor.getNumberOfPages(PrintReportProcessor.java:77)
        at org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewPane$RepaginationRunnable.run(PreviewPane.java:266)
        at org.pentaho.reporting.engine.classic.core.util.Worker.run(Worker.java:174)
    I had to patch the CrosstabProcessorFunction to make those reports run:

    There are 3 places like
    Code:
          if (processingStack == null)
          {
            return;
          }
    that had to be changed to

    Code:
          if (processingStack == null || processingStack.isEmpty())
          {
            return;
          }
    I don't know if crosstabs are intended to be allowed in subreports or if this patch has other sideffects, but for my special case it works.

    best regards,

    mgie

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.