Tuesday, April 6, 2010

Show ADF Table as Printable Page in Oracle ADF

Hi all,

Another cool component in Oracle ADF is af:showPrintablePageBehavior with just simple click you can set the any af:table component as Printable page using af:showPrintablePageBehavior.

In this post i will continue to enhance my last post example. I will just add another menu command item in our File menu of af:panelCollection component and use Printable page behaviour inside.

Steps to follow:

- Right click af:menu and choose insert inside af:menu > Command Menu Item and set Text as "Print Data" as shown in the slide.

- Drop Show Printable Page Behavior component from component palette on newly created menu.

Alternately you can just put this code in your JSF page source under af:menu tags later you will feel more comfortable doing coding directly in source file.

- Thats all right click the page and choose Run

- Filter the Records of table only Region > 2 and press enter choose Print Date from File Menu

You can see with Oracle ADF how easy is to implement some cool features in your application.

Download my completed example 



  1. when i use this print command on search page.It takes full page as a print page.but i want only to print table data,though this thing works on pages other than search page.

  2. Hi,
    It opens the printable page the first time ok.
    After closing the printable page you cannot open the printable page again?

  3. Hi Rocky,

    I dont think so i have experienced the similar behavior. Which browser are you using?

  4. Hi Baig,
    I have a table contains 300 rows.I used your code to print the table.The most awful situation is that its not printing the whole table. When i clicked print, all 300 rows are shown.But in print preview, only one page are showed and after printing only one page have printed.

  5. Hi Sourav,

    This feature in my opinion is not to print the whole table containing more than 10-15 rows.
    I would recommend you to create a custom report for this. Jasper or Oracle Reports can do the job nicely with better formatting or you can generate PDF file based on data as well.


  6. Hi Sourav,

    Based on your recomendation of using Oracle Reports, how do I do this? Keep in mind I don't want to use Jasper only Oracle Reports.


  7. Hi,

    Using Oracle reports is similar to use with Oracle forms.

    Just call a report URL and pass parameter check this video as well https://s3.amazonaws.com/ODTUGWebinars/2011-09-15+12.00+Maximize+Performance+with+.NET+Caching+for+Oracle+Database%2C+Alex+Keh+and+Simon+Law+Oracle+Corporation.wmv


  8. Hello Baig,

    I am a little confused by your post. I followed the link and found that it is about intergrating JDEV + OBIEE. Not JDEV and Oracle Reports.

    Just so you know I have already tried this method, it will only work for JDEV v. and OBIEE v.

    From what I understand an extension must be developed for this to work with JDEV v.11.1.2.x. (11gR2) Something that has not yet been done.

    Or I am unaware of, this is why I am seeking a solution using JDEV + Oracle Reports.

    Any thoughts?


  9. Hi Brain,

    I think i copied the wrong URL... sorry

    There is no such extension to work with any reporting solution in Jdeveloper.

    All you have to build custom solution. Oracle report being easy because all you have to do is just call a URL like we do in Oracle Forms.

    I will try to find the document i was referring.


  10. Hi,
    In my page i have 200 rows, but using this option i have only one page rows showing on browser bt i want to show all rows with scrolling, can u help me in this

    1. Hi,

      To display all rows set the Iterator property to -1 in the binding section


    2. Hi,

      I can't find the iterator property that you refer, can you please explain in more detail how to find it?