{ ------------------------------------------------------------------------------ PROGRAMA : CPPRRP008 OBJETIVO : Reportar los suplidores con saldos en cero PROGRAMADOR : Juan soto FECHA : Octubre 28, 1993" ------------------------------------------------------------------------------- } database juviar end define variable fecha date end input prompt for fecha using "Entre fecha del reporte " end output report to printer end select b.cod_sp, b.cod_sp_sec, b.nom_sp, sum(a.valor) valor from cotb00001 b,outer cptb00001 a where b.cod_sp = a.cod_sp and b.cod_sp_sec = a.cod_sp_sec and a.status_t is null and b.status_t is null and a.fecha_orig >= $fecha group by 1,2,3 having sum(a.valor) = 0 order by 2 end format page header print column 1, "cpprrp008" print column 17, "R A Y .O. V A C D O M I N I C A N A, S. A.", column 70, today using "dd/mm/yy" print column 29, "REPORTE SALDO EN CERO", column 70, time print column 34, "AL ",fecha using "dd/mm/yy" skip 2 lines print column 1, "Suplidores", column 50,"Balance" print column 1, "--------", column 50,"-------" skip 2 lines on every row print column 1, cod_sp using "&&","-",cod_sp_sec using "&&&&", 2 spaces,nom_sp, column 53, valor using "##.##" on last row print column 1, "Total de registros impresos==> ", count using "#,###" end