This discussion is archived
11 Replies Latest reply: Jul 31, 2013 9:07 PM by jagadekara RSS

How to reset page number

611280 Newbie
Currently Being Moderated
I have a purchase order template (RTF) which works fine for single PO but when i have multiple PO, page number doesn't get reset at the end of each purchase order and it keeps going.
How can i reset page number at the end of each PO
  • 1. Re: How to reset page number
    524753 Guru
    Currently Being Moderated
    If you using the for-each , then use for-each@section,

    this @section context will reset the page number for each.

    to know much abt @section, read user guide , for @section .
  • 2. Re: How to reset page number
    611280 Newbie
    Currently Being Moderated
    Hi vetsrini
    thanks for the quick respond. basically i did what you said and i also looked at the documentation on XML publisher. however i still couldn't get this page number to work.
    so to review i used Insert >> page number inside my table
    so i have like this f 1 f which are <?for-each@section:G_HEADERS?>1 <?end for-each?> where 1 is the page number field. however this got rid of the page number all together. nothing get printed for page number at all.
    i thought its because i have it within my table. so I put the same thing on the header and that didn't work either.
    the only thing i thought of was editing the page field itself. which that didn't go well.
    do you have any idea?
  • 3. Re: How to reset page number
    524753 Guru
    Currently Being Moderated
    Sina,

    Check this
    http://winrichman.blogspot.com/

    create a sample report as follows.

    Use the Ms word , option of putting the page number in the MS word page header.
    then in the page

    create a simple xml like this,
    <root>
    <page>
    <name> page 1 </name>
    </page>
    <page>
    <name> page 2 </name>
    </page>
    <page>
    <name> page 3 </name>
    </page>
    <page>
    <name> page 4 </name>
    </page>
    <page>
    <name> page 5 </name>
    </page>
    </root>

    use this syntax
    <?for-each@section:root/page?>
    <?name?>
    <?end-for-each?>

    merge the rtf with the xml,
    you can notice that,
    the report contains, 5 pages, with the all pages having the page number as 1.

    How does that happen ?
    for-each@section:root/page , this syntax is going to reset the page every time it find a new root/page node.

    in this example we had only one page in the report,
    thats why we had the page 1 all the five pages
    other wise we will have different set of page numbers for each G_HEADERS.
  • 4. Re: How to reset page number
    439091 Newbie
    Currently Being Moderated
    hi

    did u get the solution for the page number reset ??

    anyone help ??

    pradeep
  • 5. Re: How to reset page number
    510349 Newbie
    Currently Being Moderated
    Hi All,

    <?for-each@section:SOME_ELEMENT?> will reset the headers and footers of the new occurence of SOME_ELEMENT. This means all elements in the headers and footers will now be in context of the new SOME_ELEMENT, however it does also reset the page numbering as long as it is not within the <?for-each@section:SOME_ELEMENT?> group.

    Bascially all this tag is doing is inserting a section break (new page) after every occurence of SOME_ELEMENT.

    I have successfully used this technique for approximately 90% of the templates I have developed and have had no issues with page numbers being reset. I am aware that there was an issue with page numbering is earlier versions of XMLP, so I would recommend that you ensure you are either using XMLP 5.6.3 with EBS, or 10.1.3.3.x for BI Publisher.

    If you are still having issues, please let me know and I will send you an example of it working.

    Regards,

    Cj
  • 6. Re: How to reset page number
    user10227248 Newbie
    Currently Being Moderated
    Hi Chris

    I have succesfully used the "for-each@section:G_group" and "end it with end for-each or end end for-each@section:G_group" and I get page number properly and also page number resets for each element as per@section:g_group but there in one Problem /......After each element the page number resets eg: 1,2,1,2,3,1,2,3,4,1,2..but there is an empty page after each element for eg; after each invoice there is a blank page or eg: 1,2,blankpage,1,2,3,blank page,1,2,3,4,blank page....etc...

    How do I get rid of the extra blank page?


    Regards
    Ray
  • 7. Re: How to reset page number
    622702 Newbie
    Currently Being Moderated
    Ray,
    I expect you still have an explicit page break definded in your for-each-group - drop it and it will work

    Dirk
  • 8. Re: How to reset page number
    P.Powsow Newbie
    Currently Being Moderated
    Using the @section context with the for-each:group should have reset paging and should have automatcally created a new page at the end of each group. It was not working for me at first. Even had to make use of split-at-page-breaks to force a new page and initial-page-number:number to hopefuly force a page reset.

    Not until I have taken the for-all markers outside of the table did it all start working. No need to use split-at-page-breaks and initial-page-number.

    A simple for-each@section handled new-paging and page reset.
  • 9. Re: How to reset page number
    user12209274 Newbie
    Currently Being Moderated
    Hi all,

    I am generating 6 copies of my invoice print report in XMl publisher. Generating successfully, now i need to give a number to a copy of invoice. Like first copy will be copy no. 1, it could be possible that one copy of invoice will have multiple pages. And then on the basis of copy no, i have to change the copy heading like if copy no 1 then 'Original', copy no 2 then 'Duplicate' like this. Please help. It is urgent.

    Thnks in advance.

    Regards
    Abhishek

    Edited by: user12209274 on Jul 12, 2012 5:08 AM
  • 10. Re: How to reset page number
    887742 Newbie
    Currently Being Moderated
    <?for-each:ORDER?> in the RTF produces a beautiful 44-page file, but the page number doesn't reset for each ORDER.

    <?for-each@section:ORDER?> produces a 36-page document, but all the pages are blank (except for the odd-numbered pages which show boiler-plate terms and conditions.

    I'm looking for the correct incantation to produce the 44-page document with correct page numbering resets with each new invoice.
  • 11. Re: How to reset page number
    jagadekara Newbie
    Currently Being Moderated

    Hi 887742,

     

    <?for-each@section:ORDER?> is it first loop? Because it should be first loop and if u r using any split by page breaks then remove that. and go to insert menu and page numbers current position and select x of y then u will get correct output.

     

    I hope this will help u.....

     

    Jagadekara Reddy.