0

I have a report that contains two main subreports, each taking a vertical half of the page, so they go side by side. Each has their own page header which I emulate by using a groupheader and seting the RepeatStyle property to OnPageIncludeNoDetail. However, both may have a different length, and I want the rightmost subreports to show the page header even if the report has no more data to show. In other words, if the right subreport takes less pages than the left report, I need for it to keep printing the header data on each page until the leftmost report ends. This is failing right now because once the subreport on the right is finished, it assumes the header needs not to be printed anymore.

I've tried adding a page break at the bottom of the subreport on the right, but as I don't know how many pages either of the subreports have, I don't know whether I should enable it or not until too late (or at least I didn't find a way to do so). BTW, I'm using AR3 but upgrading to AR7 is supposed to occur at some point of the future...

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
Alejandro B.
  • 4,807
  • 2
  • 33
  • 61

3 Answers3

1

Once a subreport ends and is no longer being put on each page it won't be possible to get it's page header rendered on the next page. I think your best option here is to use a parent report to include the pageheader information as only a parent report will continue to render as long as either one of the subreports render.

Note: It doesn't need to be the same parent report you're using now, but you could be another in between the current parent report and the two subreports to deal with the page headers.

Scott Willeke
  • 8,884
  • 1
  • 40
  • 52
  • I currently have a parent report that holds both subreports (let's call them SRLeft and SRRight) side by side (one next to the other, not one on top of the other). You are saying to add a parent report that is next to the SRLeft, and contains SRRight? If so, I think it's of no use as I still don't know how many pages will either of the subreports have. Now, if you are saying to have a parent report that holds both subreports inside, that won't work because the header I need repeated exists only on the right hand report. – Alejandro B. Jun 25 '13 at 15:49
  • No, I'm saying add a parent report that contains both SRLeft and SRRight, then remove pageheaders from each of SRLeft/SRRight and put those headers into the new parent report. Since a subreport ends when it is out of data, there will not be any way to make it's page headers/group headers continue rendering according to another external/adjascent subreport. – Scott Willeke Jun 25 '13 at 23:01
  • @AlejoBrz How's it going with this? – Scott Willeke Aug 22 '13 at 03:15
0

I would suggest that you use groupheader/footer in the subreports instead of pageheader/footer and set the repeatstyle property of groupheader to OnPage.. Pageheader/footer in subreports are not supported because Subreports are not page aware.

The pageheader/pagefooter of the main report with render fine as scott mentioned.

Rajnish Sinha
  • 406
  • 2
  • 4
0

I found a way to do this although it is not flawless. But the problem may be only on AR3 and hopefully fixed on AR7. What I did was move the right subreport's header on a separate header of the master report. So now the master report has a page header, then the new group header (let's call it ghPage), and lastly the group header that originally contained both subreports. Then, I set ghPage's property UnderlayNext to true, taking care to leave the necessary blank space to let ghPage fit in. That's it, and it seems to work, but... when the left side subreport takes less than the right's page header high, this last section appears cropped to the left's height.

Alejandro B.
  • 4,807
  • 2
  • 33
  • 61