Hitachi Vantara Pentaho Community Forums
Results 1 to 27 of 27

Thread: Page footers with subreports?

  1. #1
    Join Date
    Apr 2007
    Posts
    2,010

    Default Page footers with subreports?

    Hi,

    I have a page footer in the parent report which says Page 1 of 10 for example. and other misc stuff.

    However i also have a subreport in the report footer. The problem is fif the subreport is several pages then you dont get a page footer.

    How can i get this to work? Will I have to pass the current page number into the subreport or something? how do i avoid duplicated footers?

    Thanks,
    Dan

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

    Default

    There are several strategies. By default, each subreport defines its own header/footer. But you can import that page-header/footer and the repeated group-header/footer from the master-report by setting the "sticky" flag on the master's bands.

    There will be no duplicate bands using this method.
    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

    Note: If I would be able to go back in time, I would change the "sticky" default to true to make the page-band import the default behavior. But doing this now, with many reports deployed and easily broken by that move, would upset a lot of people.

    PS: If anyone knows a good time-machine manufacturer, I'd be happy to hear from it
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  4. #4
    Join Date
    Apr 2007
    Posts
    2,010

    Default

    Ok, can't help on the time machine

    I get this message:

    14:50:46,539 WARN [JCommon] Unknown tag <http://jfreereport.sourceforge.net/namespaces/reports/legacy/ext:style-expression>: Start to ignore this ele
    ment and all of its childs.

    Is that because this is unsupported in Pentaho 1.6.0? Hopefully we'll be upgrading to 1.6.3 soon so maybe it will work in that version.

  5. #5

    Arrow

    Hi,

    can you give me some more details, where I can find the "sticky" flag in the report designer.
    I'm using PentahoReportDesigner-1.6.0.348.GA and have the same problem with the PageOfPagesFunction using subreports.

    THX 4 Ur help.

    Regards
    myma

  6. #6
    Join Date
    Apr 2007
    Posts
    2,010

    Default

    it's under the style expressions property of the subband.

  7. #7

    Arrow

    OK, I've found the sticky expression on the page footer style expression, but how does it work?
    I have a parent report with 2 pages and 6 subreports on the report footer band. I use the pageOfPagesFunction and import the global parameters into the subreports. The first report shows the correct page number 3/8. But the other reports show also page 3/8. I think that the subreport doesn't return the incremented page number to the parent report.
    Any ideas how to solve the problem?

    THX 4 Ur help.

    Regards
    myma

  8. #8
    Join Date
    Apr 2007
    Posts
    2,010

    Default

    turns out this doesnt actually work

    http://jira.pentaho.com/browse/PRE-268

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

    Default

    Mark the master's report page-footer sticky and it works. The bug talks about the page-footers of the subreports that do not get displayed reliably - which, as explained in the bug, is caused by the way page-footer and headers are activated.

    However, in case you are using the old 1.6.0-ga version: That version shipped with release candidate 6 of the reporting engine (and therefore has a lot more bugs than just that one). There are many many bugs in there that got fixed in the meantime. Generally, when answering about whether a feature works or does not work, I assume that the latest stable version of the engine runs inside. Otherwise I just would find myself repeating myself saying "Upgrade to a GA release of the reporting engine"
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  10. #10
    Join Date
    Apr 2007
    Posts
    2,010

    Default

    Well I tried platform 1.7RC1 whatever engine that has. I set sticky onto the subband in my page footer in the parent report, and I dont see the footer when the subreport spans 2 pages on the second page.

    If thats not that defect then i suspect i'll need to raise a new issue?

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

    Default

    The Sticky-Flag only applies to the root-level band (ie the page-footer-band itself). Setting the flag on a subband has no effect.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  12. #12
    Join Date
    Apr 2007
    Posts
    2,010

    Default

    Ok, well that still doesnt work... sticky:true on the page footer itself..??

  13. #13
    Join Date
    Apr 2007
    Posts
    2,010

    Default

    also i see this in the output:

    12:36:11,479 WARN [JCommon] Unknown tag <http://jfreereport.sourceforge.net/namespaces/reports/legacy/ext:style-expression>: Start to ignore this ele
    ment and all of its childs.

    I suspect thats pointing to the sticky setting...? i dont think i use style expressions anywhere else...

  14. #14
    Join Date
    Apr 2007
    Posts
    2,010

    Default

    Ah hang on i'm getting confused between my many dev env's. Anyway in 1.7RC1 it doesnt produce that warning about unknown tag, but neither does the footer appear.

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

    Default

    Upgrade. RC6 did not parse style-expressions on bands.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  16. #16
    Join Date
    Apr 2007
    Posts
    2,010

    Default

    upgrade the one in 1.7RC1? to what version? Is there an overnight build or latest which will be going into 1.7GA to try?

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

    Default

    Upgrading to Report-Designer/Platform 1.7-RC2 will give you access to the reporting engine 0.8.9-5.

    However, yet another bug prevents you from using style-expressions on page-footers to set the sticky-flag. For all released 0.8.9 versions, the page-footer's style-expressions are not evaluated until the report's footer is actually printed. Therefore your subreport will not know that the master's footer is supposed to be sticky, untl you set the stickyflag directly in the XML file.

    http://jira.pentaho.com/browse/PRD-625
    (Bug and fix for the report-designer.)

    http://jira.pentaho.com/browse/PRE-354
    (Bug and fix for the engine.)

    With todays changes, the report-designer allows you to set the sticky flag directly and therefore you no longer have to rely on style-expressions. This fix will be part of the 1.7.0-GA release. The next bug-fix release of the engine (0.8.9-6) will fix the case that style-expressions are not evaluated on footers, but this release will not be part of the official platform before 1.7.1 is out.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  18. #18
    Join Date
    Apr 2007
    Posts
    2,010

    Default

    Ok thanks, looking forward to grabbing the GA

  19. #19
    Join Date
    Aug 2008
    Posts
    1

    Default

    Hi, we currently use Pentaho 1.7. The "sticky" headers work as expected - they occur on every page. But the "sticky" footers do not work.

    Pentaho 1.7 contains reporting engine v. 0.8.9.5. I tried to replace following jars with version 0.8.9.6:

    pentaho-reporting-engine-classic-0.8.9.5.jar
    pentaho-reporting-engine-classic-ext-0.8.9.5.jar

    Footers started to work correctly but another problem occured: when generating the report in HTML format we lose formatting: borders, backgroung colours or page header formatting at all. This problem occurs only in Firefox, in MSIE works everything fine.

    When replacing the jars above with version 0.8.10 Pentaho stopped working at all.

    Could you please tell me how to fix this problem? Is replacement of the two jars above enough? If not, whose files should I replace with newer versions?

    Thanks in future,

    Alleycat

  20. #20
    Join Date
    Jul 2008
    Posts
    29

    Default Page Footer Only Shows on Last Page

    It sounds like I have a similar problem to many of the people here. I created at top level report that has no real function other than to hold 7 subreports and to display a common title and logo and page number on each page.

    Each of the subreports has a Report Header, a Group Header, and an Item Band. The queries are set in the subreports, and the main query that gets used by most of the subreports is called "default". The top level report has a Report Header with a logo and some text as a label and the pageofpages function, sticky flag is set. The Report Footer contains the seven subreports, and the Page Footer contains some text as a label and the same pageofpages function also set to sticky.

    The Page Header works and shows up on every page with the page number and the total number of pages, as well as the logo and the text label. The Page Footer only shows up on the last page of the report. All of the properties of the Page Header and Page Footer are set the same except the visual height. This appears to be a bug. Or, am I doing something wrong?

    I am using Pentaho PCI BI Platform 1.7.0, Design Studio v. 1.7, and have repeated the results with Report Designer 1.7.0, 1.7.1, and 2.0.0.

    This is very frustrating. Can anybody help?

  21. #21
    Join Date
    Apr 2007
    Posts
    2,010

    Default

    the sticky flag needs to be applied to the section, i.e. the report footer or report header itself, not the objects within that section, and not any subband within that section.

  22. #22
    Join Date
    Jul 2008
    Posts
    29

    Default

    In my previous post, I mistakenly said there was a Report Header in the top level (master) report. I meant to say Page Header. The sticky checkbox is checked in the Page Header and Page Footer of the master report and nowhere else? In fact, the sticky check box doesn't show up in Report Designer for individual items or for the Item Band, it only is available for Page Header/Footer and Group Header/Footer....so it would be hard to get that wrong.

    Further, in the subreports no sticky flags are set whatsoever.

    Again to recap, the sticky flag checkbox is checked in both Page Header and Page Footer in the main report and nowhere else, and the Page Header sticky function works, but the Page Footer sticky does not, and only shows up on the very last page.

    Any ideas from anyone?
    Last edited by Neal Winblad; 12-04-2008 at 02:26 PM.

  23. #23
    Join Date
    Jul 2008
    Posts
    29

    Default Page Footers Now Working

    In a separate post on a different bug I got an answer from Taqua that fixed this issue. It turns out that Pentaho Report Designer is buggy when it comes to complex reports and is being rewritten from the ground up.

    Report Designer when it compiled the report configuration from the GUI to the XML code left out the line
    <basic-key name="sticky">true</basic-key>
    in the XML code for the Page Footer. When I manually editted this line into the XML my report now has page footers on every page.

    Thanks for the input Taqua

  24. #24

    Default

    iam using prd 1.7.1
    and actually i checked all the links here , and i tried to make sticky option true in page footer which contains only function pageofPages
    my report has master report and many subreports in the report header of that master ,
    but actually footer can't be viewed in subreports , it only appears in the last page

    did i miss something guys ???

    i make sticky true , and i tried also in style expression , but it didn't make any difference

    iam really soooo confusedddd

  25. #25

    Default

    guys please , i need your help really
    i upgraded to prd 2.0.0 and still have that problem

    i tried even to put the page number in report header but no effects, still doesn't appear

    i checked the sticky option in page footer, and i checked the xml file and it was checked true
    NO EFFECT

    i trued Neal Winblad word and put in source "opened it with gedit and i added the line after the sticky opetion in footer"

    <basic-key name="sticky">true</basic-key>

    and still no effect

    pleaseeeeeeeeee, i need help in that

    iam using open suse, and even i tried it windows vistaa, and nothing

    only in first page

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

    Default

    Be aware that the sticky-flag must be set on the *master-report*s page-footer. Sticky makes sure the engine always prints that page-footer.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  27. #27

    Default

    yess , really i make the sticky on the master report in page footer , and i opened the xml file to make sure that it is set to true, and it was actually set to true , but , still doesn't appear

    i searched alot , and iam tired of searching and trying without any results

    pleaseeeeee i need a help in that ,
    please i need a solution to the problem

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.