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.
Hi Steve, are you have seen class
ZENReports.PageLayouts
in SAMPLES namespace? It shows a lot possiblities for ZEN Reports. Page headers as well. And with sample is not so difficult to make a groupped report with a value on ech page at header. For more control on page header in reports, you should look at pagepagemaster
,masterreference
,pageheader
Hi Dmitry,
Yes, I have seen that one. Therein lies the problem: how would I get the Sales Rep (e.g. 'Jack') to be in the pageheader for the pages that show Jack's data, but then switch to Jen when the group in the body changes to her?
As far as I can tell, the pageheader is independent and so can't be linked to what's being displayed inthe body.
Thanks,
Steve.
Well, with this example, I just changed that block, which works for all rest pages in a group except the first one.
<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.