Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Master-detail with queries

edited February 2002 in General
Hi Tech support,

Is there a example of using Tqueries for a master-detail report.

Randy

Comments

  • edited February 2002
    Just use them as any Master/detail relationship in Delphi. The detail
    query must have pararameters with the same name that the ones that links
    on the master table.
    You don't have to do any else on RB.

  • edited March 2002
    Check out the Delphi help on query linking

    Master SQL Example:
    SELECT CustNo, Company, Addr1, Addr2, City, State, Zip, Country, Phone, FAX,
    TaxRate, Contact, LastInvoiceDate

    FROM "customer.DB" Customer

    ORDER BY Company

    Detail SQL Example:
    SELECT OrderNo, CustNo, SaleDate, ShipDate, EmpNo, ShipToContact,
    ShipToAddr1, ShipToAddr2, ShipToCity, ShipToState, ShipToZip, ShipToCountry,
    ShipToPhone, ShipVIA, PO, Terms, PaymentMethod, ItemsTotal, TaxRate,
    Freight, AmountPaid

    FROM "orders.db" Orders

    WHERE CustNo = :CustNo

    ORDER BY OrderNo


    --
    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.