Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Reports and W2000
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Crystal Reports and W2000
Miscellaneous
Thread ID:
00618668
Message ID:
00618668
Views:
50
Hello All:

This works using Crystal Reports and Windows 98:
use FOXTOOLS to get the Printer Driver and the Printer Port to use as Crystal SelectPrinter variables.

oReport.SelectPrinter(lcPrinterDriver,lcPrinterName,lcPrinterPort)

The code to use FoxTools is at the bottom of this message.
lcPrinterName is the Windows Printer Name.

But, in Windows 2000, the Printer Driver returned by FOXTOOLS is always WINSPOOL.

How does one go about getting the actual printer driver used by Windows?

Thanks in advance,
Rick


Sample Code:

lcPrinterDriver=""
lcPrinterPort=""
lcbuffer = SPACE(500)
lnlength = LEN(lcbuffer)
IF x2setlib("FOXTOOLS")
lnlength = GetProStrg('devices',lcPrinterName,"",@lcbuffer,lnlength)
ENDIF
lcbuffer=ALLTRIM(lcbuffer)
lncomma1=AT(",",lcbuffer,1)
IF lncomma1<>0
lcPrinterDriver=ALLTRIM(LEFT(lcbuffer,lncomma1-1))
lcPrinterPort=ALLTRIM(RIGHT(lcbuffer,LEN(lcbuffer)-lncomma1))
ENDIF

oReport.SelectPrinter(lcPrinterDriver,lcPrinterName,lcPrinterPort)
Richard DeZeeuw
DeZeeuw Software Inc.
Next
Reply
Map
View

Click here to load this message in the networking platform