Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


how to have the report printed from the user's selected printer

Posted on 2002-04-18
Medium Priority
Last Modified: 2011-08-18
Hello oracle masters,

Question:  How do I get a report executed from a form and printed to the printer that the user chose?  I need the form to run the report, then ask the user which printer he wants the report to print (list of printers = installed printers in the current client pc).

Software Info:  I'm currently using ORACLE FORMS DEVELOPER 6i and Database 8i.

Sample Data:  In the Sampleform.fmb, there's a button with the following 'When-Button-Pushed' trigger:
repid := find_report_object('INVOICE');
v_parameter := 'paramform=no,INVNO='||:TABLE.invno;

In the reports group of Sampleform.fmb, the INVOICE is set to the following:
Filename = print_invoice.rdf
Execution Mode = Runtime
Report Destination = Printer

The print_invoice.rdf has a user parameter INVNO and the query needs this parameter to run the form.

Any suggestions would really be appreciated....
Question by:zandyl
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3

Accepted Solution

nlabbe5 earned 600 total points
ID: 6951962
Include the D2KWUTIL.PLL library to your form.

Add a button with a WHEN-BUTTON-PRESSED trigger:

 PrinterName        VARCHAR2(100);
 Port               VARCHAR2(100);
 RaiseExceptions  BOOLEAN ;

    (PrinterName ,
     RaiseExceptions );


Author Comment

ID: 6953659
how do i find these file?  i tried adding it into the attached libraries but its not in the list - even when i tried looking for it in the oracle home directories .


Expert Comment

ID: 6954072
I found d2kwut60.dll in C:\ORANT\BIN directory.  In the documentation, they talk about D2KWUT32.DLL but I did not find it in my directories.

I just wrote D2KWUTIL.PLL and Oracle Forms found it automatically.  
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.


Author Comment

ID: 6954198
okay, i found it but now its giving me the following error:
'FRM-40734: Internal Error: PL/SQL error occured'

any suggestions....

Author Comment

ID: 6954300
could anyone suggest where i could download these 'demo oracle libraries' for developer 6i version?


Expert Comment

ID: 6954767
What is your OS? Your Forms Developer version?

Anyway, I found this on http://metalink.oracle.com:

fact: Oracle Forms Developer
fact: Oracle Forms Developer 4.5
fact: MS Windows NT 4.0 (32-bit)
fact: SF40
fact: Attached the d2kwutil.pll package
symptom: Error from select_printer: FRM-40734
symptom: win_api_dialog.select_printer(v_printer,v_port,TRUE);
symptom: Frm-40734 Internal error PL/SQL error occured
cause: It is not the correct d2kutil.dll


1. Copy the latest d2kwutil from the following location:
2. Extract over the existing files (all files in the self extract archive)
3. Copy the d2kwut60.dll in ORACLE_HOME\BIN directory.
See also <BUG:1293747>


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question