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

Win 2000 Printer Drivers needed for CR 6.0 Runtime & VB Script

Status
Not open for further replies.

Sunishine

Programmer
Oct 19, 2001
4
US
I have a deployed report written in Crystal Rrpts 6.0 that uses VB Script to call it, which is in turn, called from a C++ program. CR requires the printer name, driver name, and the port name of the network printer to be used to print the report. Under win 98 this is easily obtained from the c:\windows\win.ini file. The process is to display all loaded drivers in a list box, and the user selects the printer to use to print the invoice. It may or not be the default printer. The printer information is then written to another .ini file for use at actual print time by the VB script that calls the CR Report.

However, Windows 2000 no longer has the windows folder, nor the win.ini file that contains the printer drivers. I cannot determine how to obtain the DRIVER NAME from the registry. I have been able to get the other information, but without the driver name, it always goes to the Windows Default printer.

Does anyone know how I can get this information using VB script, thus enabling me to display it so the user can choose the printer, store it someplace, retrieve it at print time and pass it on to my Crystal runtime report?

Note: (Upgrade to Crystal Reports 8.5 is not slated until early next year).

Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top