Specifications
CHAPTER 8 Displaying and Validating Data
Users Guide 281
The DropDownDataWindow edit style
Sometimes another data source determines which data is valid for a column.
Consider this situation: the
Department table includes two columns, Dept_id
and
Dept_name, to record your company’s departments. The Employee table
records your employees. The
Department column in the Employee table can
have any of the values in the
Dept_id column in the Department table.
As new departments are added to your company, you want the form containing
the
Employee table to automatically provide the new departments as choices
when you enter values in the
Department column.
In situations such as these, you can specify the DropDownDataWindow edit
style for a column: it is populated from another report. When you go to the
column, the contents of the DropDownDataWindow display, showing the latest
data:
❖ To use the DropDownDataWindow edit style:
1 Create a report that contains the columns in the detail band whose values
you want to use in the column.
You will often choose at least two columns: one column that contains
values that the user sees and another column that contains values to be
stored in the database. In the example above, you would create a report
containing the
dept_id and dept_name columns in the Department table.
Assume this report is named
d_dddw_dept.
2 For the column in a second DataWindow getting its data from the
d_dddw_dept report, select the DropDownDW edit style.