4 paginas en cola de impresion en lugar de 1 al momento de imprimir en cuadro de dialogo

Miguel Parada
22 de Octubre del 2009
Saludos,

Justamente al ejecutar el PRG para imprimir, responde el impresor normalmente, pero en la cola de impresion me aparece documentos 1 de 4 por lo cual solo 1 documento deseo imprimir:

a continuacion el PRG completo:

SET DEFAULT TO C:DbAdm2009
CLOSE DATABASES ALL
OPEN DATABASE data1.dbc SHARED


PUBLIC tyMonto, tlDolares
PUBLIC lyEntero, lyCentavos, lnNumeroBloques, lnPrimerDigito, lnSegundoDigito
PUBLIC lnTercerDigito, lcBloque, lnBloqueCero, lcLetra

LOCAL LcCCF
LOCAL LcValorIva
LOCAL LcTotalConIva
LcCCF=.T.

LOCAL LcDocumento
LcDocumento="0146"

SET PROCEDURE TO C:SystAdm2009programasnumtoletras ADDITIVE
SET PROCEDURE TO C:SystAdm2009programasfecha ADDITIVE

SELECT idtrans AS NroDocumento,;
cantidad AS qty,;
codprod AS barra,;
descripcion AS description,;
nombre AS theclient,;
direccion AS direcc,;
registro AS NroReg,;
giro AS Gir,;
idtrans AS NroFactura,;
tblejemplo.precio AS price,;
total AS mitotal;
FROM tblejemplo,tblartiulos,tblclientes;
WHERE tblejemplo.idproducto=tblartiulos.codprod;
AND tblejemplo.idcliente=tblclientes.codcliente;
AND tblejemplo.idtrans=LcVariable;
INTO CURSOR MiCursor1

SELECT MiCursor1
GO TOP IN MiCursor1

SET PRINTER ON
SET PRINTER TO LPT1
SET DEVICE TO PRINTER
SET CONSOLE OFF


LOCAL LcTipoLetra
LcTipoLetra="FONT 'Courier',8"


@12,15 SAY ALLTRIM(theclient)&LcTipoLetra
@14,15 SAY ALLTRIM(SUBSTR(direcc, 1, 51))&LcTipoLetra
@15,15 SAY ALLTRIM(SUBSTR(direcc,52))&LcTipoLetra
@14,100 SAY ALLTRIM(SUBSTR(Gir,1, 44))&LcTipoLetra
@15,100 SAY ALLTRIM(SUBSTR(Gir,45))&LcTipoLetra
@12,100 SAY ALLTRIM(NroReg)&LcTipoLetra
@18,13 SAY CadFecha(DATE(),1)&LcTipoLetra
@18,100 SAY "Fact No.: " + ALLTRIM(NroDocumento)&LcTipoLetra

LOCAL i
i=22

DO WHILE !EOF( )
@i,4 SAY STR(qty)&LcTipoLetra
@i,20 SAY ALLTRIM(description)&LcTipoLetra
@i,98 SAY TRANSFORM(price, '@[email protected]')&LcTipoLetra
@i,130 SAY TRANSFORM(mitotal, '@[email protected]')&LcTipoLetra
i=i+1.2

SKIP IN MiCursor1
ENDDO
USE IN MiCursor1

SELECT SUM(total)AS eltotal FROM tblejemplo WHERE idtrans=LcDocumento INTO CURSOR CurTotal

SELECT CurTotal

LcTotalConIva=ROUND(eltotal*1.13,2)

@51,23 SAY MostrarNumerosEnLetras(LcTotalConIva)&LcTipoLetra
@50,130 SAY TRANSFORM(eltotal,'@[email protected]')&LcTipoLetra
@52,130 SAY IIF(LcCCF=.T.,TRANSFORM(eltotal*0.13,'@[email protected]'), "")&LcTipoLetra
@54,130 SAY TRANSFORM(LcTotalConIva,'@[email protected]')&LcTipoLetra

USE IN CurTotal

SET PRINTER OFF
SET PRINTER TO LPT1
SET DEVICE TO SCREEN
SET CONSOLE ON

Gracias y saludos cordiales,