Categories
- All Categories
- Oracle Analytics and AI Learning Hub
- 34 Oracle Analytics and AI Sharing Center
- 22 Oracle Analytics and AI Lounge
- 276 Oracle Analytics and AI News
- 47 Oracle Analytics and AI Videos
- 16.1K Oracle Analytics and AI Forums
- 6.3K Oracle Analytics and AI Idea Labs
- Oracle Analytics and AI User Groups
- 99 Oracle Analytics and AI Trainings
- 16 Oracle Analytics and AI Challenge
- Find Partners
- For Partners
Page Number reset in rtf template
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
-
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
1