Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Reports and W2000
Message
 
To
12/02/2002 02:14:37
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00618668
Message ID:
00618764
Views:
8
Hi Walter:

Thanks for the info. I am downloading Focus as I write this.

Rick

>Hi Rick,
>
>See Thread #482054 Message #482134
>
>Walter,
>
>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform