You can create a query that performs a SQL join. Or you can create two queries and link the detail query to the master query based upon the foreign key.
For example, using the DBDemo database, you can create a Customer query and an Orders query and then link Orders to Customer on the CustNo field. When you do this, ReportBuilder will create special linking SQL that selects only the appropriate records in the detail. See article below...
Linking DataViews in the ReportBuilder Data workspace (DADE), requires that the detail data be sorted by the linking fields. When DataViews are linked, DADE generates special linking SQL for the detail DataView. The linking SQL (Magic SQL) can be viewed by positioning the mouse over the DataView window and pressing Ctrl + Left Mouse button. The results of the Magic SQL query can be viewed by pressing Shift + Left Mouse button.
ReportBuilder's DataPipeline architecture includes support for linked data traversal. Whenver the record position of the master data changes, the traversal logic compares the master and detail field link values and then determines where to locate the record position for the related detail data. The linking logic will only work properly if the Database engine's collation of the detail query result set is in sync with ReportBuilder's internaly field link comparison logic.
-- Nard Moseley Digital Metaphors Corporation www.digital-metaphors.com
Best regards,
Nard Moseley Digital Metaphors www.digital-metaphors.com
Comments
You can create a query that performs a SQL join. Or you can create two
queries and link the detail query to the master query based upon the foreign
key.
For example, using the DBDemo database, you can create a Customer query and
an Orders query and then link Orders to Customer on the CustNo field. When
you do this, ReportBuilder will create special linking SQL that selects only
the appropriate records in the detail. See article below...
-------------------------------------------
Tech Tip: Linking DataViews
-------------------------------------------
Overview
---------
Linking DataViews in the ReportBuilder Data workspace (DADE), requires that
the detail data be sorted by the linking fields. When DataViews are linked,
DADE generates special linking SQL for the detail DataView. The linking SQL
(Magic SQL) can be viewed by positioning the mouse over the DataView window
and pressing Ctrl + Left Mouse button. The results of the Magic SQL query
can be viewed by pressing Shift + Left Mouse button.
ReportBuilder's DataPipeline architecture includes support for linked data
traversal. Whenver the record position of the master data changes, the
traversal logic compares the master and detail field link values and then
determines where to locate the record position for the related detail data.
The linking logic will only work properly if the Database engine's collation
of the detail query result set is in sync with ReportBuilder's internaly
field link comparison logic.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com