Board index » delphi » List a master and two detailss table side by side in QR

List a master and two detailss table side by side in QR

I have 3 tables : Candidate (master), Qualifications, (details) and
WorkExperience (details). A sample record of a particular candidate
would look like this

Candidate Table
=============
Can_ID          Name
1               Can1

Qualification Table
===============
Can_ID          Item_No Can_Quali
1               1               Quali11
1               2               Quali12
:               :               :
1               M               Quali1M

WorkExperience Table
==================
Can_ID          Item_No Can_WorkExp
1               1               WorkExp11
1               2               WorkExp12
:               :               :
1               N               WorkExp1N

M, N can be zero. M can be different from N.

I want to list the record like this in my report
--------------------------------------------------------------------------
Can1            Quali11         WorkExp11
                :               :
                Quali1M         WorkExp1N
---------------------------------------------------------------------------
Can someone tell me how to do this  using QR.
I am using D3.0 Pro.

TIA

See Liang
GeniurSoft Enterprise
sa...@pc.jaring.my

 

Re:List a master and two detailss table side by side in QR


Try something like this

Put a band on the report with a qrdbtext1, qrmemo1, qrmemo2
Use candiddate table as dataset for band
Set master detail relation between candidate and the other two tables.
In the before print event of the band fill the qrmemo1.lines from the
detail tables.

This shoul work OK until you get to the botom of the page when you may
find the two memo components get split up. You can check the value of
quickrep.currenty and call newpage if you do not have room to print both
memos on one page.You will need to do some testing to get the interline
spacing in the memos.

Hope this gives you some ideas

John

Other Threads