Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 16 Oracle Analytics Lounge
- 216 Oracle Analytics News
- 43 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 79 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations 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