Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Header data is displaying only on first page for each item but not on Overflow page of that item

Hello Experts,

          I will be having multiple headers and multiple items. On each page header data is displayed on the top, in the middle part some text is displayed and the  item data of each group will be displayed in the bottom. Each new group of items should start from new page. When the item doesn't fit in one page, it should overflow to next page and the corresponding header information should also be displayed with same layout. This process repeats for each group of items.

          In my case, all group items are overflown to next page perfectly but the header data is displayed only once for each new group of items. But when these group of items are overflown, header is not displayed.

I have created 2 tables. Header table and Item table. And in context node I have created Loop on header and inside that I have created loop on Item table with where condition. For each header, item group is filtered correctly.

I have created one Master page since I am having same layout on overflown page as well. On the top I have designed my header data in text labels and I have bind this to my header data.

In bottom I have the container "Cont". So this container I have designed in the Design view. The have dragged and dropped the item data in the container. The item data acts as sub form. Sub form is flowed.  Here in place "Following previous" and after "Continue Filling parent" and repeat data for each item with minimum 0 and max is blank. This data sub form is wrapped in another sub form and is bind to item table. Sub form is flowed and after overflow I have given as same container "Cont". And place I have given "On top of container "Cont"" and after "continue filling parent" and repeat data for each item with minimum 0 and max is blank.

For each new group of items new page is triggered correctly and when items don't fit on one page, those are overflown correctly but the header data is getting printed only on first page of each new group of items and not on overflown pages. 

Please help me where I am missing.

Thanks in advance.

Former Member
Former Member replied

Now the problem is solved. This can be done by bit of tweaking using JavaScript.

Actually the problem was, the header was printing continuously in subsequent pages and once the header data was over the rest of the pages contained blank header. But we need have to print same header for each group of items till that group of items finish in the specific page. And for new group of items different header will be filled and so on.

So to overcome this issue, create the item table in such a way that the header data is also included in the item table for each group of items. In the layout, select your header field and the event READY LAYOUT and write the below JavaScript code. This event is called for each page for that header field, so you can directly map the item table value and put it in your header field.

// Get the current page

var currpage =;

// variable to store number of fields in that page.

var fields = 0;      

// Get the number of fields

        fields = xfa.layout.pageContent(currpage-1, "field", 0);

// Loop on each field on the page

        for ( i=0; i<= fields.length-1; i++ )


// Check if the field is in the item table column (it will be actually header data column in your item table)

            if ( fields.item(i).name == "TL" ) 


// Fetch that value and store in your header field.

                       this.rawValue = fields.item(i).rawValue;



1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question