Page Variable in Footer [message #1783090] |
Wed, 07 March 2018 12:09 |
Eclipse User |
|
|
|
I'm working on a report that is a catalog of services. Each item in the catalog has a number of fields: name, description, pricing, contacts, etc., most of which are stored in the database as CLOBs. The body of the report consists of a list element that begins with the name, which is a varchar in the db and a data element in the report. That's followed by full-width bands of alternating text label and dynamic text pairs, each dynamic text object binding to one of the CLOB fields in the dataset.
This all works fine. It provides a report that displays each item in the catalog on a dynamic number of pages depending on the length of the CLOB data stored in each field. The problem is that when the reader is on any page other than the first for a given catalog item (the page where the item name is displayed) there is no way to identity the catalog item described by the information on the page.
My solution for this is to print the appropriate item name in the footer of every page. I have, however, thus far been unsuccessful in making this happen. I created a page variable, ServiceName, that's bound to an auto-text object in the master page footer. I've tried numerous ways to set the value for that object, the most recent being a simple:
"reportContext.setPageVariable("ServiceName", row["Name"]);" script entry for the onPageBreak event of the list element.
The ServiceName prints correctly on the first n pages but is always incorrect on the last page for each given catalog item. The ServiceName for the next catalog item in the dataset invariably prints on the last page of the preceding item.
I also tried entering the script to set the value in the onPageBreak event for the actual "name" data element, but that method resulted in the ServiceName only being printed on the first page, which is where the name is already printed as the first object of the list. The ServiceName was blank for all other pages of the catalog item.
I hope this is understandable. Any suggestions will be greatly appreciated.
Thanks,
Dave
|
|
|
Powered by
FUDForum. Page generated in 0.02987 seconds