Jump to content
We've recently updated our Privacy Statement, available here ×

Knowing the total number of pages in an expression


Smig

Recommended Posts

I want to print a value only on the last page but I want to put it on the page footer band (unless I could change the band order which I don't think I can). In order for it not to print in every page, I need an expression in "Print When Expression" that will be true only on the last page. Something like "this_page==last_page".

I know I can get the actual page number with $V{PAGE_NUMBER}, and I can get the total pages with the same variable but setting the "Evaluation Time" of the text field, to "Report". So, how can I get this variable inside an expression returning the value with a different evaluation time than the default (which is "Now", I presume)?

Or are there other ways to do what I want to do?

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thank you for the suggestion.

The problem is that I need this particular information in the same band as other things that need to repeat on every page. If not, it should at least be on top of those, so I could put it in the last page band if it was on top of the page footer band but I don't know if I can change the order of the bands.

Link to comment
Share on other sites

What you can do in LAST PAGE FOOTER is, put all the other things that you want to show in the normal page footer along with this "special" something you want to print above them.

 

So the page footer and LAST PAGE FOOTER will be the same except the last page footer has this extra value.

 

 

 

Link to comment
Share on other sites

That solved it. Thanks!

 

I was assuming both were printed because the page footer band was being printed in the last page of my report, but I guess that was because I deleted the last page footer band.

 

The software is more clever than I thought ;)

 

Even though I solved the problem, if someone knows how to make that check, post here. Then I would avoid duplicating information in the report's design.

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