Jump to content

Recommended Posts

Posted

HI

     I am using IReport for desighing Jasper reports.I am new i Jasper report. I want to know how to get total number of pages and based on this how to hide/show contents on page.

One more question can i extract variables,parameters and feilds of jasper report in java code?

Pleas help me its argent

 

thanks in advance.

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted

Get total pages:

        Create a variable like:

         <variable name="totalPages" class="java.lang.Integer" resetType="None" incrementType="Report">
          <variableExpression><![CDATA[$V{PAGE_NUMBER}]]></variableExpression>
    </variable>

Based in variable totalPages to hide/show contents on page:

           In some element of page set in property 'Print When Expression' a expression, for example: ($V{totalPages} == 1) || ($V{totalPages} == 2) || ($V{totalPages} % 2 == 0)

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