?
Solved

Master-detail in Quickreport

Posted on 2004-04-21
5
Medium Priority
?
814 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

770 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