I create a report with contacts that span different pages.
I used to have isSplitAllowed set to true. But I do not want the contact divided into different pages. So I set it to false, the report layout looked much better. However, he introduced a new problem:
In my heading, I type the name of the first person and the last person on the page. When a contact moves to the next page, it is still being processed on the current page. So let me say that Bob should have been at the bottom of the first page. But to prevent it from splitting, Bob is now the first element of the second page. However, in the title of my first page, I still have Alice ... Bob (where Alice is the first person on the first page). And on my second page, I still have Brenda ... Doug (where Brenda is now the 2nd person of the 2nd page, and Doug is the last person of the 2nd page).
My output is in the header [$ V {pageFirstItem} + "..." + $ V {pageLastItem}]]>
where pageFirstItem:
<variable name="pageFirstItem" class="java.lang.String" resetType="Page" calculation="First"> <variableExpression><![CDATA[$F{lastName}]]></variableExpression> <initialValueExpression><![CDATA[$F{lastName}]]></initialValueExpression> </variable>
and pageLastItem:
<variable name="pageLastItem" class="java.lang.String" resetType="Report" calculation="Nothing"> <variableExpression><![CDATA[$F{lastName}]]></variableExpression>
source share