cancel
Showing results for 
Search instead for 
Did you mean: 

Page count in smartforms

former_member190178
Participant
0 Kudos

Hi Experts,

I have some vendors in ITAB! and line items corresponding to these vendor are in ITAB2.

I have putting loop on ITAB1 and inside it I am putting loop in ITAB2.

Now for vendor 1, its page count should be:

if line items comes in 2 pages than:

than at the bottom of the page counting should be like.

Page 1 of 2

Page 2 of 2

Now if vendor 2 exist than again for this vendor say this vendor has 3 pages than.

Page 1 of 3

Page 2 of 3

Page 3 of 3.

Please help...

-=soni=-

Accepted Solutions (0)

Answers (6)

Answers (6)

jay_dalwadi
Participant
0 Kudos

&SFSY-PAGE& of &SFSY-FORMPAGES&

Former Member
0 Kudos

&SFSY-PAGE& Which inserts the number of the current print page into the text.

&SFSY-FORMPAGES& Displays the total number of pages for the currently processed form.

to satisfy you req,

use &SFSY-PAGE& of &SFSY-FORMPAGES&.

Note : Make sure you put above line inside text node in a final window, because you need the total no. of pages in sfsy-formpages and that is possible only after all the processing is done.

If you put anything in a final window, it is processed after the main window processing is done.

Edited by: aashrith on Dec 30, 2011 8:03 PM

madhu_vadlamani
Active Contributor
0 Kudos

Hi Soni,

I think this is a basic question.Did you try with system fields.It is asked number of times just go through the forums.

Regards,

Madhu.

Former Member
0 Kudos

Hi,

your are creating two pages right, in that first page on main window you are giving loop. and second page also you put the loop.

you are expecting output like this 1 of 2 pages and 2 of 2 pages ....

syntax is : &sfsy-page& of &sfsy-formpage&.

be sure with your program on first page loop should end with first page itself. don't move to second page. but you are creating second loop on second page check that. because main window of the first page loop extended if more data available.

Thanks & Regards,

Chinni.

Former Member
0 Kudos

Hello friend,

Just use these system fields alone which satisfies your requirement.

&SFSY-PAGE& Which inserts the number of the current print page into the text.

&SFSY-FORMPAGES& Displays the total number of pages for the currently processed form.

This allows you to include texts such as' Page x of y' into your output

This is enough to achieve your requirement. Still if you have queries please revert page i will help you.

Thanks,

Sri Hari

mithun_shetty4
Contributor
0 Kudos

Create 2 Pages

In General attributes of first page select the mode as initialise counter. " Next page would be Second page"

second page select the mode as increment counter. " Next page would be same page"

when the processing for one vendor ends create a command node to jump to first page.

use

&SFSY-PAGE& for the current page number

&SFSY-FORMPAGES& for the total number of pages in the form