Re: ACE report advice?
Posted in 1997
Something like this might work. Say I want to list all of today's invoices
and which country they went to. I select that data into a temp table and then
outer-join the country table (assumed to contain all countries) to that temp
table. This way we get a record for every country, whether or not any invoices
wne there today. The null-ness of inv_num can trigger a "nothing found" type
message in the format section:-
database <dbname>
end
select b_country_code, inv_num
from <invoicetable>
where inv_date = TODAY
into temp t1 with no log ;
select country.country_code, t1.inv_num
from country, outer t1
where country.country_code = t1.b_country_code
order by country_code, inv_num
end
format
before group of country_code
skip 2 lines
print "Today's invoices to country ", country_code
print "_______________________________"
on every row
print column 8, inv_num
after group of country_code
if ( inv_num is null ) then
print "(nothing found for ", country_code, " today)"
end
Any use?
- Paul