{"id":42,"date":"2008-07-30T05:22:57","date_gmt":"2008-07-30T05:22:57","guid":{"rendered":"http:\/\/degenio.com\/blog\/?p=42"},"modified":"2008-07-30T05:22:57","modified_gmt":"2008-07-30T05:22:57","slug":"oracle-reports-10g-local-printing-problems","status":"publish","type":"post","link":"https:\/\/degenio.com\/blog\/2008\/07\/oracle-reports-10g-local-printing-problems\/","title":{"rendered":"Oracle reports 10g &#8211; local printing problems"},"content":{"rendered":"<p>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.<\/p>\n<p>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.<\/p>\n<p><!--more--><\/p>\n<p>The main ones are: <strong>orarrp<\/strong> which can be found on the oracle website, see <a href=\"http:\/\/www.oracle.com\/technology\/sample_code\/products\/reports\/index.html\">this link<\/a><br \/>\nand directprint which can be found on<a href=\"http:\/\/forms.pjc.bean.over-blog.com\/article-6621538.html\">forms.pjc.bean.over-blog.com\/article-6621538.html<\/a><\/p>\n<p>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.<\/p>\n<p>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&#8217;s name can be found by querying a user&#8217;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.<\/p>\n<p>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&#8217;s table and the DESFORMAT as PDF. It worked fine although I had to add in the registry a String value named <strong>REPORTS_ADD_HWMARGIN<\/strong> and set its value to <strong>YES<\/strong> (this is because of a margin shift when printing direct to the printer).<\/p>\n<p>For those that need to query the default printer from the user&#8217;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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[1],"tags":[93,11],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/phEMW-G","_links":{"self":[{"href":"https:\/\/degenio.com\/blog\/wp-json\/wp\/v2\/posts\/42"}],"collection":[{"href":"https:\/\/degenio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/degenio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/degenio.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/degenio.com\/blog\/wp-json\/wp\/v2\/comments?post=42"}],"version-history":[{"count":0,"href":"https:\/\/degenio.com\/blog\/wp-json\/wp\/v2\/posts\/42\/revisions"}],"wp:attachment":[{"href":"https:\/\/degenio.com\/blog\/wp-json\/wp\/v2\/media?parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/degenio.com\/blog\/wp-json\/wp\/v2\/categories?post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/degenio.com\/blog\/wp-json\/wp\/v2\/tags?post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}