PARAMETERS licencia,fecha,benefic,total1,cta_cta,cta_nom,importe,ret_iva,ret_ren,ret_2051,ret_net,bannom,ctacte,concepto,moneda,cambio,cheque,impletras

CREATE CURSOR tmp (_licencia c(8),_fecha d,_benefic c(80),_total1 n(18),_cta_cta c(12),_cta_nom c(80),_importe n(18),_ret_iva n(15),_ret_ren n(15),_ret_2051 n(15),_ret_net n(18,2),_bannom c(80),_cta_cte c(20),_concepto c(80),_moneda c(5),_cambio n(10),_cheque n(8),_impletras c(160))
SELECT tmp
		APPEND BLANK 
		REPLACE _licencia  WITH licencia
		REPLACE _fecha 	   WITH fecha
		REPLACE _benefic   WITH benefic
		REPLACE _total1    WITH total1
		REPLACE _cta_cta   WITH cta_cta
		REPLACE _cta_nom   WITH cta_nom
		REPLACE _importe   WITH importe
		REPLACE _ret_iva   WITH ret_iva
		REPLACE _ret_ren   WITH ret_ren
		REPLACE _ret_2051  WITH ret_2051
		REPLACE _ret_net   WITH ret_net
		REPLACE _bannom    WITH bannom
		REPLACE _cta_cte   WITH ctacte
		REPLACE _concepto  WITH concepto
		REPLACE _moneda    WITH moneda
		REPLACE _cambio    WITH cambio
		REPLACE _cheque    WITH cheque
		REPLACE _impletras WITH impletras
				
SELECT *;
from DETALLE,tmp INTO CURSOR _nuevo

SELECT _nuevo
BROW
REPORT FORM "FORMATO\Orden\Orden5.frx" NOCONSOLE PREVIEW 		
