Following is my code for 2.5b:
*
* Set up to print without using report form,
* direct output to printer using '?' question mark command
*
*
PARAMETERS ;
lcString
PRIVATE ;
llPrompt, ;
;
lnParams
m.lnParams = parameters() && 02/02/98 -- check number of parameters...
*
* 12/7/93 if lcString contains "NOPROMPT", then we won't wait for
* the WINDOWS printer selection prompt, but simply print to
* the current default printer . . .
*
* . . . remember, if there is no 'lcString' parameter,
* we will automatically use the DEFAULT WINDOWS printer
*
IF m.lnParams = 1 .and. ;
upper( TYPE( "m.lcString" ) ) = "C" .and. ;
"NOPROMPT" = UPPER( ALLTRIM( m.lcString ) ) && 02/04/98 -- require exact match
m.llPrompt = .F.
ELSE
m.llPrompt = .T.
ENDIF ( "NOPROMPT" $ UPPER( lcString ) )
*
DO CASE
CASE ALLTRIM( UPPER( SET( "DEVICE" ) ) ) <> "SCREEN"
wait window ;
"SET( 'DEVICE' ) = " + SET( "DEVICE" ) + CHR(13) + ;
"NO CHANGE TO DEVICE SETTING MADE"
CASE _WINDOWS .OR. _MAC
SET DEVICE TO SCREEN
SET PRINTER OFF
SET PRINTER TO
IF llprompt
SET DEVICE TO PRINTER PROMPT
ELSE
SET DEVICE TO PRINTER && no prompt, use default
ENDIF ( llprompt )
SET PRINTER ON
SET CONSOLE OFF && this effectively turns off sound from '??chr(7)'
CASE _DOS
SET DEVICE TO PRINTER
SET PRINTER ON
SET CONSOLE OFF && this effectively turns off sound from '??chr(7)'
OTHERWISE
*** =bdplatform() && 08/04/98 -- defaults to "Unknown operating system platform"
ENDCASE
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only