cancel
Showing results for 
Search instead for 
Did you mean: 

page count dynamically in adobe forms

Former Member
0 Kudos

Hi,

There is one requirement where they need to print number of pages based on data flow in internal table. to understand better the requirement here is one example as below:

for ex; there is one internal table in one page which has 1000 records, the internal table is designed on body page (Design view), on the same page there is one footer which say the current page number based on internal table data. say for ex: the internal table filled with 100 records in the first [page then it should print page count 1 then the remaining 900 records it fills the second page then it should print on the footer page count 2. similarly for last page it should print page count 10.

Note: 1 there is other master pages also but the counting of pages should be for dynamic data in the internal table.

Note: 2 the actually counting should start with value 2 initialization . means first page count should be 2, 3, 4, ... 11.

solution: do we need to write some code in the script. If yes please provide the code or is there any way to set the page count for that variable from that point onward with +1 page.

Please advise. Your answer will be highly appreciated.

Thanks,

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello,

Can anybody tell, is there any possibility to reset the system page count to 2 for any variable in adobe form. I need to count and print the page number for internal table data

Thanks,

Madhu

Former Member
0 Kudos

use java script for the page number element like

this.rawValue = xfa.layout.page(this); in layout: ready

Former Member
0 Kudos

Hi,

Could you please explain me where I need to write this piece of code in script editor on design view or in master page. I had already written a code on for that variable on master page layout:ready

data.#pageSet[0].NEG_PROD_FLOW.LINES.Subform6.PAGES_TEXT.GV_PAGE_COUNT2::ready:layout - (FormCalc, client)

form.NEG_PROD_FLOW.LINES.PAGES_TEXT

this.rawValue = xfa.layout.page(this);

this.rawValue = (xfa.layout.pageCount() - xfa.layout.pageSpan(form.NEG_PROD_FLOW.LINES.PAGES_TEXT));

but i need to start page count initialization with value 2. the first page should display 2

is that possible to do that.

please advise.

Thanks,

Former Member
0 Kudos

Hi friend,

In Adobe forms we need to do the page count manually only.

So you declare a variable and increment it by one after printing the internal table records.

So you can achieve your requirement.

Similarly for the second internal table you can declare a variable with initial value as 1 and then keep on incrementing else you can increment the variable before displaying and then print it.

I think you can understand what i am telling. You need to do it by code only.

If you face any issues please revert back to me i will help you.

Thanks,

Sri Hari