Jump to content
We've recently updated our Privacy Statement, available here ×

How to show column header/footer only if details section is displayed?


bz3x
Go to solution Solved by oesina,

Recommended Posts

Dear community,

I've been struggling with what seems like a simple issue. I have a report with three subreports. When the first subreport has just enough records in the detail section to fill up almost the entire first page, and at the bottom of the first page there's just enough room for the header of the second subreport (but not the details section), that subreport shows only the column header and the column footer but not the data section.

In short: how can I force the second subreport to display the column header and column footer only if the detail section is displayed?

I've tried setting the "Print when" of subreport's column footer to !$V{sumTotal}.isNaN() (sumTotal is a variable I use to show data in the footer). That works for the footer but the subreport header remains. And I can't use the same trick as with the footer because the sumTotal variable isn't set yet.

The issue is clearer in the attached report.

Thanks for any pointers or solutions!

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Correction: column header and column footer were not the appropriate bands for this report. I'm now using "title" and "last page footer".

 

The main question now is: How to force a page break when there is only space for the title but not for any records, so that the whole subreport starts on a new page?

Link to comment
Share on other sites

  • Solution

Hi bz3x,

try to make the size of your subreport image with something like 200pixel Height, so that will become the minimum size to start the band and the subreport object on the same page. So there's onlly less than 200 pixels on the bottom of the page, it will force to start from next page.

Hope it helps,

Olga

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...