Storing data in a report using the Data view

Usually you retrieve data into a report from the database, because the data is changeable and you want the latest information. However, sometimes the data you display in a report never changes (as in a list of states or provinces), and sometimes you need a snapshot of the data at a certain point in time. In these situations, you can store the data in the report itself. You do not need to go out to the database or other data source to display the data.

The most common reason to store data in a report is for use as a drop-down DataWindow where the data is not coming from a database. For example, you might want to display a list of postal codes for entering values in a State or Province column in a form. You can store those codes in a report and use the DropDownDataWindow edit style for the column.

For more information about using the DropDownDataWindow edit style, see Displaying and Validating Data

To store data in a report:

  1. If the Data view is not already displayed, select View>Data from the menu bar.

    In the default layout for the Report painter, the Data view displays in a stacked pane under the Properties view. All columns defined for the report are listed at the top.

  2. Do any of the following:

    • Click the Insert Row button in the PainterBar to create an empty row and type a row of data. You can enter as many rows as you want.

    • Click the Retrieve button in the PainterBar to retrieve all the rows of data from the database. You can delete rows you do not want to save or manually add new rows.

    • Click the Delete button in the PainterBar to delete unwanted rows.

    Data changes are local to the report

    Adding or deleting data here does not change the data in the database. It only determines what data will be stored with the report when you save it. The Update DB button is disabled.

  3. When you have finished, save the report.

    When you save the report, the data is stored in the report.

Sharing data with the Preview view

To see changes you make in the Data view reflected in the Preview view, select ShareData from the pop-up menu in the Data view. The Preview view shows data from the storage buffer associated with the Data view.

What happens at runtime

When you run a report with stored data, the data is already there. InfoMaker does not retrieve data.

InfoMaker never retrieves data into a drop-down DataWindow that already contains data. For all other reports, if you retrieve data into a report stored with data, InfoMaker handles it the same as a report that is not stored with data: InfoMaker gets the latest data by retrieving rows from the database.