I’m modifying an ActiveReports (for .NET v.2 SP3 Build 4.3.0.1261) report, which is bound to a list of objects. The detail section is set up with two page breaks, so that there are (up to) 3 pages produced for each object.
I say ‘up to’ because pages 2 & 3 are not relevant to every object, so some objects will generate only one page. I am achieving this from the Detail_Format event by disabling the pagebreaks and reducing the Detail height when only the first page is relevant.
My issue is that I am trying to show the page footer only on the first page for each object, i.e. hide it for pages 2 and 3, but I cannot find a way to do this. I can’t just track the page count because the number of pages per object is variable.
Any thoughts on how I can achieve this, even if it means a different approach to playing with the detail layout?
After shotgunning a lot of the eventhandlers, I managed to figure it out.
Put
PageFooter.Visible = Truein theDetail.Formateventhandler,and put
PageFooter.Visible = Falsein theReport.PageStarteventhandler.In case anyone is interested, my earlier problems were caused by trying to set a counter to zero in the
Detail.Formateventhandler and increment it theReport.PageStarteventhandler and then make the footer not visible when the counter was greater than zero. But due to the timing of the events this meant that