Hitachi Vantara Pentaho Community Forums
Results 1 to 9 of 9

Thread: SubReports in GroupHeader repeated in GroupFooter

  1. #1
    Join Date
    Mar 2008
    Posts
    6

    Default SubReports in GroupHeader repeated in GroupFooter

    Hello,

    I`m trying to put a subreport in a group header to be shown when the group starts, but it´s shown again at the end of the group footer.

    Any idea about??

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

    Default

    Can you provide a report definition?

    If you're using the report-designer, then you are likely to run into a well-known bug. Upgrade to the latest version before you continue.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3

    Default

    I have seen the same issue and can't figure out how to get around it. I am using version 1.6.0.348.GA

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

    Default

    Known bugs get fixed in later versions. So to resolve the issue: Download the latest release of the report-designer!
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  5. #5

    Default

    I have tried the same report in version 1.7.0.M1.0472 (the latest I have downloaded) and get the same issue.

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

    Default

    Then it would be a great idea to add a JIRA case along with all information you can provide. A set of .report files and a exported/published .xml file will greatly help us to resolve the issue as fast as possible.

    JIRA is at http://jira.pentaho.org
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  7. #7
    Join Date
    Mar 2008
    Posts
    6

    Default

    That´s a little example of the problem.

    In sampledata-grupos-consubinforme.xml you can see the subreport included only in the groupheader section althought in the generated report it appears in the groupfooter too:

    (<style> sections ommitted, complete code in sampledata-grupos-consubinforme.xml)
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <report-definition xmlns="http://jfreereport.sourceforge.net/namespaces/reports/legacy/ext" name="Report" engine-version="0.8.9-rc6">
      <parser-config>
        <object-factory class="org.jfree.report.modules.parser.ext.factory.base.URLClassFactory"/>
        <object-factory class="org.jfree.report.modules.parser.ext.factory.objects.DefaultClassFactory"/>
        <object-factory class="org.jfree.report.modules.parser.ext.factory.objects.BandLayoutClassFactory"/>
        <object-factory class="org.jfree.report.modules.parser.ext.factory.base.ArrayClassFactory"/>
        <element-factory class="org.jfree.report.modules.parser.ext.factory.elements.DefaultElementFactory"/>
        <stylekey-factory class="org.jfree.report.modules.parser.ext.factory.stylekey.DefaultStyleKeyFactory"/>
        <stylekey-factory class="org.jfree.report.modules.parser.ext.factory.stylekey.PageableLayoutStyleKeyFactory"/>
        <template-factory class="org.jfree.report.modules.parser.ext.factory.templates.DefaultTemplateCollection"/>
        <datasource-factory class="org.jfree.report.modules.parser.ext.factory.datasource.DefaultDataSourceFactory"/>
      </parser-config>
      <report-config>
       <simple-page-definition width="1" height="1">
          <page orientation="portrait" topmargin="20" leftmargin="20" bottommargin="20" rightmargin="20" pageformat="A4"/>
        </simple-page-definition>
        <configuration>
          <property name="org.jfree.report.NoPrinterAvailable">true</property>
        </configuration>
      </report-config>
      <report-description>
        <report-header>
          <style>
            ...
          </style>
        </report-header>
        <report-footer>
          <style>
            ...
          </style>
        </report-footer>
        <page-header>
          <style>
            ...
          </style>
        </page-header>
        <page-footer>
          <style>
            ...
          </style>
        </page-footer>
        <watermark>
          <style>
            ...
          </style>
        </watermark>
        <groups>
          <group name="default">
            <fields/>
          </group>
          <group name="REGION">
            <fields>
              <field>REGION</field>
            </fields>
            <group-header>
              <style>
                ...
              </style>
              <element name="TextField@8709113" type="text/plain">
                <style>
                  ...
                </style>
                <template references="string-field">
                  <basic-object name="field">REGION</basic-object>
                  <basic-object name="nullValue"></basic-object>
                </template>
              </element>
              <sub-report query="default">
                <import-parameter name="REGION" alias="CURRENT_REGION"/>
                <report-config>
                </report-config>
                <report-description>
                  <report-header>
                    <style>
                      ...
                    </style>
                    <band name="Element@22050116">
                      <style>
                        ...
                      </style>
                      <element name="Element@22050116.fill" type="shape/generic">
                        <style>
                          ...
                        </style>
                        <datasource type="StaticDataSource">
                          <compound-object name="value" class="java.awt.geom.Rectangle2D$Float">
                            <basic-object name="height">100.0</basic-object>
                            <basic-object name="width">100.0</basic-object>
                            <basic-object name="x">0.0</basic-object>
                            <basic-object name="y">0.0</basic-object>
                          </compound-object>
                        </datasource>
                      </element>
                    </band>
                    <element name="TextField@4859349" type="text/plain">
                      <style>
                        ...
                      </style>
                      <template references="string-field">
                        <basic-object name="field">CURRENT_REGION</basic-object>
                        <basic-object name="nullValue"></basic-object>
                      </template>
                    </element>
                  </report-header>
                  <report-footer>
                    <style>
                      ...
                    </style>
                  </report-footer>
                  <page-header>
                    <style>
                      ...
                    </style>
                  </page-header>
                  <page-footer>
                    <style>
                     ...
                    </style>
                  </page-footer>
                  <watermark>
                    <style>
                      ...
                    </style>
                  </watermark>
                  <groups>
                    <group name="default">
                      <fields/>
                    </group>
                  </groups>
                  <itemband>
                    <style>
                     ...
                    </style>
                  </itemband>
                  <no-data-band>
                    <style>
                      ...
                    </style>
                  </no-data-band>
                </report-description>
                <functions>
                </functions>
              </sub-report>
            </group-header>
            <group-footer>
              <style>
                ...
              </style>
            </group-footer>
          </group>
        </groups>
        <itemband>
          <style>
            ...
          </style>
        </itemband>
        <no-data-band>
          <style>
            ...
          </style>
        </no-data-band>
      </report-description>
      <functions>
        <property-ref name="report.name" class="java.lang.String">Report</property-ref>
      </functions>
    </report-definition>
    Attached Files Attached Files

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

    Default

    Confirmed; Bug in the Engine.

    JIRA case PRE-319; tracked down and killed on spot. The fix is commited to the SVN repository will be part of the next bug-fix release.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  9. #9
    Join Date
    Aug 2008
    Posts
    3

    Default Same problem with subreports printing of group footer

    I'm using Design Studio and Report Designer 1.7.0.944 and I have the same problem with subreports showing correctly in the group header but also in the group footer.
    Report Designer works fine, after publishing the server report has the problem.

    I setup my environment as per http://wiki.pentaho.com/pages/viewpa...pageId=6783699.

    What do I need to do to get the patch into my BI version?

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.