I have a requirement to insert a blank page if the last page number in the group is odd so i'm trying to use the below syntax but its not working:
<?if:page-number mod 2 != 0?>
The number of pages in my report is 5, and If I put 5 instead of page-number in the above code, the blank page gets inserted, but it seems that page-number is not getting recognized in the IF condition, and if I put <?fo:page-number?> instead of page-number in the if condition, I get an error.
How can I write an if condition based on the current page number?
Try using the below command
Have a condition before you group
even-skip-page-count ---> contains <?section:force-page-count;'end-on-even-layout'?>
When you want to handle the suppression of the even pages from the total number of pages
you can use the following command within the even-skip-page-count form field --> <?section:xdofo:blank-on;'even-skip-page-count'?>
If this helps you then please mark the answer as "correct" or else "helpful"
Thanks for your answer, I tried it but it didnt give the desired output, I have many groups in my RTF and I want the condition to apply on the one of the detail groups since the page number resets everytime once the master record changes.
My solution works only if I can include the page number in the IF condition, is there any way to do that?