fabioebner Posted May 5, 2017 Share Posted May 5, 2017 I need to receive one parameter with the max number of page(sample 100), so when the page_number reach that number(100) the page_number need to be reset and back to 1 it`s possble? tks Link to comment Share on other sites More sharing options...
Siddharth Kothari Posted May 6, 2017 Share Posted May 6, 2017 Yes, it is possible.Let's say your paramter is "P_MAX_Page" which stores maximum number of pages.Then you just need to create a variable as follows which will store reset page number:Name: V_PAGE_NUMBERValue Class Name: java.lang.IntegerExpression: $V{PAGE_NUMBER} % $P{P_MAX_Page} == 0?$P{P_MAX_Page}:$V{PAGE_NUMBER} % $P{P_MAX_Page} Link to comment Share on other sites More sharing options...
hozawa Posted May 7, 2017 Share Posted May 7, 2017 Just create am Integer parameter $P{maxPages} and set your page number as follows. Note that this will error if maxPages value is less than 2.(($V{PAGE_NUMBER}-1) % $P{maxPages}) + 1 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