Solved

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

Posted on 2002-04-18
6
1,366 Views
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;
set_report_object_property(repid,report_other,v_parameter);
v_rep=run_report_object(repid);

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....
zandy-
0
Comment
Question by:zandyl
  • 3
  • 3
6 Comments
 

Accepted Solution

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

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

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

  Win_Api_Dialog.Select_Printer
    (PrinterName ,
     Port,
     RaiseExceptions );
 
END;



0
 

Author Comment

by:zandyl
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 .

0
 

Expert Comment

by:nlabbe5
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.  
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

Author Comment

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

any suggestions....
zandy-
0
 

Author Comment

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

zandy
0
 

Expert Comment

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

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

fact: Oracle Forms Developer 6.0.8.8.0
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


fix:

1. Copy the latest d2kwutil from the following location:
ftp://oracle-ftp.oracle.
com/dev_tools/patchsets/dev2k/Win95NT/d2kwutil/
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>

0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PL/SQL Two changes 7 41
migration MS SQL database to Oracle 30 71
join actual table rows based on the column 25 31
Oracle database T-1 Setup 7 31
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

730 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