How can I use detail information in Qreport using a Mastertable

Posted on 1998-11-10
Last Modified: 2010-04-04
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
Question by:Antoninosciarrino
  • 2
  • 2
  • 2
  • +1

Expert Comment

ID: 1346428
heh? sorry.

Expert Comment

ID: 1346429
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.

Author Comment

ID: 1346430
Edited text of question
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.


Accepted Solution

dwwang earned 100 total points
ID: 1346431
Firstly, you shold know how to build master-detail querys, with those two queries, you can put a detail band and a sub-detail band on the report.

Then set the dataset of the detail band to the master query, and the dataset of sub-detail band to detail query. Also set the master property of the sub-detail band to the report you are designing.

then you get all done, any questions, please tell me.
LVL 27

Expert Comment

ID: 1346432
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

LVL 27

Expert Comment

ID: 1346433
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


Author Comment

ID: 1346434
kretzschmar's answer was clearer

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now