Re: ACE Report Question
Posted in 1994
>Table 1: ID# | Name | Phone |
> ------+------+----------+
> 111111| Bob | 555-1212 |
> 222222| John | 333-1212 |
> 333333| Jack | 111-1212 |
>
>Table 2:
> ID# | Book # |
> ------+--------+
> 111111| 1 |
> 111111| 2 |
> 111111| 3 |
> 222222| 5 |
> 333333| 4 |
> 333333| 6 |
>
>The report I want to generate will look something like this:
>
> Name: Bob ID #: 111111
> Books: 1, 2, 3
>
> Name: John ID #: 222222
> Books: 5
>
> Name: Jack ID #: 333333
> Books: 4, 6
>
How about something like this:
database blah
end
select tab_1.name, tab_1.ID, tab_2.book
from tab_1, outer tab_2 { 'outer' if you want to list no-book people }
where tab_1.ID = tab_2.ID
order by ID, book
end
format
before group of ID
print "Name: ", name, " ID #:", ID
print "Books: ";
on every row
print book, 2 spaces;
after group of ID
print ""
skip 1 line
end
... something like that, anyway.
Paul