sumitotari09 Posted November 25, 2015 Posted November 25, 2015 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.
kati_gomes Posted November 25, 2015 Posted November 25, 2015 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)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now