Choose your database:
MS SQL Server
SQL Anywhere

Subscribe to our news:

MaxDB PHP Generator online Help

Prev Return to chapter overview Next

Master-Detail Presentations

Master-detail presentations allow you to view and edit records from master and detail data sources (like country/city) on a single page. So, browsing the page representing product information, you can, for example, see all the orders related to a certain product, add new orders, edit/delete existing orders, and so on; working with list of continents - to inspect countries of the specific continent as on the picture below.



You can also create nested master-detail presentations when you can see the "details of details". On the picture below the webpage with a list of continents is represented. For any continent all the corresponding countries may be browsed with a single click and at the same time it is possible to see cities of a certain country.



First 20 detail records can be previewed without opening a separate page. To see all the detail records, click the Full view link above the detail data grid. Alternatively you can access a detail page using the drop-down list on the right of the plus button.



Database schema requirements

To create a two-level master-detail presentation, you need two tables with a parent-child relationship. The foreign key constraints are not required but highly recommended to enforce the referential integrity at the database level.


Creating master-detail views

There are two ways to provide the result webpage with a master-detail presentation:


Automatic creation

If tables are linked with a foreign key and the Setup details by foreign key option is enabled, the first-level detail pages are created automatically.



Manual creation

If tables are NOT linked with a foreign key or the Setup details by foreign key option is disabled, you can create detail pages manually as described below. The same technique is applied for creating nested detail pages.


1. At the Page Management step of the wizard select a root-level page you want to create a detail page for or (for creating a nested detail page) select a detail page in the corresponding list.


2. Click the Add... button on the right of the detail page list to open Link Editor.



3. Select a detail data source (table, view, or query) and columns from the Master field and Detail field lists. Click Add to add a link condition (you can specify multiple columns from each list for a single link). Click Remove to delete a field pair.



4. Click OK to save changes and close Link Editor.



Prev Return to chapter overview Next