Managing cached query results

You may find it inconvenient to input a property value that is long and complicated. To help you with this, JReport Designer provides a tool for managing your cached query results, the Data Source Driver Manager.

Assume that a cached query result file orderstat_cached for the query OrderStat in the catalog file SampleReports.cat has been created and saved in C:\JReport\Designer\Cached. To use the Data Source Driver Manager, follow the steps below:

  1. Click File > Catalog Management > Open Catalog in JReport Designer.
  2. In the Open Catalog File dialog, select to open the catalog file SampleReports.cat.
  3. In the Catalog Browser, click the Data Source Driver Manager button on the toolbar to open the Data Source Driver Manager dialog.
  4. Click the Add button, and the Data Source Editor dialog appears. See the dialog.
  5. Input a name for the driver in the Driver Name box. Here, we name it OrderStat.
  6. Check the URL radio button and input the URL as follows:

    jrquery:/jet.universe.resultfile.UResultFileResultSet;Full path of the cached query result

    In the example, the URL is jrquery:/jet.universe.resultfile.UResultFileResultSet;C:\JReport\Designer\Cached\orderstat_cached

    Note: If you check the Driver radio button to specify the driver, you will need to input the class name and parameter of the driver as below:
    • Class Name: jet.universe.resultfile.UResultFileResultSet
    • Parameter: Full path of the cached query result (C:\JReport\Designer\Cached\orderstat_cached in this example)

    Then, a URL will be generated according to your input information.

  7. Click OK to add the driver to the Data Source Driver Manager.
  8. Repeat the above steps to add more drivers to the manager.
  9. In the Data Source Driver Manager dialog, all the added drivers will be listed in the Data Source Driver Manager box. Click OK to close the dialog.

Upon running a report using a cached query result, you can choose an appropriate driver from the Data Driver property's drop-down list directly without inputting the long value manually.

Note: Drivers added to the Data Source Driver Manager can also be removed and edited. To do this, first click on the Catalog Browser toolbar to open the Data Source Driver Manager dialog, then,