Border in Detail band

ireportjasper-reports

I have a question about how border should display in detail band, and I would like to get some help.

Say, a column in detail band that might have LOTS data, by lots, I meant sometimes a single record might actually took 2~3 page to display.

Now customer ask that we should make report always display bottom line of the border as long as it meets end of page (even this record its not end yet)

What I tried:

  • Make a column footer with 1px height line.
    Set "Floating column footer" to TRUE.

    Result : It works great, but this line will make extra empty space at end of the table if there is a Summary band after the column footer. I think I am close, but I just can't get rid of the strange empty space

  • Make a Frame with border, set "Print when detail overflow" to TRUE then put everything in detail band into this frame.

    Result : Not work as I expected 🙁

Since this report contains not just a table in detail band, and the height of the table are random. Tricks like a border in Background or Page Footer are not suitable here

What else can I do ?

Best Answer

The option given by Dave is right.

If you care about the space still being used, then set the band and textfield heights to zero.

In my case using Dave's option worked (and I needed no extra space to be used).

I put this as PrintWhenExpression in the fields I just wanted to show in the last page:

$P{REPORT_PARAMETERS_MAP}.get("lastPage")!=null

And this as PrintWhenExpression in a 0-height textfield in the 0-heigth summary band:

$P{REPORT_PARAMETERS_MAP}.put("lastPage",":)")
Related Topic