No me esta respetando las medidas para un tipo de formato, en mi código tengo esto:
SELECT PRINTER DIALOG TO lSuccess PREVIEW
PAPERSIZE PRINTER_PAPER_USER
PAPERLENGTH 150.00
PAPERWIDTH 223.50
Y cuando mando a imprimir sigue respetando el tamaño carta y NO el tamaño que le indico en PAPERLENGTH y PAPERWIDTH
¿algo estoy haciendo mal?, por favor si alguien me puede ayudar.
De antemano muchas gracias
Jorge Posadas Ch.
Guadalajara, Jal.
México
Problema con tamaño de hoja personalizada
Moderator: Rathinagiri
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Problema con tamaño de hoja personalizada
This command DOESN'T EXISTSjoposadas wrote: SELECT PRINTER DIALOG TO lSuccess PREVIEW
PAPERSIZE PRINTER_PAPER_USER
PAPERLENGTH 150.00
PAPERWIDTH 223.50
When you use DIALOG clause, PAPERSIZE cannot be specified since the idea of showing system print dialog is that the user interactively select printer settings.
From \hmg\doc:
SELECT PRINTER <cPrinter> | DEFAULT
[ TO <lSuccessVar> ]
[ ORIENTATION <nOrientation> ]
[ PAPERSIZE <nPaperSize> ]
[ PAPERLENGTH <nPaperLength> ]
[ PAPERWIDTH <nPaperWidth> ]
[ COPIES <nCopies> ]
[ DEFAULTSOURCE <nDefaultSource> ]
[ QUALITY <nQuality> ]
[ COLOR <nColor> ]
[ DUPLEX <nDuplex> ]
[ COLLATE <nCollate> ]
[ PREVIEW ]
SELECT PRINTER DIALOG
[ TO <lSuccessVar> ]
[ PREVIEW ]
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
-
joposadas
Re: Problema con tamaño de hoja personalizada
Hice algunos cambio para ver si ya quedaba, pero aún sigue imprimiendo en tamaño LATTER, Anexo el codigo donde le digo que voy a usar una medida en especial de hoja,
No se en donde esta el error, la verdad no lo encuentro, oajala y me puedan ayudar
PROCEDURE PrintGuiaEstafeta()
IF !LoadPrintData()
MsgInfo("No hay datos a imprimir.")
ELSE
WAIT WINDOW "Imprimiendo..." NOWAIT
CursorWait()
oPrintData:MoveFirst()
DocName := "Guias"
SELECT PRINTER DEFAULT PREVIEW
PAPERSIZE PRINTER_PAPER_USER
PAPERLENGTH 150
PAPERWIDTH 223.5
START PRINTDOC NAME DocName
DO WHILE !oPrintData:EOF()
START PRINTPAGE
LnNumLine := 45.8
@ LnNumLine,165 PRINT "X O" SIZE 10 BOLD
LnNumLine := 85
@ LnNumLine,95 PRINT "DOCUMENTOS" SIZE 14
LnNumLine := 95.5
@ LnNumLine,10 PRINT oPrintData:Fields("Nombre"):VALUE SIZE 8
LnNumLine := 110
@ LnNumLine,5 PRINT oPrintData:Fields("Direccion1"):VALUE SIZE 8
@ (LnNumLine:=LnNumLine+3),5 PRINT oPrintData:Fields("Direccion2"):VALUE SIZE 8
@ (LnNumLine:=LnNumLine+3),5 PRINT ALLTRIM(oPrintData:Fields("Ciudad"):VALUE)+" "+;
ALLTRIM(oPrintData:Fields("Estado"):VALUE) SIZE 8
LnNumLine := 130
@ (LnNumLine:=LnNumLine+5),25 PRINT ALLTRIM(oPrintData:Fields("CP"):VALUE) SIZE 8
@ LnNumLine,50 PRINT "MEX" SIZE 8
LnNumLine := 140
@ LnNumLine,95 PRINT "DIFERENCIALES"
@ LnNumLine,135 PRINT WichDate("DMA/", DATE())
oPrintData:MoveNext()
END PRINTPAGE
ENDDO
ENDIF
*
END PRINTDOC
oPrintData:Close()
CursorArrow()
WAIT CLEAR
RETURN
No se en donde esta el error, la verdad no lo encuentro, oajala y me puedan ayudar
PROCEDURE PrintGuiaEstafeta()
IF !LoadPrintData()
MsgInfo("No hay datos a imprimir.")
ELSE
WAIT WINDOW "Imprimiendo..." NOWAIT
CursorWait()
oPrintData:MoveFirst()
DocName := "Guias"
SELECT PRINTER DEFAULT PREVIEW
PAPERSIZE PRINTER_PAPER_USER
PAPERLENGTH 150
PAPERWIDTH 223.5
START PRINTDOC NAME DocName
DO WHILE !oPrintData:EOF()
START PRINTPAGE
LnNumLine := 45.8
@ LnNumLine,165 PRINT "X O" SIZE 10 BOLD
LnNumLine := 85
@ LnNumLine,95 PRINT "DOCUMENTOS" SIZE 14
LnNumLine := 95.5
@ LnNumLine,10 PRINT oPrintData:Fields("Nombre"):VALUE SIZE 8
LnNumLine := 110
@ LnNumLine,5 PRINT oPrintData:Fields("Direccion1"):VALUE SIZE 8
@ (LnNumLine:=LnNumLine+3),5 PRINT oPrintData:Fields("Direccion2"):VALUE SIZE 8
@ (LnNumLine:=LnNumLine+3),5 PRINT ALLTRIM(oPrintData:Fields("Ciudad"):VALUE)+" "+;
ALLTRIM(oPrintData:Fields("Estado"):VALUE) SIZE 8
LnNumLine := 130
@ (LnNumLine:=LnNumLine+5),25 PRINT ALLTRIM(oPrintData:Fields("CP"):VALUE) SIZE 8
@ LnNumLine,50 PRINT "MEX" SIZE 8
LnNumLine := 140
@ LnNumLine,95 PRINT "DIFERENCIALES"
@ LnNumLine,135 PRINT WichDate("DMA/", DATE())
oPrintData:MoveNext()
END PRINTPAGE
ENDDO
ENDIF
*
END PRINTDOC
oPrintData:Close()
CursorArrow()
WAIT CLEAR
RETURN
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Problema con tamaño de hoja personalizada
Your syntax is INCORRECT.joposadas wrote: <...>
SELECT PRINTER DEFAULT PREVIEW
PAPERSIZE PRINTER_PAPER_USER
PAPERLENGTH 150
PAPERWIDTH 223.5
<...>
Your must write all the command in one line or use semicolons if you want to split it in various lines.
Code: Select all
SELECT PRINTER DEFAULT PREVIEW ;
PAPERSIZE PRINTER_PAPER_USER ;
PAPERLENGTH 150 ;
PAPERWIDTH 223.5Prior to continue, take a look at the print samples: \hmg\samples\print.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
-
joposadas
Re: Problema con tamaño de hoja personalizada
Roberto,
Agradezco tu ayuda, ya puse los (;) PUNTO y COMA y ya me dio el resultado, de aahora en adelante pondré más atención a eso. Y en cuanto log de errores, desafortunadamente no me dió nada, simplemente compilaba normalmente y el ejecutar ese proceso (donde imprime) no se detenia simplemente me mostraba el preview sin darme error, por esa razón no lo inclui.
De nuevo gracias por tu ayuda
Agradezco tu ayuda, ya puse los (;) PUNTO y COMA y ya me dio el resultado, de aahora en adelante pondré más atención a eso. Y en cuanto log de errores, desafortunadamente no me dió nada, simplemente compilaba normalmente y el ejecutar ese proceso (donde imprime) no se detenia simplemente me mostraba el preview sin darme error, por esa razón no lo inclui.
De nuevo gracias por tu ayuda