cFile :=PathSist+"FASTREPO\CERTI_ZW.FR3"
cTitulo :="Impresión de certificados"
oFr :=FrReportManager():New()
oFr:LoadLangRes(PathSist+"Spanish.xml")
oFr:SetTitle( cTitulo )
oFr:SetIcon( "ADEXTRA" )
oFr:SetUserDataSet( "aCertifica","OPE_NOMBRE;OPE_DOMICILIO;OPE_LOCALIDAD;OPE_RESPONSAB;OPE_DNIRESPON;CLI_CLIENTE;"+;
"CLI_RAZON_SOC;CLI_CALLE;CLI_LOCALIDAD;CLI_TELEFONOS;RESIDUOS;TIPOY;TIPOH;TRATAMIENTO;"+;
"RESIDUO_FIN;MANIFIESTO;KILOS;FECHA_TRA;REGISTRO;ESTADO_F;CERTIFICADO;DISPOSICION;FECHA_CERTI;"+;
"COBRADOR;COD_PROF;CLIOPDS;REIMPRIME;OPE_CODIGO;NACION" ,;
{||np := 1}, ; //--> bGoTop
{||np := np + 1}, ; //--> bSkipPlus
{||np := np - 1}, ; //--> bSkipMinus
{||np > Len(aCertifica)}, ; //--> bCheckEOF
{|aField|nCol := IIF( aField == "OPE_NOMBRE" , 1,;
IIF( aField == "OPE_DOMICILIO" , 2,;
IIF( aField == "OPE_LOCALIDAD" , 3,;
IIF( aField == "OPE_RESPONSAB" , 4,;
IIF( aField == "OPE_DNIRESPON" , 5,;
IIF( aField == "CLI_CLIENTE" , 6,;
IIF( aField == "CLI_RAZON_SOC" , 7,;
IIF( aField == "CLI_CALLE" , 8,;
IIF( aField == "CLI_LOCALIDAD" , 9,;
IIF( aField == "CLI_TELEFONOS" ,10,;
IIF( aField == "RESIDUOS" ,11,;
IIF( aField == "TIPOY" ,12,;
IIF( aField == "TIPOH" ,13,;
IIF( aField == "TRATAMIENTO" ,14,;
IIF( aField == "RESIDUO_FIN" ,15,;
IIF( aField == "MANIFIESTO" ,16,;
IIF( aField == "KILOS" ,17,;
IIF( aField == "FECHA_TRA" ,18,;
IIF( aField == "REGISTRO" ,19,;
IIF( aField == "ESTADO_F" ,20,;
IIF( aField == "CERTIFICADO" ,21,;
IIF( aField == "DISPOSICION" ,22,;
IIF( aField == "FECHA_CERTI" ,23,;
IIF( aField == "COBRADOR" ,24,;
IIF( aField == "COD_PROF" ,25,;
IIF( aField == "CLIOPDS" ,26,;
IIF( aField == "REIMPRIME" ,27,;
IIF( aField == "OPE_CODIGO" ,28,;
IIF( aField == "NACION" ,29, ))))))))))))))))))))))))))))), aCertifica[np, nCol] } )
oFr:LoadFromFile( cFile )
cImagen:="1"
cTitulo2:="CERTIFICADO DE TRATAMIENTO DE RESIDUOS"
oFr:AddVariable("Mis variables","Titulo informe","'"+cTitulo +"'")
oFr:AddVariable("Mis variables","cUser" ,"'"+cUser +"'")
oFr:AddVariable("Mis variables","nUser" ,"'"+nUser +"'")
oFr:AddVariable("Mis variables","cEmpresa" ,"'"+cEmpresa+"'")
oFr:AddVariable("Mis variables","cImagen" ,"'"+cImagen +"'")
oFr:AddVariable("Mis variables","Titulo2" ,"'"+cTitulo2+"'")
IF lDisenio
oFr:DesignReport()
ELSE
oFr:PreviewOptions:SetButtons( 1+4+8+16+32+64+128+1024+2048+4096 )
ENDIF
oFr:ShowReport()
oFr:ClearDataSets()
oFr:DestroyFR()