Using Oracle Forms on

To start Oracle Forms 1. Log on to your workstation if needed (in Levin Lab, you need Levin username and password) 2. After you successfully logon, go to Start Menu, select Run and type Telnet 3. Enter your pegasus username and password 4. After you logon successfully to pegasus, start Oracle forms by typing f60desm 5. You should receive the following welcome screen, unless you deselected the option Display at startup in a previous time

6) You can use this screen to build a new data block either manually or using the wizard. You can also use it for opening an existing form or learning about Oracle Forms. 7) If you press cancel, you get the Object Navigator screen. The Object Navigator starts with a new form called Module1.

then select Data Block Wizard as shown in next screen .Building Data Blocks Using the Wizard 1) Click on Module1 in the Object Navigator.

2) You get the Data Block Wizard s welcome screen .

Select Table or View .

Click Browse button to select a table .

you will be asked to connect. You will get the following screen .If you have not connected to the database during this session.

select the DEPARTMENT table .For this tutorial.

Move all the columns to the right by clicking the >> button .

Click Finish to move on to the Layout Wizard .

The Layout Wizard The layout wizard starts by the welcome screen unless you selected not to display it in a previous session .

Since this is the first data block in the form. we will use a new Canvas .

Move all the columns to the right and select Next .

.Change the width and height of the data items if you do not like the default values provided. Make sure it is large enough to hold the data.

You will get the following screen (the Canvas) .Click Finish to finalize the data block.

you have to compile it to make sure that there are no errors. then select Compile File. select Administration. . The form will be saved in your home folder on pegasus with an extension . or press ctrl+s.Saving the form To Save the form. select Save option from File menu. the run command will compile the form before running it.fmb Compiling The Form Since the form is actually a program. The compilation process produces a file with the same name and with extension .fmx Notice that if you run the form without compilation. To compile the form go the File menu. The shortcut for compile is ctrl+t.

and query data in the database. update. You can also use variables or write your own Where clause. Oracle Forms added a Menu Bar and a Tool Bar to your form automatically. . The Query interface is a query by example (QBE) where you can put values in the data items and perform query on them. select Run Form from Programs menu or click the run form client/server icon (look like a light signal) When you run the form you get the following screen. These bars let you insert. Notice that you have to click the Save icon or Select Save option from Action menu to Commit the changes. delete.Running the Form To run the form. As you can see.


.Adding a Detail section (Creating a Master-Detail Form) To add a detail section to the form. right click anywhere in the Canvas and select Data Block Wizard as shown in the next screen.

When you select Employee table. the detail table. move the columns to the right side. we can select Employee as the detail table. Notice that Department table. and select next you get the following screen . is a parent table to the Employee table. the master table.The data block wizard will take you through the same steps except that you will have an option to create a relationship between the existing table and the new table after selecting the new table. Since we selected Department Table as the Master table.


you get the following screen .When you click Create Relationship button.

As you see the Foreign Key relation works a Master-Detail Relation. Click OK. then select DNO as the detail item and DNUMBER as the master item as shown in the next screen. .

and check the "display scroll bar box" as shown in the following screen .Continue the rest of the steps as before except the last step. set number of rows to 3. select Tabular. instead of selecting Form.

When you finish you should get the following screen .

when you run any query in the Master table. the related rows are displayed in the detail table as shown in the next screen .Running the Master-Detail Form Run the form as before by clicking the "run form client/server" icon or by selecting run form from Programs menu. Now.

a List Of Values (LOV) can be attached to a field in the form.List of Values To avoid memorizing large number of values and to avoid errors in data entry. in the next steps. For example. we will attach the an LOV from the DNUMBER field in the DEPARTMENT table to the DNO field in the EMPLOYEE table. First. go to the Tools menu and select LOV wizard .

Notice that we are retrieving the values from the DEPARTMENT table although the LOV will be attached to a filed in the EMPLOYEE table .Write a query to get the list of values as shown in the following screen.

Select the column to include in the record group .

Click the "Look up return item" button .

Select Employee.DNO .

Click OK for the next step .

Again. click OK .


select the field you want to attach a list of values to. it does not work unless you re-attach it from the object navigator In the Object Navigator. . right click that field and select Property Palette.Although we attached the LOV to DNO.

In the property palette select LOV and select the LOV you have just created as shown in the next screen .

. you can use the attached list of values by clicking ctrl-l in UNIX or F9 in Windows.Using LOVs When you insert data in the DNO field (while the form is running and in the normal mode. not the query mode). You will get the following screen.

and Web Wizard to automate the creation of reports. Data Wizard. you can create a report by starting with one of the wizards. .Using Wizards Report Builder has a Report Wizard. and then refining the report that the wizard creates using the data model view and the layout view. Most often.

Sign up to vote on this title
UsefulNot useful