Solved

How can I use detail information in Qreport using a Mastertable

Posted on 1998-11-10
7
163 Views
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
0
Comment
Question by:Antoninosciarrino
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1346428
heh? sorry.
0
 
LVL 4

Expert Comment

by:dwwang
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.
0
 

Author Comment

by:Antoninosciarrino
ID: 1346430
Edited text of question
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 4

Accepted Solution

by:
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.
0
 
LVL 27

Expert Comment

by:kretzschmar
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

meikl
0
 
LVL 27

Expert Comment

by:kretzschmar
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

meikl
0
 

Author Comment

by:Antoninosciarrino
ID: 1346434
kretzschmar's answer was clearer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Using idhttp to login to instagram 2 75
how to center only a line in richedit? 4 52
HTML text in the body of an email (delphi code) 12 94
Convert a string into a TDateTime 5 50
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

932 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

13 Experts available now in Live!

Get 1:1 Help Now