Jump to content

Global and per group PAGE_NUMBER: exists a easy way to get these?


pablodc

Recommended Posts

Hi,

    In a report with a group I need to show the GLOBAL page numbers (i.e: 1 to 10) and a per group page numbers, i.e if my group have five items I must show in the group header page 1/2 per each group (if each item take two pages obviously).

    I have solved this, but I consider that in a poor way. I have open this thread to ask a more experienced JR programmer/designer if there are a more optimal way to get this done.

    My way:

    <variable name="GROUP_PAGE_COUNTER" class="java.lang.Integer" resetType="Group" resetGroup="group_id" incrementType="Page" calculation="Sum">        <variableExpression><![CDATA[($V{PAGE_NUMBER}.equals(new Integer(1))?new Integer(2):new Integer(1))]]></variableExpression>        <initialValueExpression><![CDATA[new Integer(1)]]></initialValueExpression>    </variable>

     A better method? anyone?... thanks a lot.

PS: I have attached a working example to ilustrate this.

Grettings from Argentina!



Post Edited by pablodc at 12/11/2010 22:32
Link to comment
Share on other sites

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