I'm trying to set the paper size to 8 1/2 by 14 instead of 8 1/2 by 11.
this is the code that I'm using. Currrently the user has to chnage the printer settings from the sys(1037) function before running the report. Does any one have a fix.
I tried setting the Paper size, Width and Height as well
cReportName = 'con1.frx'
cReport = 'con1'
SELECT contract
THISFORM.setprn2 && See Blelow
*!* close the temp table
USE &cReportName IN 0 EXCLUSIVE
SELECT &cReport
LOCATE FOR objtype = 1 AND objcode = 53
REPLACE TAG WITH ''
REPLACE tag2 WITH ''
APPEND MEMO EXPR FROM repset.txt OVERWRITE
USE
SET PRINTER TO NAME ALLTRIM(gcprn)
*** Screen Preview
REPORT FORM '&cReportName' PREVIEW
*****************************************
* THISFORM.setprn2
*****************************************
*!* store the current alias
ret_cursor = ALIAS()
*!* set the path statement
tempdir = (sys(5)+sys(2003))+'\Reports\repset'
SELECT (ret_cursor)
SET SAFETY OFF
SET CONSOLE OFF
SET ALTERNATE TO &tempdir
SET ALTERNATE ON
? 'device='+ALLTRIM(gcprn)
? 'orientation='+ALLTRIM(STR(PRTINFO(1,ALLTRIM(gcprn)),10,0))
? 'papersize='+ALLTRIM(STR(PRTINFO(2,ALLTRIM(gcprn)),10,0))
? 'paperlength='+ALLTRIM(STR(PRTINFO(3,ALLTRIM(gcprn)),10,0))
? 'paperwidth='+ALLTRIM(STR(PRTINFO(4,ALLTRIM(gcprn)),10,0))
? 'scale='+ALLTRIM(STR(PRTINFO(5,ALLTRIM(gcprn)),10,0))
? 'copies='+ALLTRIM(STR(PRTINFO(6,ALLTRIM(gcprn)),10,0))
? 'defaultsource='+ALLTRIM(STR(PRTINFO(7,ALLTRIM(gcprn)),10,0))
? 'printquality='+ALLTRIM(STR(PRTINFO(8,ALLTRIM(gcprn)),10,0))
? 'color='+ALLTRIM(STR(PRTINFO(9,ALLTRIM(gcprn)),10,0))
? 'duplex='+ALLTRIM(STR(PRTINFO(10,ALLTRIM(gcprn)),10,0))
? 'yresolution='+ALLTRIM(STR(PRTINFO(11,ALLTRIM(gcprn)),10,0))
? 'ttoption='+ALLTRIM(STR(PRTINFO(12,ALLTRIM(gcprn)),10,0))
? 'collate='+ALLTRIM(STR(PRTINFO(13,ALLTRIM(gcprn)),10,0))
SET ALTERNATE OFF
SET ALTERNATE TO
SET CONSOLE ON
SET SAFETY ON