QBE/List Combination Blocks

QBE and List blocks can be combined so that they are both displayed on the same screen.  This allows the user to enter query restrictions, show a list of the results, and then modify the query information without having to return to the query screen.

To set up a QBE/List block combination, first create your QBE block.  When creating the block, make sure to select the Form scheme and include the block in both the QBE and List modes.

Then, create the List block as you would normally.  Remember that in order for the search to work, your QBE and List database blocks need to be named the same.  For example, if your QBE database block was named SALES_ORDERS, your List database block would also need to be named SALES_ORDERS.

On the designer layout screen, lay out the QBE block and the List block as you want them displayed..  When doing this, be aware that your list block will need room to expand.  For instance, you might want to place the QBE block at the top of the screen so that the list block will be below the QBE block, and not expand so much that you cannot see the QBE block when the screen is displayed in List mode.  You could also make your list block Fixed with Scroll Bars so that it will not expand but you will still be able to see all of the returned rows.

When you set up your link or button to execute the search, make sure that you include it on both the list and qbe modes.

When you run the screen, enter the query information on the qbe mode screen and press the link or button that you set up.  When the list mode screen is displayed, the query information that you entered will be included in the qbe block of the list mode screen and the results that matched your search will be displayed in the list block.  

You can then enter new query information in the qbe block and press the execute search link or button again to display the results.

Spreadsheet Generation for Query Results

Spreadsheets can be generated for the results generated from a QBE/List Combination block.  The following rules must be followed:

Generating the spreadsheet

  1. Open the screen in QBE mode.

  2. Enter the query restrictions.

  3. Press the link or button that executes the search using the ExecuteQbe(); Xephr function.

  4. When the list screen completes loading, press the link or button that creates the spreadsheet.