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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database question 1

Status
Not open for further replies.

genoah

Programmer
Nov 1, 2001
24
0
0
US
I have a application the takes records from three different tables. I am using qreport on delphi2. When I search for a customer, it list all invoice that have come in for that customer. When I try to print it, as soon as quickreport activates it resets the client database to the very first one. Can anyone help me>\?%-(
 
I'm guessing that you're using a master-detail relationship between the tables (i.e. 'Customer' as the master and 'Invoice' as the detail).
If the QuickReport has the master table ('Customer') set as its DataSet property then the QuickReport will go to the first entry in the table and cycle down.
If you're looking at only printing those invoices related to the current selected Customer it might be advisable to set the QuickReport DataSet to be 'Invoice' table such that the report cycles through this table for the customers invoices. Alternatively set up an additional table (or query) component pointing to the 'Customer' table in the database through use of a master-detail such that this new table only displays the required customer details. Setting this as the DataSet for the QuickReport (along with a linked table for the customer invoices) might also be another way of tackling this.
Hope this helps.
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top