Jump to content
Changes to the Jaspersoft community edition download ×

blank lines between title and detail


jo_atman

Recommended Posts

I have a report consisting of a few subreports, with the order of the subreports being changeable.

the guilty subreport has a title and a detail area (with the detail area having quite a bit of content).

If the guilty subreport is put ahead of all the other subreports, it shows up fine.

however, if it is stuck in the middle, the title shows immediately after the previous subreport, then the remaining page is blank, and the detail of the subreport starts on the next page.

e.g.

 

Code:
guilty subreport first    guilty subreport in middle
------- page 1-------- -------- page 1 ---------
Report title Report title
guilty subreport title Other subreport title
guilty subreport detail Other subreport detail
... ...
... ...
... ...
next subreport title guilty subreport title
next subreport detail **** blank line ****
... **** blank line ****
... **** blank line ****
--------page 2 -------- --------page 2 --------
... guilty subreport detail
next subreport title ...
next subreport detail ...
...
...
...
------- page 3 --------

i have looked at all the parameters i could think of, but can't find the problem.

anyone have any ideas what might be causing this?

Thanks,

Nilesh

Code:
[code]

Post edited by: jo_atman, at: 2006/10/23 20:24

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

it's me again.

Ok, so after debugging through the src, the reason is clear. the detail for the subreport is too big to fit on the remainder of the page, so a page break is introduced.

So the simple question is, how do i say that it's ok for the detail to span across multiple pages, so that it continues the detail from the current page instead of starting on a new page?

Thanks,

nilesh

Link to comment
Share on other sites

The JR engine does not start to render a band unless there is enough space on the current page to fit the band's declared height. You could add a feature request for this if you consider that it would be useful to others as well.

 

In the meantime, you can take the following approaches to workaround your layout issues:

  • If you have stretchable elements (like text fields or subreports), set their height to something small and set the position type of the elements beneath them to Float. This would allow you to reduce the detail band height.

Create dummy groups and use the groups headers/footers to split the detail band into multiple bands.[/ul]

 

HTH,

Lucian

Link to comment
Share on other sites

Lucian,

Thanks for the clarification and the suggestions.

 

I have a related question:

If i happen to create a page that's just too big (e.g. i add so many elements on a 595 X 842 page that the required height goes beyond 842), will i get a compile error, or would it throw a runtime error?

Thanks,

Nilesh

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