Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delphi quick report

Status
Not open for further replies.

Tman60

Programmer
Aug 19, 2009
4
ZA
I need to use the delphi quick report's details band, in such a way that I link two tables, I have tried using the add datasets in vain please help
 
This is the code that I tried using, in order to access an extra table on my quickreport's details band, unfortunately I just can't access the "ExtraTable" fields.

procedure TBankRecReport.QuickRepBeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);

begin
BankReport.AllDatasets.Add(ExtraTable);
end;
end.
 
All you code shows is that you've added the table name to a list. I see nothing to indicate the table is located or open.

I did find reference to AllDataSets here:
However, although I've generated dozens of reports with D7/QR3.5, I have never used nor found a need for property AllDataSets. In fact, until now, I did not know it existed since it is not even listed under TQuickRep properties in the Object Inspector.

Furthermore, I don't even identify property TQuickRep.DataSet. (I leave it blank.) I do have my TQRDBText.DataSet identified as well as TQRDBText.DataField and have found that this is all that's required to generate a report.

I do however, open my table(s), apply the required range and/or apply any required filter(s) prior to creating/printing the report(s). It works every time.

Let me know if that works for you...


Roo
Delphi Rules!
 
Thanks Roo
Sorry I just forgot to show where I open the table, but then you can just open your table on the on report print events. Let me further explain how this property is supposed to work, first the quickreport uses only one table at a time, so when you need to add extra table, it is said it suppose to work. anyway it never did work with me.
Thanks a lot your reference on helped a lot, you are a star thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top