Question
· Jan 21, 2016

Can Zen Report <pageheader> include information from a <body> group?

Hi,

I'm trying to create a Zen Report that, when rendered to PDF has a header on every page that includes some items from the group that I'm iterating over in the <body>.  I can't use <header> as that only displays once for each iteration, even if that spans more than one page, but <pageheader> seems to be independent of <body> so again doesn't work.

 

Cheers,

Steve.

Discussion (4)0
Log in or sign up to continue

Well, with this example, I just changed that block, which works for all rest pages in a group except the first one.

<masterreference masterReference="rest" pagePosition="rest">
<document width="8.5in" height="11in" marginLeft="1.25in" 
marginRight="1.25in" marginTop="1.0in" 
marginBottom="1.0in" headerHeight="1.0in">
</document>
<pageheader>
<table orient="col" layout="fixed" width="6in">
<item style="text-align:left" value="Sales Report" />
<item field="@name" width="2in"></item>
<item style="text-align:right" special="page-number-of-with-xpath" field="@name" />
</table>

</pageheader>
</masterreference>
 

And it shows Sale rep in a header where page counter was shown before, for example

Sales Report Jack 2 of 5

Sales Report Jen 3 of 5

You can see my result here. A changed only first section.

Hi Dmitry, it seems to be tied into the primaryGroup setting in the report/section and corresponding group.  The documentation only talks about page numbering but it seems to set the context for the pageheader.

If I change my report to have a primaryGroup then it works.  However, the page numbering in the footer now resets (as the docs say it will) - is it possible to have it not reset while using a primaryGroup?

Thanks,

Steve.