PARAMETERS formato,bannom,licencia,fecha,benefic,importe,impme,bancoid,banmon,cheque,concepto,cambio,moneda,impletras,orden,centro,cennom

	CREATE CURSOR tmp (_licencia c(8),_fecha d,_benefic c(80),_orden n(8),_bancoid c(3),_bannom c(30),_importe n(15,2),_cheque n(15),_concepto c(100),_impletras c(160),_impme n(15,2),_banmon c(4),_cambio n(15,2),_moneda c(4),_centro n(2),_cennom c(50))		  			       
	SELECT tmp
	APPEND BLANK 
	REPLACE _licencia 	WITH licencia
	REPLACE _fecha 		WITH fecha
	REPLACE _benefic 	WITH benefic
	REPLACE _orden 		WITH orden
	REPLACE _bancoid 	WITH bancoid
	REPLACE _bannom 	WITH bannom
	REPLACE _importe 	WITH importe
	REPLACE _impme 		WITH impme
	REPLACE _cheque 	WITH cheque 
	REPLACE _concepto	WITH concepto
	REPLACE _banmon 	WITH banmom
	REPLACE _cambio 	WITH cambio
	REPLACE _moneda 	WITH moneda
	REPLACE _impletras 	WITH impletras 
*	replace _centro     WITH centro
*	replace _cennom 	WITH centro
	
	if formato = 1		
		SELECT tmp
		REPORT FORM "FORMATO\Orden\Orden1.frx" NOCONSOLE PREVIEW 		
	ENDIF	

	if formato = 2
		SELECT tmp
		REPORT FORM "FORMATO\Orden\Orden2.frx" NOCONSOLE PREVIEW 
	ENDIF

	IF formato = 3
		SELECT *;
		from detalle1,tmp INTO CURSOR nuevo	
		SELECT nuevo
		REPORT FORM "FORMATO\Orden\Orden3.frx" NOCONSOLE PREVIEW
	ENDIF

	IF formato = 4								
		SELECT *;
		from detalle1,tmp INTO CURSOR nuevo
		SELECT nuevo
		REPORT FORM "FORMATO\Orden\Orden4.frx" NOCONSOLE PREVIEW
	ENDIF

