Selecting a classic report's data source object

You can select a new data source object for the current classic report or specify that a form will always use a specific data source object to produce a classic report.

About this task

Changing data source objects by using the Data Source Object dialog makes it easy to view different sets of query results data in the same classic report format. QMF will run the newly selected data source object, format the query results using the current form, and display the updated report in the active editor window.

Specifying that a particular data source object will always be used when a form is opened streamlines the steps required to create a classic report. If specified, when QMF opens such form, it will find the assigned data source object, run the object, format the query results according to the specifications of the form and display the generated classic report in the editor window. If you do not specifically assign a data source object to a form, then when you open that form, QMF formats the currently active query results into a report. If you want specific query result data for the report, you must find the object, run the object and then generate the report.

To specify a data source object:


  1. Open the Data Source Object window.

    With a form in the active window, select Form > Data Source Object.

  2. Specify where the data source object is located by selecting one of the following options:
    • Click From file to specify that the data source object is saved to a file located on a local or network drive. The required fields become available. Specify the name of the file in the Name field. You can search the list of available files by clicking the Browse button.
    • Click From data source to specify a data source object that is stored on a database. The required fields become available. Specify the data source where the object is stored in the Data Source field. Specify the owner, name, and type for the data source object in the Owner, Name, and Type fields. You can click the List Objects button to search the database for an object.
    • Click From repository to specify a data source object that is saved in a repository. The required fields become available. Expand repository directories and folders to expose the data source object that you want to select.
    • Click From open object to get the data source object from one of the currently open query objects. Select the name of the object from the Title list box of the open query objects.
  3. If the data source object that you have selected produces multiple result sets, as in the case with stored procedures or multiple SQL statement queries, specify the index number of the result set that you want to use in the Result set field.
  4. Check the Always use this object when opening this document check box to specify that whenever the currently active form is opened, the object that you specified will be used as the data source object. This option is not available when the selected data source object is a currently open object.
  5. Click OK to generate the report using the selected data source object. If you specified that the currently selected data source object always be used when this form is opened, the next time you open the form the object will be run, and the query results will be formatted according to the specifications of the form into a report.