Database Toolbox Previous page   Next Page

Customized Display of Results in the Report Generator

If the MATLAB Report Generator is installed, you can customize the display of results using that product.

  1. Because some browser configurations do not launch automatically, you might need to start your Web browser before using this feature.
  2. After executing a query, select Report Generator from the Display menu.
  1. The Report Generator interface opens.

  1. In the contents listing, select databasetlbx.rpt (in $matlabroot/toolbox/database/vqb). This is a sample report template. You can create and use your own reports.
  2. Modify the report format--click Open Report.
    1. In the left column, under Report Generator -> Report databasetlbx.rpt, select Table - ans.
    2. In the right column, under Table Content, for Workspace Variable Name, replace the default, 'ans' with the Workspace variable name you had assigned to the query result in the Visual Query Builder, for example, 'A'.
    3. In the right column, under Header/Footer Options, set the Number of header rows to 0.
    4. Click Apply.

  1. Click the Help button in the dialog box for more information about this and other features of the Report Generator.

  1. To run and view the report, select File -> Generate Report.
  1. The report appears in your system's default Web browser.

  1. Note that the names of the Fields from the Visual Query Builder do not automatically appear as column headers in the report, as they did for the feature described in Report Display of Results in a Table. You can modify the workspace variable, for example, A, to include the field names so that they will appear in the report. For example, in the Command Window, redefine A using

In the Report Generator, change the Header/Footer Options, Number of header rows to 1 (refer back to step 4-c for details). The output report now shows the field names as headings.

Each row represents a record from the database. For example, sales for item 400876 are 3000 in January, 2400 in February, and 1500 in March.


Previous page  Report Display of Results in a Table Fine-Tuning Queries Using Advanced Query Options Next page

© 1994-2005 The MathWorks, Inc.