• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Page N of N and <fo:page-number> in BI Publisher

johndanter

Legendary Poster
Hi gents,

I am quite happy with myself today as I've managed to find a way of getting my BI templates to display incrementing page numbers that reset per order etc.
Very useful :)

For those reading this and not knowing how you do it, you just add the following
<fo:page-number>

So my BI now goes 1 2 3 4 resets on a new DOCO and starts again 1 2 3 4 5 6 until the new new DOCO. Great!!!!

However, I'd like to be a smarty pants and make the pages say page n of n. So 1 of 4, 2 of 4 etc.

I see references online to this <fo:page-number-citation-last/> but my BI plug in of 11.1.1.5.0 says that's not supported yet.

Side question, if I am on TR 9.1.5.3 what is the latest BI plug in I can use?

So does anyone know how to get BI showing page n of n?

Thanks

John
 

jileto

Well Known Member
Thanks for the tip! Always nice to know a different way to "skin the cat".

For the stuff I do, I use the MSWord native page number fields. I just make sure that my outermost loop is a <?for-each@section?> . The @section context triggers a re-set of header/footer structures and that includes page numbers. Works with N of N too. The engine automatically determines the N number of pages part. No additional logic required.
 

pintya@jde

Active Member
Hi Jileto ,
This is my first BIP report and I have used MSWord page number filed at BIP report Header.
I want to reset this page numbering if order change just like jhon mention.
can you explain it little bit how you have done that.
 

jileto

Well Known Member
If you're new to BIP your first stop should be to read the BIP User's Guide. This is all explained in detail there - https://docs.oracle.com/cd/E10091_01/doc/bip.1013/b40017/T421739T481157.htm#4535398

Just like when you have a new car, even if you already know how to drive, it really helps to give the entire user manual that came with the car, a once over.

All the instances I had to reset the page number, it was always because the template has to batch process groups/sets of data.

For example, invoices. An invoice may have 1 to many lines. If the number of lines does not fit a page, then the excess lines print on subsequent pages. However, once all the lines for the invoice are printed, and a new invoice needs to be printed, then the page number must be reset.

To process something like the above, the template would have an outer for-each loop goes through 1 invoice at a time - say, <?for-each:Invoice?>.

Then it also has an inner for-each loop that goes through each line for the invoice - say, <?for-each:InvoiceLine?>.

Since the objective is to reset the page number after every invoice, then the outer for-each loop should be set to @section context - replace the outer loop with <?for-each@section:Invoice?>. The @section context will cause BIP to start on a new section - effectively a new page. So this also saves you from having to use a page break instruction at the end of each group and also ensures said page break only occurs if there are more groups/invoices to process. This also resets the page number - which was the objective in the 1st place.
 

pintya@jde

Active Member
Thanks a lot Jileto ,I have just added @Section in outermost for loop it works as expected ,like <?for-each@section:SalesOrder?>
Surly I will go through given link.
 
Top