Hi everyones,
I have some reports using special paper size (like 7 inches long). Using VFP6 I program something like this below, it works fine with a NT server and 98/NT workstation. Now with a Windows2003 server and XP workstation it doesn't work.
lnPrinter = APRINTERS(laPrinter)
FOR i = 1 TO lnPrinter
IF UPPER(ALLTRIM(laPrinter[i,1])) == "SAGENT"
llPrinter = .T.
*lcPrinter = "SAGENT" &&USe to work with NT, now gives an error with
* print spooler
lcPrinter = ALLTRIM(laPrinter[i,1]) && no error, result is not correct
EXIT
ENDIF
ENDFOR
lcPrint = IIF(tcPrint = "PREVIEW","PREVIEW","TO PRINTER")
IF !EMPTY(lcPrinter)
* wait windows SET('PRINTER',3) shows me the default printer
SET PRINTER TO NAME &lcPrinter.
* wait windows SET('PRINTER',3) shows me 'SAGENT'
REPORT FORM PETICKETINVC.FRX NOCONSOLE &lcPrint && I also try adding PROMT ;
** With Prompt it show me the default printer not the new one
** If I manually pick SAGENT, the paper size is US letter not the
** special one. If I manually go into printer parameters and pick
** the special size, it print fine.
SET PRINTER TO DEFAULT
ELSE
REPORT FORM PETICKETINVC.FRX NOCONSOLE &lcPrint PROMPT
ENDIF
Note: Printer SAGENT is define with the special paper being the default.
I did the usual tirkc to remove everything form EPX, Tag1 and Tag2 in the report, no succes.
I understand, the way printer are define in Windows 2003 and XP are very different then it use to be with NT.
Any idea what I can do?
Diane Robitaille eng.