Jump to content
Changes to the Jaspersoft community edition download ×

Print "continued" when detail overflows.


Recommended Posts


I would like to print a "continued" text but only when the detail overflows to the next page.

Here is an example of what I would like to achieve:

Section 1 

<Section 1 details>

--- Page Break ---

Section 1 (continued)

<Section 1 details continue>

Section 2 

<Section 2 details>

--- Page Break ---

Section 2 (continued)

<Section 2 details continue>

Does anyone know how I can do this? I've been playing around with the Print when detail overflows option. But that gives me the same header on every page.



Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

I've done something similar some years ago... but this was at my old work, so I can't access the JRXMLs any more.:-(

But when I remember right, I've used a "Dummy" SubReport for the actual detail record and within the SubReport I placed the "continued" String as StaticText-Element in the ColumnHeaderBand. The PrintWhenExpression for the ColumnHeaderBand should be "$V{PAGE_NUMBER}>1" so that your "continued" is just displayed at following pages for the rendered detail record and not already at the first starting (SubReport)-Page. As the internal PAGE_NUMBER variable is just incremented for each SubReport independently, you will get for the next detail record a new SubReport and so on.

If two (detail) records fit at one page, each SubReport won't print it's ColumnHeader because PAGE_NUMBER is always 1 for each SubReport. :-)

Can't verfiy if this works as I said at the beginning, but perhaps you could give it a try :-)

hth + regards from Dresden/Germany


Link to comment
Share on other sites

  • 3 years later...

Yes it worked. but in addition to it.. i need to display the " continued in next page" in the footer if the detail band breaks. Any solutions around it.. Currently i have give it in column footer band of subreport. As it dont have any conditions to it. it displays even the data in detailband dont overflaws.

Link to comment
Share on other sites

As the PrintWhenExpression should be evaluated always at NOW you can't hide it via a PrintWhenExpression BUT you could give that FooterTextField an EvaluationTime at "Report" (so if you are working with the DummySubReport) and try to use an "inline" IfThenElse TextExpression alá:

$V{COLUMN_COUNT} >1?"continued in next page":""[/code]

(not sure if it was column or report count, just try)

Just give it a try... it's quite some years ago, when I made it. But I know it can work.

regards from snowy Dresden/Germany



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