Reports Information
To construct the user interface for the business expense reporting
application, follow these steps:
- In the VisualAge Organizer, create a new application called
BusinessExpenseApp.
- Add a new visual part to your application called
BusinessExpenseView.
This is the window that will be used to generate the report. In the
next chapter, you will see how to create the report itself.
- Add a Label part and a Drop-down List part to the window. Change
the label to Name.
- Add a Multi-row Query part to the free-form surface of the Composition
Editor. Use this part to create the following query:
SELECT * FROM STAFF
- Tear off the result table from the query part.
- To display the names of staff members in the drop-down list, do the
following:
- Connect the rows attribute of the result table part to the
items attribute of the drop-down list part.
- Open the settings for the drop-down list part and type NAME in
the attributeName field. This setting tells VisualAge to
display only the NAME column of the database result table in the drop-down
list.
- To execute the query, connect the aboutToOpenWidget event of
the window to the executeQuery action of the multi-row query
part.
This part of your user interface should appear as follows in the
Composition Editor:

If you test your new window now, you will see a window with a drop-down
list. When you select the drop-down button on the list, the names from
the database query display. The next step is to create the objects and
user-interface parts for business expenses.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]