Reset the page numbering in Master Page ( 2 or 3 pages)
Hi All,
If you are a regular visitor of Adobe Forums thread, you might have seen a question raised on resetting the page numbering in master pages.
Well, while working on one of the requirement myself and my team at igate came across a very challenging requirement. We had 3 master pages, out of which we knew that the pages which belonged to 3rd master page are fix. But pages which belonged to 1st and 2nd master page were dependent on some conditions, hence total page count could increase or decrease wrt conditions. We had a scenario, where we had a Bank copy, client copy and T&C block. So when we execute our form, it should print all the three copies in the same document. Lets say our Bank Copy has 30 pages, Client Copy has 30 pages, t&c copy has 10 pages so in all total pages were 70. In our case it was printing page numbering as Pg 1 of 70 till Pg 70 of 70.
But we wanted it to print
Bank Copy: Pg 1 of 30 till Pg 30 of 30
Client Copy: Pg 1 of 30 till Pg 30 of 30
T & C Block: Pg 1 of 10 till Pg 10 of 10
in same document.
After doing a lot of brain storming, we thought of calling the Adobe Form twice from our driver program. Here is what we did,
We defined 2 more variables in our interface:
1. Display Type Char1
2. Pgcnt Type Pages (FPFORMOUTPUT)
Then we used these variables in our form. We will call the form and send X as an input value to Display field. In form calc, we wrote a script that when ever Display.rawvalue is X then hide T & C Block. Hence we will get the total number of pages from the Bank and Client Copy in our return FPFORMOUTPUT-PAGES. As they will always be equal, so if we gets lets say 60 as a return value, this automatically means that Bank Copy has 30 pages and Client Copy as 30 pages. Then we will close the JOB. NOTE: When we call the form for very first time, make sure you suppress everydialog and suppress the print preview also. Then we call the form again, now passing the value we received as 60 into Pgcnt vaiable defined above. Using this 60 and collecting it inside the form in a variable or hidden textfield, we can write our own custom Page {floatingfield1} of {floatingfield2} numbering. Floating field 1 should be a numeric value starting with 1 and incremented by 1, while floating field 2 is our value (60) which we colleceted divided by 2 for Bank Copy and Client Copy.
Please let me know if you all need more details.
Rgds,
Nitin.
Hello Nitin Bhatia,
I am so glad that I found your blog. I have same requirement as I posted below:
Form layout and reset page number | SC
Reset Page Number to 1 ,To make it similar to O... | SCN
In my requirement, I will have Master Page 1 print customer address in landscape format and always fix 1 page.
Master Page 2 is let's say the Bank Copy with portrait orientation
I also need Client Copy with same orientation.
Do I need to put the Client Copy in Master Page 3 or should I put it in a new body page sharing same Master Page 2.
It must be in same continuous document, I will need to print on Bank Copy Page 1 of 2 and on Client Copy will be Page 1 of 2 also and both Bank copy and Client copy will have same number of pages.
You mention call the form twice. Can you explain more details for me with code sample,
If you call the form twice, would it will be in one spool output or 2 separate spools? In my print program, I will need to process multiple documents, so for each documents, I have to call twice?
Regarding: In form calc, we wrote a script that when ever Display.rawvalue is X then hide T & C Block. Hence we will get the total number of pages from the Bank and Client Copy in our return FPFORMOUTPUT-PAGES --- Which event that you wrote the script in Form Calc ?
Your suggestion is greatly appreciated.
Hi Nitin Bhatia,
I have a similar kind of requirement, I tried the solution which u have provided but it did not help me.My requirement is as explained below.
For given Shipment number I need to display the list of deliveries and its detail in the item table (shipment number per page)
For Example
Shipment-1 has 12 Deliveries
Shipment-2 has 14 Deliveries.
Consider in one page 10 line items are displayed
So
Shipment-1 will print on page 1 and Page 2
Shipment-2 will print on page 3 and page 4.
I have achieved this by using conditional break on shipment number.
My Problem is with displaying the page number
As per my requirement
Page number for Shipment-1 should display as 1 of 2 & 2 of 2.
Page number for shipment-2 should display as 1 of 2 & 2 of 2 respectively.
But it is printing as
Page number for shipment-1 as 1 of 4 & 2 of 4.
Page number for shipment-2 as 3 of 4 & 4 of 4.
Kindly suggest / help me in achieving my requirement.
Waiting for your kind reply
Thank You 🙂
Have you got any solution for this, I have the same requirement, but have not received any help so far,
https://answers.sap.com/questions/276453/restart-page-numbering-for-paginated-forms-at-cond.html
Please let me know your solution ?