diptypatil Posted October 10, 2007 Share Posted October 10, 2007 Hi , I want to print page numbers using jasper can u tell me how to use PAGE_NUMBER , i have used this: JRDesignTextField textPageNumber = new JRDesignTextField(); JRDesignExpression pageNumber = new JRDesignExpression(); pageNumber.setText("new Boolean(($V{PAGE_NUMBER}).intValue() == 1)"); pageNumber.setValueClassName("java.lang.Boolean"); textPageNumber.setPrintWhenExpression(pageNumber); footer.addElement(textPageNumber); but iam not getting any valie ....pleaase help me dipty Link to comment Share on other sites More sharing options...
C-Box Posted October 10, 2007 Share Posted October 10, 2007 When I understand you right, you want to display the pageNumber just on first page... But you just set the PrintWhenExpression and not the TextExpression. This should be something like "$V{PAGE_NUMBER}" of class Integer with evaluation time "now" for current pagenumber or evaluation time "report" for total pagenumbers. Don't know the exact syntax for adding it by code as I just use designer (iReport) for designing reports. :-) hthC-Box Link to comment Share on other sites More sharing options...
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