2
votes

I have a report set up like so:

Title band: A jFree chart (in a subreport)
Col. Header Band: Headers for the detail band/table
Detail band: The details/table
Summary band: Some summary data (variable calculating results of the detail band)
Last Page Footer Band: Disclosures/legal text

The problem I am trying to fix ist when the detail band happens to end at the bottom of a page.

The summary band and Last Page Footer band appear on a new page with the column header, which does not make sense because the column header only describes the detail band.

How do I prevent the column header from appearing if there is no detail on the page?

My company is using Jasper Reports Server 2.0.5 and will not be upgrading, unfortunately.

Thanks very much!

1
Does it depend on "Split type"? Did you check the same report with 6.x version of JasperReports (just for check, it is really interesting I think)?Alex K
All I see is "splitAllowed" with T/F as my options.Mike O.
@Alex I am stuck with same problem, any solution?Niranjan Kumar
just in case you haven't solved this yet or anyone who has similar problem, i found a solution here community.jaspersoft.com/questions/513020/…, look at netshowers' answerBlablabla
@MikeO. did you find any solution?AngelAvila

1 Answers

-1
votes

If you want column header to be displayed once or only in first page, then apply this code only in column header band's expression.

$V{PAGE_NUMBER}.intValue()==1

If you wanna hide column header itself when there is no detail band value then send a parameter from java to report

parameter.put("isDetailBandExists",isExists);

Use the print when expression in column header band and provide the below to

new Boolean(( $P{isExists} == false ))