Tutorial Chapter 3: Displaying Data
This chapter illustrates opening a window that contains a form to
display information to the user. An SQL statement is used to retrieve the data from a database
table. A form specification file is defined to display the values retrieved. The actions that are
available to the user are defined in the source code, tied to buttons that display on the
form.
Application Overview This example program opens a window containing a form to display information to the user.The Form Specification File You can specify the layout of a form in a form specification file, which is compiled separately from your program.Opening Windows and Forms A program creates a window with the OPEN WINDOW
instruction, and destroys a window with the CLOSE WINDOW
instruction.User interaction with MENU Your form can display options to the user using action views - buttons, dropdown menus (aka topmenus), toolbars, and other items on the window.Retrieving and Displaying Data The example demonstrates how to define a record so you can treat variables as a group. Static SQL instructions retrieve rows from the database which are displayed to the form using the DISPLAY BY NAME
statement.Compiling and Running the Program The dispcust.4gl module and the custdorm.per form file must be compiled. You can select the Build option in the Genero Studio Project view to perform these tasks or use command line tools.Localization Support Localization Support allows you to write application supporting multibyte languages as well as date, numeric and currency formatting in accordance with a locale defining the character encoding.