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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printer Selection

Status
Not open for further replies.

Sunishine

Programmer
Oct 19, 2001
4
US
I am new to CR, using 8.5 and Win2K. We've recently upgraded from CR 6.0 and windows 98.

I have a C++ program that uses VBScript to retrieve the available printers from the win.ini file and load the chosen printer into a user's .ini file for use in printing invoices written in Crystal Reports, using OCX. But in Win2000, I no longer have the win.ini file. I can probably retrieve this from the registry.

Drawbacks to this are that if a different printer driver is desired (like fax or email), the client has to choose the printer, save it, print the invoice, then go back and restore the regular printer to print the next invoice.

So rather than trying to get it from the registry I'd rather display the standard windows printer dialog box when the client wants to print an invoice, and they can choose the driver at that time. However I am not finding out how to do this easily. Seems like it should be a standard function, but I can't figure out how to do it in VBscript and I don't know enough about Crystal to know if it is possible or better to do it there.

I have also considered switching to the RDC (vs OCX) but it seems like that would be a lot of work, and I only have this one report.

Please advise if I am missing something obvious, or is there a better way, or what do I need to do to call that printer dialog? Thanks very much in advance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top