Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Report Form Paper size
Message
De
04/06/2010 02:26:52
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Report Form Paper size
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01467297
Message ID:
01467297
Vues:
137
Hi,
I create a custom invoice form (Hight is 5.5 inch, Width = 8.5 inch) in win xp
I use the following procedure to change the paper size in the EXPR field to PAPERSIZE = 128
and I check that it successful updated, but the report print out not correct.
What is the value for the PAPERSIZE that I should set to match the custom form height = 5.5 inch ?
What is the range value of the PAPERSIZE varaible ? (0 to ???)

On the other hand, I add the NOPAGEEJECT to the REPORT FORM command, but it still eject the page.
Why ?

Please advise
 DO SETPAPERSIZE WITH "C:\WTS\REPORTS\PRNINV2.FRX",128
REPORT FORM c:\WTS\REPORTS\prninv2.frx TO PRINTER NODIALOG NOCONSOLE NOPAGEEJECT



********************************
* SETPAPERSIZE.PRG
********************************
LPARAMETER lcFRX, lnPapersize
LOCAL lcNewExpr, lnStartCopiesLine, lcStartAtCopiesLine, lnEndCopiesLine, ;
	lnLenCopiesLine, lcTop, lcBottom
#DEFINE vfCRLF CHR(13) + CHR(10)
IF !(UPPER(RIGHT(lcFRX, 4)) = ".FRX")
	lcFRX = lcFRX + ".FRX"
ENDIF

USE (lcFRX) IN 0 ALIAS rptfrm EXCLUSIVE
SELECT rptfrm 
LOCATE FOR objType = 1 AND objCode = 53

IF EMPTY(EXPR)
        lcNewExpr = "PAPERSIZE=" + ALLT(STR(lnPapersize)) + vfCRLF
ELSE
        lnStartCopiesLine = ATC("PAPERSIZE", EXPR)
        lcStartAtCopiesLine = SUBSTR(EXPR, lnStartCopiesLine)
        lnEndCopiesLine = ATC(vfCRLF, lcStartAtCopiesLine)
        lnLenCopiesLine = LEN(SUBSTR(lcStartAtCopiesLine, 1, lnEndCopiesLine))
        lcTop = SUBSTR(EXPR, 1, lnStartCopiesLine - 1)
        lcBottom = SUBSTR(EXPR, (LEN(lcTop) + lnLenCopiesLine))
        lcNewExpr  = lcTop + "PAPERSIZE=" + ALLT(STR(lnPapersize)) + lcBottom

ENDIF
SELECT rptfrm
DO WHILE !RLOCK()
ENDDO
REPLACE EXPR WITH lcNewExpr
UNLOCK
SELECT rptfrm
USE IN rptfrm
Thanks
Derek
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform