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

jjcapa

Members
  • Posts

    2
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by jjcapa

  1. Hi! I know this thread is a bit (well, quite) old, but just in case someone is searching for this issue. The easiest way to get the number of total pages is by defining a variable with the next attributes: Name: total_pages (or any other)Variable class: IntegerCalculation: highestReset type: reportIncrement type: pageVariable expression: ${PAGE_NUMBER}[/code]I hope this may help.
  2. I think there are various different approaches to this issue. The most intuitive one is setting the group's property "Start on a new page" to true and defining the "Print when expression" with some condition you want to be true for printing the group. Grzewal expose this approach in his answer. Unfortunally, it didn't work for me. The way I managed to make it working is this one: I defined a group and inside it, a break element. Instead of setting the Group's "Print when expression" and "Start on a new page" properties, I left them as default and I set the Break's "Print when expression" property with the conditions I wanted. In my case, printing a new page break depending on the value of a specific field. I also wanted to print a page break at the end of the detail, so this one could keep isolated from the others pages. <group name="group_name"> <groupExpression><![CDATA[$F{content}]]></groupExpression> <groupHeader> <band height="1"> <break> <reportElement x="0" y="0" width="100" height="1" uuid="b302b3ee-53f3-4926-8049-f75a5d1eae58"> <printWhenExpression> <![CDATA[$F{newPage} == true && $V{PAGE_NUMBER} != 1]]> </printWhenExpression> </reportElement> </break> </band> </groupHeader> <groupFooter> <band height="1"> <break> <reportElement x="0" y="0" width="100" height="1" uuid="aabaf6fd-61c1-484c-8125-e44a69ec6975"> <printWhenExpression> <![CDATA[$F{newPage} == true]]> </printWhenExpression> </reportElement> </break> </band> </groupFooter></group>[/code]
×
×
  • Create New...