Oracle reports 10g – local printing problems

4

Posted by Hafed Benteftifa | Posted in oracle | Posted on 30-07-2008

In the course of adapting our reports and submission forms to 10g, some of our users asked for a specific request. In version 6 of our application, users can either request a screen preview or print directly to the local printer.

In 10g, the local feature is lost because the processing is now done in the middle-tier. There are a number of alternatives, each having its own advantages and drawbacks.

The main ones are: orarrp which can be found on the oracle website, see this link
and directprint which can be found onforms.pjc.bean.over-blog.com/article-6621538.html

After testing each and checking the OTN forum, I was a bit skeptical of these two alternatives. Briefly speaking, orarrp requires an installation of a small utility on each client and some tweaking in the server config files while directprint requires signing 3 jar files and setting up a javabean. However, the jars need to be downloaded whenever local printing is used. Since they are cached the first time they are used, downloading them afterwards should not be a problem but my main concern is with the fonts in the pdf files.

I did not thoroughly test these two options for the lack of time. Instead, I spent some time understanding the way printing is set up within our application. Each of our users has a network printer assigned to him and the printer’s name can be found by querying a user’s table, which contains information related to our users. Each one of these printers is already setup on an existing application server that is scheduled to be retired at the end of the migration process. But since we do have a brand new application server setup for 10g (on AIX), we will need to remap all these printers on this new AS.

In this case, our problem with local printing is resolved since the AS is able to see the network printers. I did some testing by using the DESNAME as the printer from the user’s table and the DESFORMAT as PDF. It worked fine although I had to add in the registry a String value named REPORTS_ADD_HWMARGIN and set its value to YES (this is because of a margin shift when printing direct to the printer).

For those that need to query the default printer from the user’s machine, I tested another alternative based on webutil. Essentially, we need to read the registry value at: HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS NT\DEVICES. The modif needed for webutil are already handled quite nicely by MouliForms.

Similar Posts:

Comments (4)

Yes, I have tested both solution Casey Bowden and Orarrp, the first inefficient and problematic the second complex but interesting! For me the fastest is that, for those who have net printer, to connect them to OAS. Safest, fastest and very performance solution!

Hi all,

We also tried those both solutions and we ended up with network printing. Our application server is Windows and we are mapping the client default printer as a network printer. It works fine but slower than we need. Probably it takes time to communicate with printer driver. Any suggestion to speed up this process will be greatly appreciated.
Thanks
Alex

Hi,
I’m trying to have my forms printing directly to client printer. I also get the name of the printer from a table, but i have the same name to several printers, so i think my best option is to go with the webutil. But how do i do that? with client_host? Or is there some other way? Please help me. Thank You.

Hi,
when I print the report in 11g direct to the printer the margin shift to left but when we generate to PDF and print it’s ok. I applied you solution by add the string value REPORTS_ADD_HWMARGIN in the registry under the Oracle_home of the application server but result are still same.
Any suggestion where I am missing any steps.
Thanks

Write a comment