Problem in my interactive report


Hi everyone ! I'm new to jaspersoft and I wanted to create an interactive report  (based on an AdHoc view) with a template so I followed this tutorial and at the end everything is working fine but  my template don't display the correct number of pages (page 1 of 1 while there are 5739 pages !).

Is there a solution to display the correct number of pages in my report ?


jeanpierrepolnareff91's picture
Joined: May 22 2019 - 1:10am
Last seen: 2 weeks 23 hours ago

Ok I forgot, that you are using the JasperServer and your posted design is just an Template ... I'm not familiar with that, as I just use the "good old" JasperReports library in standalone (ERP) Java applications.

So I assume it's a bug .. or a feature!?!? Perhaps "adhoc" views were not designed to have multiple pages and are more for html "endless" scrolling thought!!?!?

But as I said, here my knowledge ends - sorry guys.

Perhaps a staff member or the "power poster"  Hozawa has a solution!??!



C-Box - 3 weeks 4 days ago

5 Answers:


You need to use the "Page X of Y" palette component which is a composite element made out of two textFields with different evaluationTime setting for each. After you drop the component and inspect the JRXML you should see something like this in the Source tab:

    <reportElement x="354" y="14" width="100" height="30" uuid="5fa7916e-f99d-4bdf-b28f-fc08c8ed99f8"/>
    <textElement textAlignment="Right"/>
    <textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression>
<textField evaluationTime="Report">
    <reportElement x="454" y="14" width="100" height="30" uuid="84dcff42-e5e3-4309-877c-020f91153bdc"/>
    <textElement textAlignment="Left"/>
    <textFieldExpression><![CDATA[" of " + $V{PAGE_NUMBER}]]></textFieldExpression>

EDIT: Regarding the repeating footer issue, this happens because the crosstab ends-up in a Summary band for which the footer band does not repeat when it overflows.

To overcome this issue, once you have added the Page Footer band with the pagination textField(s) you need to set the report property:

Summary With Page Header And Footer to true, in the Report Properties tab, in JasperSoft Studio, or manually edit the JRXML by adding:

isSummaryWithPageHeaderAndFooter="true" to the top-level jasperReports tag:

<jasperReport xmlns="" ...  isSummaryWithPageHeaderAndFooter="true" ... uuid="31ce6514-6e4a-4667-a352-02d0b047a48b">

narcism's picture
Joined: Nov 22 2010 - 12:39am
Last seen: 2 hours 46 sec ago

Thanks narcism, it seems to work now but my footer is only in the first page, not in the others.

Is there a way to display my footer on each page of my interactive report ?

jeanpierrepolnareff91 - 3 weeks 5 days ago

In what band did you place those elements?

narcism - 3 weeks 5 days ago

I placed them in the page footer band

jeanpierrepolnareff91 - 3 weeks 5 days ago
show 1 more...

By the way, is it even possible to display the footer page band on a each page of a JasperReports Server report ? (I assume that it doesn't work the same way as a classic jaspersoft studio report) 

jeanpierrepolnareff91 - 3 weeks 3 days ago

Use these two bands (see image)

yfattibene's picture
Joined: Apr 10 2019 - 7:28am
Last seen: 3 days 18 hours ago

What band have you used for placing the PagerNumber variables? It should be the page-footer of the (main)report, as this is printed at every page at the bottom. 

By the way.... the "newer" versions of JasperReports have also a builtin variable $V{MASTER_TOTAL_PAGES} and $V{MASTER_CURRENT_PAGE} that you could place into just ONE textfield that you also could nicely align right, as the "two-field-logic" (suggested above by Narcism) always was a bit "buggy" when you would like to arange your page numbering on a right border/line or on other right aligned fields.

So try you place your field into page-footer and use this as expression:


hth + regards


C-Box's picture
Joined: Jul 19 2006 - 5:58pm
Last seen: 21 hours 4 min ago

I tired your method C-Box but i got only page null of null output :

But even if it worked, I still have a problem, I can see my footer page only in the first page of the interactive report :

jeanpierrepolnareff91 - 3 weeks 5 days ago

You must set the EVALUATION-TIME of the TextField to "MASTER" ... that I've forgot to mention, sorry!

And because of your missing PAGE_FOOTER at the second and ++pages ..... are you sure, that you placed it into the PAGE_FOOTER? is your Table/Data rendered later in a summary band? If so, just set at report-level, that the summary also should be printed with pageheader/footer.

Otherwise just post your JRXML

hth + regards


C-Box - 3 weeks 5 days ago

Thanks for your help C-Box ! The textField with MASTER variables works, but i don't know how to fix my other problem, I'll post the JRXML here and I will try to fix it later.


JRXML File and code :




jeanpierrepolnareff91 - 3 weeks 4 days ago
show 1 more...

Your jrxml just contains PageHeader and PageFooter... but no other elements on no other bands!?!?!? Have you deleted the CrossTab from it???? (as I see some crosstab styles at the beginning at the jrxml)

regards again


C-Box - 3 weeks 4 days ago

I have the same problem jeanpierre, my page footer is only displayed on the first page

arnaudsimon091's picture
Joined: Nov 26 2018 - 12:25pm
Last seen: 1 week 3 days ago

I haven't deleted crosstabs etc in my JRXLM C-Box, in fact I just followed the tutorial (

I have downloaded a JRXML template on the server and adapted it to my needs.


jeanpierrepolnareff91 - 3 weeks 4 days ago

Indeed, it could be a feature, after all reports created in JasperReports Server aren't the same as those of Jaspersoft studio.

I will try to reach Hozawa or a staff member, thanks you again C-Box for your help !

jeanpierrepolnareff91's picture
Joined: May 22 2019 - 1:10am
Last seen: 2 weeks 23 hours ago