Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Master-detail in Quickreport

Posted on 2004-04-21
5
Medium Priority
?
822 Views
Last Modified: 2013-11-22
Hi, I have a question. It has been asked multiple times, but I can't get things the way I want. Here is mys problem:
I have 2 tables: Artikelgroep.db and Artikel.db; fields in Artikelgroep.db: artikelgroep, artikelgroepID
                                                                    fields in Artikel: ArtikelgroepID, omschrijving, btw,...
I would like to use a TQuery to do the following in a Quickreport:

Artikelgroep1
  omschrijving1
  omschrijving2
Artikelgroep2
  omschrijving1
  omschrijving2  // so a master-detail

I read the answers asked before, tried everthing, from QRGroup to QRdetail; the only thing I get is
Artikelgroep1
  omschrijving1
Artikelgroep2
  omschrijving2
Artikelgroep2
  omschrijving1
....

Can you help me as soon as possible ?
thx a lot

0
Comment
Question by:marioway
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 500 total points
ID: 10876724
similar to a qr-q that i've last answered

use one query like

select * from Artikelgroep ag, Artikel a where ag.artikelgroepID = a.artikelgroepID order by ag.artikelgroepID

use a quickreport-layout like

+-------- Groupband1 - GroupExpression = Dataset.artikelgroepID -
| [Field] [Field] ....
+-------- DetailBand - ---------------------------------------------------
| [Field] [Field] ....

hope this helps

meikl ;-)
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 10876740
btw.

>I read the answers asked before, tried everthing, from QRGroup to QRdetail ...

guessing you're query didn't have an order by clause
-> its very important, that the query is sorted like your grouping-scheme

meikl ;-)
0
 

Author Comment

by:marioway
ID: 10877436
Hi, I've tried your solution, but what I got :

Artikelgroep1
  omschrijving1
  omschrijving2
  omschrijving1

This is the query I use: SELECT Artikelgroep.ArtikelgroepID, Artikel.Omschrijving, Artikel.ArtikelgroepID, Artikel.Code, Artikel.Stukprijs, Artikel.Btw, Artikel.Prijsexclbtw, Artikel.Prijsinclusiefbtw, Artikel.Volumepunten, Artikel.ArtikelID
FROM "artikel.DB" Artikel, "artikelgroep.DB" Artikelgroep
WHERE  Artikel.ArtikelgroepID = Artikelgroep.ArtikelgroepID
ORDER BY Artikelgroep.ArtikelgroepID

On Quickrep1: Group-band and detail-band.
Dataset for TQuery --> ?
Dataset for Quickrep1 I set to Query (in my case Query20)

Did I forget something ? Group by for instance ?

thx
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 10877531
did you set the groupExpression?

>Dataset for TQuery -->
guessing you mean the Dataset-property of the TQuery
-> should be empty (nil)

>Group by for instance ?
a group by cluase is only needed,
if you have aggregate-functions within the query like sum/max/etc.

it looks ok for me,
except i miss the
Artikelgroep.Artikelgroep-field
in your query

don't hestitate to send me your report via email
(you found my email in my profile)

i guess its some marginal adjustment to
get it work like expected, but its hard to solve from far for me

meikl ;-)
0
 

Author Comment

by:marioway
ID: 10882439
Hallo, I think I found the problem: in QRGroup - expression I put: artikelgroep.ArtikelgroepID; now I changed it to ArtikelgroepID (without the artikelgroep.) . And it works fine.

I thank you very much for your time and effort.

marioway
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

609 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