Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Jasper report - How could I store the total number of pages of a report in a custom variable ?

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Jasper experts,

I'm aware that if I want to know the current page number of a report, I have to use the built-in variable PAGE_NUMBER and set the evaluation time property to 'Now', while if I want to get the total number of pages of the report, I have to use the same built-in variable PAGE_NUMBER, but set the evaluation time property to 'Report'.

So far, so good.

However, I need the value of the total report pages in a custom variable, so that I can use it, for example, in a "print with condition" property, in order to decide to print or not an header, depending on that value.

How can I do that ? The evaluation time property is not available for a custom variable; is there a tricky way to circumnavigate this problem ?

How would you store the total number of pages of a report in a custom variable ?

Regards,
Sergio.
 
Wink, wink, nudge, nudge, say no more, it's a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!