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
Cheers,
Baig
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.
ReplyDeleteHi,
ReplyDeleteIt opens the printable page the first time ok.
After closing the printable page you cannot open the printable page again?
Hi Rocky,
ReplyDeleteI dont think so i have experienced the similar behavior. Which browser are you using?
Hi Baig,
ReplyDeleteI 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.
Hi Sourav,
ReplyDeleteThis 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.
Regards,
Zeeshan
Hi Sourav,
ReplyDeleteBased 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.
Brian
Hi,
ReplyDeleteUsing 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
ZB
Hello Baig,
ReplyDeleteI 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.11.1.1.5 and OBIEE v.11.1.1.5.
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?
Brian.
Hi Brain,
ReplyDeleteI 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.
ZB
Hi,
ReplyDeleteIn 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
Hi,
DeleteTo display all rows set the Iterator property to -1 in the binding section
Zeeshan
Hi,
DeleteI can't find the iterator property that you refer, can you please explain in more detail how to find it?
Thanks
Ricardo