Showing posts with label Print Multiple Copies. Show all posts
Showing posts with label Print Multiple Copies. Show all posts

Wednesday, 12 March 2014

Getting BI Publisher to print out multiple copies based on a value in the XML



I found a few pages with descriptions on how to do this but none were particularly clear so for the sake of my and Mikes Sanity ive made a simpler example using one of our reports 

 you put the whole template page inside a double for each loop like this  

the green highlighted bit is the full path to the xml field holding the number of copies  
(the +1 ive highlighted in yellow is in  there because the number of copies in the XML i was using  is set to zero its a number of ADDITIONAL copies field  hence the plus 1 :)  you wouldent normally need that bit   )  .  

and you need to add the second for each loop to say  go of and do everything on the report

<?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,/R42530V/DETAIL_1_S4_Group/Total_1_S7/On_Ship_To_Connect_to_Level_Break_S5/NbrOfCopies_ID150 + 1,1)?> 

                 <?for-each:/R42530V?>
                         //  The rest of the Template goes in here //
                <?end for-each?>

<?end for-each?>