Link to home
Start Free TrialLog in
Avatar of Antoninosciarrino
Antoninosciarrino

asked on

How can I use detail information in Qreport using a Mastertable

I have a report for Invoicing. In my detailtable I have Items loading, delivery, etc... I need to know at every masterrecord for example the date in detailrecord loading, delivery, rail, etc... How can I do this ? Structure : Invoicetable (Invoicenr, invoicedate, jobnumber)
Ex. 80001, 15/08/98, 10001
Ordertable : Jobnumber, weight, container
10001, 8000,TEST01
Ord_itemtable : Jobnumber, item, date1, date2 (ex.
10001, LOADING, 15/08/98, 17/08/98
10001, DELIVERY, 19/08/98,19/08/98
10002, LOADING, 15/08/98, 16/08/98)
What I need is a report with details ex.
80001 (invoice), loadingdate (15/08/98 - 17/08/98), delivery (19/08/98-19/08/98), weight, container
Avatar of ZifNab
ZifNab

heh? sorry.
Hi, I hope this is a rather easy question, however it is not so easy to talk here, maybe you can give the data structure here and I can e-mail you ome examples.
Avatar of Antoninosciarrino

ASKER

Edited text of question
ASKER CERTIFIED SOLUTION
Avatar of dwwang
dwwang

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kretzschmar
hi Antoninosciarrino,

it can be done with one query also

the sqlstatement:

select * from table1, table2 whrere table1.orderno = YourInputOrderno and table1.orderno = table2.orderno

the fields for the head place in the pageheader-band
the fields for the posistions in your invoice place in the detail-band

meikl
hi Antoninosciarrino,

i see you've three tables.

the statement then could be

select * from invoicetable, jobtable, itemtable where invoicetable.invoicenr = YourInputInvoiceNr and  invoicetable.invoicenr =  jobtable.invoicenr and jobtable.jobnr = itemtable.jobnr

(-> this select all jobs per InvoiceNr)

append for only one job :

and jobtable.jobnr = YourInputJobNr

for sortorder append

order by tablename.fieldname, ...

Tip : use phisical tablenames in the sqlstatement not TTable-componentnames
* selects all fields from all tables to specify fields you you must name the fields instead of  * i.e select tablename.fieldname, ... from ...

placing the fields in your report see above

meikl
kretzschmar's answer was clearer