Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with printing

Status
Not open for further replies.

wilsona

Technical User
Jan 26, 2001
131
GB
Hi,
I want to be able to print a report in windows 98/2K/XP by using the usual Windows select printer dialog - I cannot find a way to do this in Developer (6i). I want the user to be able to select from a range of printers and modify the setup, etc., as they would in any other app. Can anyone help?
 
TRY WITH THIS :


Win_API_Environment.Get_Default_Printer(<VARCHAR2 Target>, <VARCHAR2 Target>, TRUE);
 
I can't get this to work :-( I have created a when_button_pressed trigger to test it as follows:

DECLARE
PrinterName VARCHAR2(32);
Port VARCHAR2(32);
begin
Win_Api_Dialog.Select_Printer(PrinterName, Port, FALSE);
end;

I have attached the library OK, as far as I can tell. All I get is:

FRM 40734: Internal Error: PL/SQL Error Occurred.

Even if I GET the default printer, how do I use it? Is there a way to SET a default printer, too? i.e. Keep a list of usernames and their default printers in a table, then set the users default printer when they login. (We are talking multi-user here, not thick client.) I also would like if they could pick a printer from a list, too. So that means finding a way to get details all of the printers in the system. The win_api routines do not seem to provide enough facilities.
 
Please disregard most of the above - I've just seen win_api_dialog.Select_Printer and Choose_Printer. Now all I need to do is get them to work without the FRM 40734 - any ideas?
 
Hi,

Why not increasing the size of the Printername and Port, I saw an example in :
using 200 characters. Use more if necessary !

I don't know if you got rid of your problem, I hope so.
Maybe could you give some information.
I have a form where this function is used, but no modification is taken into account (printer selection, or printer settings changes)

Is calling this function enough? Or should something else be done with the out variable (printer name).

Thx.
 
Thanks. I finally got the dialog box up - the d2kwutil dll was not in the PATH... It now works. All I need to do now is work out how I actually print to the printer the user has chosen.!!
 
I have the same problem !
Printing on the chosen printer, with the modified print settings.

When you will get it work, please could you tell me, how ?
Of course, I'll do the same, if I find a solution first.

Bye.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top