Sunday, July 28, 2013

Inserting Page Numbers

In this lesson we are going to know how to insert page numbers in RTF.
Let us create a simple RDF by using following query:
?
1
2
3
4
5
6
7
8
9
SQL>SELECT  pov.vendor_name,
        ai.invoice_date,
        ai.invoice_amount,
        ai.payment_method_lookup_code,
        ai.set_of_books_id,
        ai.approved_amount,
        FROM po_vendors pov, ap_invoices_all ai
 WHERE pov.vendor_id = ai.vendor_id
and rownum<100
 
The below picture shows the Data Model of RDF:
 
Now generate XML as we know how to generate and save .xml file in appropriate location which is used to load data into RTF for future reference.

















Now we have to construct an RTF which is shown in the below picture:









By seeing above pictures we have to count how many pages are there.
With out counting pages if we insert page numbers then we can easily know how many pages are there in output report and on which page we are currently.
Now let us see how to insert pages in the RTF
The below picture shows how a sample RTF looks like and Place the cursor in the box ” Pages:-1 OF “.











Now we have to know how many pages are there in the output Report.
For that, place the cursor in the same box which is shown below











After placing the cursor then go to Insert menu and there select Field option, the same scenario is shown in the below picture:
















From the above picture we can see lot of options there select Numpages option, you can see in below picture which shows that how many pages are there i.e.… total pages












After selecting Numpages option the RTF looks like:










Now we have to publish the report

Click on Template Builder => Preview => HTML/PDF/Excel/RTF (any format).
See the below sample which is in PDF format:











Next page .here, in the below output we are not seeing that at which page we are

















So if we want to display page numbers for every page we should have to place page numbers inheader and footer which is mandatory and is shown below
















Now we have to publish the report

Click on Template Builder => Preview => HTML/PDF/Excel/RTF (any format).
We can get below output

In the below output we can see Pages: -1 OF   4

















Next page.    Here, in the below output we can see Pages: – 2 OF 4















Still now we have seen the way  that how to see in which page we are currently out of all pages.


No comments:

Post a Comment