Change pageCount for dynamic Form

Avatar

Avatar

dennis0512

Avatar

dennis0512

dennis0512

04-10-2019

Hello,

I am using Livecycle Desinger in SAP. Here i made a Form for working Hours of customers. When i call the Form say with 3 customers (all in one PDF), i have the issue that i am not happy with the pageCount. In most cases for each customer 2 pages are created (can be more). So for 3 Customers i get a PDF with 6 pages. So the numbering is "page 1 of 6", "page 2 of 6" … . What i want is to reset the numbering for each customer, so  i get "page 1 of 2" and "page 2 of 2" for each. I tried to Change the numbering in Pagination of the Masterpage, but as i have 2 Masterpages (Firstpage & FollowingPage), the result is not waht i want either.

I then tried to make my own pageCount and i get my desired result for customers with 2 pages. When a customer has more pages it is wrong. A Customer can get more than 2 pages, as there is a table that grows dynamically. If there are too many rows, another page is necessary. He then has 1 page with Masterpage "Firstpage" and 2 with Masterpage "FollowingPage". The second FollowingPage does not get a pagenumber. I guess it is because i cannot Access it properly with my Code.

In my Code i access the pages via pageSet something like "Form.pageSet[ i ].Masterpage.Subform.Pagenumber.rawValue = value". I guess if theer is more than one page in the pageSet i would Need to access the specific one something like "Form.pageSet[ i ].Masterpage[ j ].Subform.Pagenumber.rawValue = value". But this is not working.

Can anyone help me? Or can you provide me with a better solution?

Thanks in advance

Best Regards

Dennis

View Entire Topic

Avatar

Avatar

dennis0512

Avatar

dennis0512

dennis0512

06-10-2019

Hi radzmar,

I think your way is the right direction. My Form is build quite that way. I have two Masterpages. Just my data is not separated in two subforms as there are not just two, but like 300 customers. In the subform "STAR_FORM_DATERANGES_DATA" includes the main data (the other subforms are for hierachy reasons). On my first Masterpage (Startseite) there are two Content Areas "Header area" and "main area". The data subform "Header" is places in Content area "Header area", "star_month_per_gen" is placed on the the "main area" and Overflows into the second masterpage (Folgeseite), if there is not enough room on the first page. The subform "Tagesergebnisse" is growing according to each customers data. Every customer starts with on page of Masterpage "Startseite" and then Overflows into Masterpage "Folgeseite".

When i now use your code to get the pageSpan of "Star_FORM_DATERANGES", it is always the same, i think it is the pageSpan of the last customer. so if i have 3 customers with customer1 haveing 2 pages (1 Startseite, 1Folgeseite), customer2 having 5 pages (1 Startseite, 4 Folgeseite) and customer3 having 3 pages (1 Startseite, 2 Folgeseite) every page geht's the pageSpan 3.

Do you know why this happens? Do i do something wrong?

Thank you for your help, really appreciate it

P.S.: Here my hierachy:

Hierarchie.PNG