FUNCTION ctiposCliente() DEFINE ktipocliente SMALLINT, dclientes CHAR(30), pventas ui.ComboBox LET pventas = ui.combobox.forname("formonly.tipo_venta") DECLARE btipos CURSOR FOR SELECT DISTINCT b.tipo_cliente,'('||CONVERT(CHAR(6),b.tipo_cliente)||')'||a.descripcion FROM vetb00061 a,vetb00060 b WHERE a.ventas = b.ventas CALL pventas.clear() FOREACH btipos INTO ktipocliente,dclientes CALL pventas.additem(ktipocliente,dclientes) END FOREACH CALL pventas.additem(99,"TODAS") END FUNCTION