Monday 30 September 2013

Multiple Copies in BI Publisher

                                 Multiple copies of PO needed to be printed based on 
value of an element in XML

I can see the requirement clearly, it would have been better , 
if there is an option , which can

 be sent to printer saying print this page three times.

But from BIP, it just sends a PDF file out to printer or to display as a file.

I dont think there is a command to repeat the page three times.

But logically we can make a loop , upper limit of number of 
copies come from XML element, 

and make the report repeat as many times.



Here is a sample of how can we do that.



use foreach_number function which works as a loop and returns you the counter, 
use the limit

 /ROWSET/COPIES=3 from this xml on left.

you can see the for-each@section runs for as many copies, and the report 
gets printed 3 times.

<?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,3,1)?>
<?for-each:/ROWSET/ROW?> <?DEPT?> <?end for-each?>
<?end for-each?>

No comments:

Post a Comment