Jump to content
Changes to the Jaspersoft community edition download ×

Header displayed on page without detail


2004 IR Help

Recommended Posts

By: Frank Jacobs - forkjake

Header displayed on page without detail

2005-01-21 06:58

I have a situation where a header is being displayed on a page when there is no room to display the detail. This results in the header sitting on it's own with no detail.

 

The situation is this: I have a master report that has a group. Within this group it is including a subreport . The subreport contains a header section and two groups. The logical layout is like this:

 

Master report

-- Group Foo

-- Subreport

-- Group 1

-- Group 2

-- Page Header

 

Previously, I was able to get around this problem by specifying the minHeightToStartNewPage in 'Group Foo' of the master report. I would set this value equal to the size of the content of 'Group 1' in the subreport. However, our requirements have changed so that now I won't know for sure how long the content of Group 1 will be. Hence, I can't use the minHeightToStartNewPage technique.

 

Is the fact that JasperReports is displaying a header when there is no room for detail a bug? Or, is this is how it is designed to function? If it is a bug, I'd be curious if anyone has an idea how difficult this will be to fix. If it doesn't sound too difficult to fix, perhaps I will dive into the code and attempt to fix this problem. Any other ideas?

 

Thanks. :-)

 

 

 

 

By: Frank Jacobs - forkjake

RE: Header displayed on page without detail

2005-01-31 14:30

I think I'm going to attempt making a code change to resolve this issue.

 

I need to determine where in the code:

 

1. The page header is filled/displayed.

2. How to determine the size of the current group that is about to be displayed.

3. How to determine how much space is left on the page.

 

Based on #2 and #3, I can add logic as to whether to display the header.

 

If any gurus out there could give me a headstart in terms of classes to target, that'd be most appreciated! :-)

 

So far, it appears that for #1, I should examine the fillPageHeader method of the JRVerticalFiller class. Am I on the right track?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...