Board index » delphi » Small query abt. TQuickReport

Small query abt. TQuickReport

I want to know iz it possible to use two datasets for a report All the
TQRDB... components have properties *DataSet* and *DataField* So I can
use different dataset for a DB component but If i place them in Detail
band then how will it show the report.
   Another thing that I want to ask is that if I have a PageHeader Band
and I want data from a diferent table as to data in the Detail Band...
How iz it possible.
   Lastly, In the Dataset property of TQuickReport which dataset to
incude if my report picks data from multiple datasets.

Pls reply soon!!!


Re:Small query abt. TQuickReport

>I want to know iz it possible to use two datasets for a report All the

You can use as many datasets as you want. But QR "knows" only one -
refferred in its DataSet property. "Knows" here means, that QR iterates data
set from top to bottom, print detail band for each record, etc.

Typical case of more than one data set is "master-detail" relationship. If
you have two datasets linked in that manner, and master dataset is
QR.DataSet, than Delphi does all job for you. That is, QR will walk through
master dataset and Delphi will move cursor in "details" on each new master

In more complex case you may have any number of datasets. But QR still
"knows" only one of them. Hence, you must take care of moving cursors in
other datasets yourself. For example in OnBeforePrint event of detail band,
you can make lookup (or whatever you need) in other tables to position

Sergei Soudakov

Other Threads