Jump to content
Changes to the Jaspersoft community edition download ×

Dynamic report footer using scriptlet


Recommended Posts

At first I didn't think this would be too bad but maybe I'm just doing it wrong.


We are creating invoices (2 pages per customer). The 2nd page is a subreport in the first. I need to get different text at the bottom of the report footer for each page (Customer Copy vs. Company Copy). I created a variable in the main report 'copy' and I though that I could just use a scriptlet to set the value. The problem is that the main report scriptlet shows the variable being set but the report does not show it. I've tried in beforePageInit, afterPageInit and many more:

this.setVariableValue("copy", "Customer Copy"«»);


The report always just shows null.


Also, this variable is set in the outside 'main' report but the subreport doesn't have access to the copy variable.


Basically what I am looking for is for when the first page of the report runs the 'copy' variable says 'Company Copy' and when the subreport runs it changes the footer to say 'Customer Copy'. Both pages can be multiple pages long so I cannot use the page count.


ANY help would be greatly appreciated.



Link to comment
Share on other sites

  • Replies 1
  • 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...