Yes there is. It would involve metadata and thus this solution wouldn't work if the form is executed on a PlanetPress Licensed printer (but it would in Optimized PostScript Stream mode).
Here is an example.
Let's say we have a Line Printer data file.
Let's say our goal is do display the name of the current client plus the name of the
next client on the same page.
Putting the name of the
current client on the page is simple: a data selection will do.
To put the name of the
next client on the same page, we need this name to be available.
To make this next customer name available on the current page, we first create a Metadata Field 'ClientName' with the current client name as the value. We make sure the metadata field is created at the job level and that the create action is 'Add Field' (not replace nor append).
We then refresh metadata. Taking a look at the metadata at the job level, we should view that there are now as many metadata fields 'ClientName' as there are data pages.
The trick is that on datapage N, we will display the value of the (N+1)th 'ClientName' metadata field. Here's how: on the page, we create a custom data selection with the following expression as the value:
=GetMeta('ClientName[' +inttostr( ¤t.metadatapage)+ ']', 0, 'Job')
Meaning: at run time, the value will be replaced by the value of the (¤t.metadatapage)th ClientName metadata field at job level, where ¤t.metadatapage is the index of the current datapage. Since metadata fields are zero-based, you don't need to add 1 to the datapage index.
So in the end, you end up displaying data from the Nth data page plus the value of the (N+1)th 'ClientName' metadata field.
Note that on the last datapage, the 'ClientName' value will be empty.
Hope this helps! If you are an OL Learn student, feel free to
request a webinar on this topic.
Benoit