ACE Report writing, I'm confused.
Posted in 1994
Topics: Performance & Tuning
Ok, I've got a simple question here. I've got another one of those
questions where I THINK I'm looking right at the answer but can't see
it. I'm asking it here in the hopes that maybe the answer would help
a few other people too. I suppose the crux of the problem is that I try
to visualize too many things. :/
Let me ask a hypothetical question here. Using Informix 2.10, I've got
three tables, they way they connect can best be described as one of the
sales examples in the manual.
Table #1, Customer info:
CustNum {Indexed key},
name, address, city, state, zip, phone.....
Table #2, Purchase info:
CustNum {Indexed key}, OrderNum {Indexed key},
salesman, date, time, weight......
Table #3, Order info:
OrderNum {Indexed key},
Long field of misc notes in text form.
For any one customer (T1), there can be many orders (T2).
For any order (T3), there can be many (or none) entries in T3.
Now, if I do a query:
select *
from t1, t2
where t1.custnum = t2.custnum
....I can see (I think) how the internal "temp" table gets filled with lines
composed of each table. I would visualize it (in text dump form) as:
|t1.f1|t1.f2|t1.f3|....|t2.f1|t2.f2|t2.f3|....
Now I have a new table (T"t") which has N(T1)+M(T2) fields.
This is ok if I want to print it with all the info from both tables at
the same time. But what if I wanted to print the stuff from T1 ONCE,
then for all occurances of T2 that "connect" to T1, print them after it?
Something like:
"T1" info..... {First customer}
"T2" #1
"T2" #2
"T2" #3
"T2" #n
"T1" info..... {next customer}
"T2" #1
"T2" #2
"T2" #n
And if I want to complex it so that the T3 entries go below the order
they are assocated with, like this:
"T1" info..... {Nth customer}
"T2" #1 (No notes)
"T2" #2
"T3" #1
"T3" #2
"T3" #3
"T3" #4
"T2" #3
"T3" #1
"T3" #2
I don't seem to be able to figure this out. I realize the problem I'm
presenting here is an ACE report writer problem (as well as not perfectly
clear in it's presentation) but I think I get the gist of the problem across.
Does anyone have any recomended reading/searching/tutorials that I could
work with to try and clear this up OR can someone out there offer me a few
words of wisdom in pursuit of a solution to this?
As always, thank you very much for your time on this.
I will boil-down and summarize replys either via email or network if
requested.
--
<< MCT >> mtiernan@vci.com
Michael C Tiernan. support@vci.com
Customer Support Engineering VENIX - Industrial Strength UNIX
VenturCom Inc (617) 661-1230 The only realtime, _REAL_ UNIX
Cambridge, MA. (617) 577-1607 (FAX) you can buy.
--
<< MCT >> mtiernan@world.std.com
Michael C Tiernan. GEnie: M.Tiernan
Boston Computer Society member AOL: M Tiernan or BCS Mike
Is God a performance artist?