Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Page Number reset in rtf template

Received Response
125
Views
1
Comments

Summary

Page Number reset in rtf template

Content

Hi

We have a requirement to reset the page number for every Invoice.

I was able to achieve this using @section, but when we print multiple copies we need to reset the page number for each copy.

We are using the subtemplate and call it twice with just a small change.in the header.

The requirement is such that when the DataMode is 'Original' which is part of each G_Main group, we call the subtemplate twice to print 2 copies(Original and Duplicate).

<?for-each@section:G_MAIN?>

     <?if: DATA_MODE=’Original’?>

          <?call@inlines:reprint?><?with-param:Mode;$val1?><?end call?>

          <?call@inlines:reprint?><?with-param:Mode;$val2?><?end call?>

     <?end if?>

<?end for-each?>

The page numbering starts with the First page of the Original and ends with the last page of the duplicate. But here we need to reset the page number for every copy(Original & Duplicate).

Any help on how to reset the page numbering will be appreciated.

I am attaching the sample template and xml output for reference.

Thanks

Anil

Answers

  • Anilkumar Dasi
    Anilkumar Dasi Rank 3 - Community Apprentice

    I was able to resolve the issue with some workaround.

    <?for-each-group@section:G_MAIN;./DOCUMENT_ID?>

         <?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,2,1 )?>

              <?for-each:current-group()?>

                     <if:position()=1?> <?call@inlines:reprint?><?with-param:Mode;$val1?><?end call?><?end if?>

                     <if:position()=2?> <?call@inlines:reprint?><?with-param:Mode;$val2?><?end call?><?end if?>

             <?end for-each?> 

          <?end for-each?>

    <?end for-each-group?>

    with the above, i was able to reset the page numbering for every copy of the print.

    Thanks