You are on page 1of 22

Top 50 Oracle Forms Questions and Answers

Question 1: What is Form Builder?


Form builder is a component of Oracle Developer that is used to develop form based Applications for
presenting and manipulating data
Question 31: Explain Components of Oracle Forms Application
We need to create various Objects and set properties for building the Forms
Applications.

These objects are Items, Records, Blocks, Canvases, Frames, and Windows.
Items: are interface objects that display information to users and allow them to
interact with our application. Such as:
Text Item
Display item
Button
Check Box etc
Block: A Blocks are logical containers and have no physical representation. Block
used for grouping related items into a function unit for storing, displaying and
manipulating records. Only the items contained in a block are visible in the form
interface.

DATA BLOCK: Data Block is directly associated with the Database. This enables the user to
automatically access and manipulates data in the database. Data Block is associated with
either a Database Table (or View), a stored procedure, A From clause query, or Transactional
triggers. Items in the data block are called data items or base table items.

CONTROL BLOCK: Control Block is created manually, they are not associated with the
Database. Items in the Control Block are called Control items.

Records: are groups of items from a table.

Frames: Frames are graphical objects appearing on a canvas. Frame is owned by


that canvas, and is used to arrange the items within a data block. Frames surround
layout objects which enable us to control multiple objects simultaneously, e.g.
Ensuring that they maintain their positions relative to each other in the output.

Question 2: What is a difference between Frame, Item and Block?


Frame is used to arrange data block items. Item are Members of data block. Items grouped into
Records. Block provides a mechanism for grouping related items into a functional unit for storing,
displaying and manipulating Records.
Question 3: What is a difference between Window, Canvas and View Port?
Window is a container for all visual objects that make up a form application. Window performs
functionality such as scrolling, moving and resizing. A single form may include several windows.
Each window should have at least one content canvas. Each new form module has one predefined
window which is called Window1 and is a modeless window.
Canvas is a surface inside a window on which visual objects can be placed. A canvas is assigned to
a window. Each item in a form must refer to not more than one canvas. A canvas is like a picture
portrait, and a window is like a picture frame. Just as you need a picture frame to display a picture
portrait, you need a window to display a canvas and its contents.
View port is a visible portion of canvas.
Question 4: What is MDI?
MDI (Multiple Document Interface) is a parent window through which multiple documents can be
accessed and browsed.
Database objects:
Oracle Interactive Tool (i.e SQL PLUS) allows the Creation of Database Objects like Stored
Procedures, Stored functions and Database Triggers using SQL and PL/SQL Syntax.

Question 5: What is a difference between Modal and Modeless window?


Modal Window is a restricted window that requires a window exit before moving to another window.
You cannot move freely between windows. Modeless Window is an unrestricted window that the
user can move freely. User can have simultaneously access to more than one window.
Question 6: What are Canvases in Oracle Forms and describe different types of Canvases?
Canvas is a surface inside a window on which visual objects can be placed. A canvas is assigned to
a window. Each item in a form must refer to not more than one canvas.
Types of Canvases:
1)

Content Canvas

2)

Stacked Canvas

3)

Toolbar Canvas

a)

Vertical Toolbar

b)

Horizontal toolbar

4)

Tab Canvas

Content Canvas is a base canvas and is a default canvas type. Content canvas occupies the entire
content area of the window. More than one content canvas can be assigned to the same window but
only one content canvas can be displayed on a window at a time. To display more than one content
canvas at the same time, assign each content canvas to a different window.
Stacked Canvas is displayed on top of the content canvas and is usually small in size then that of
content canvas in the same window. To convert an existing content canvas to a stacked canvas,
simply change its canvas type property from content to stack. To show and hide canvases
programmatically, use the SHOW_VIEW, HIDE_VIEW and SET_VIEW_PROPERTY built-ins.
stacked canvas is useful to display additional information, for hiding information and can act as a
scrolling view.
Toolbar Canvas is used to create toolbar for individual window. Toolbar canvas is of two types:
Vertical and Horizontal toolbar canvases.
Vertical Toolbar canvas is displayed to the left of a content canvas. Horizontal Toolbar canvas is
displayed at the top of a content canvas. Toolbar canvas is used to hold buttons and other frequently
used GUI elements. Toolbar canvas increases application usability and decrease form module
maintenance Time. Object Navigator window has both horizontal and vertical toolbars whereas
Property Palette has a horizontal toolbar only. You can also create more than one toolbar for the
same window. MDI Toolbar: Attaching a Toolbar to a form provides a MDI toolbar, so that there is no
need to create more than one toolbar for a form application that uses multiple windows. Toolbar can
be attached to individual windows or to the form itself.
Tab Canvas enables the user to organize and display data on separate Tabs. Tab canvas is
displayed on top of the Content Canvas. Each Tab canvas is made up of one or more Tab
pages and must have at least one. Each Tab page occupies an equal amount of space on Tab
canvas. Any Item you place on a Tab canvas has a Canvas property as well as Tab page Property.
The ordering of Tab pages in the object navigator determines the left-to-right or Top-To-bottom order
of the Tabs at runtime. Tab canvas provides easy access to data and displays large amount of data
on a single canvas and is also used to hide information.
Question 7: What are Messages and Alerts?

Alerts

An Alert is a modal window that displays a message notifying the operator of some
application condition. Alerts are generally used to advise operators of unusual situations or to
warn operators who are about to perform an action that might have undesirable or
unexpected consequences.
Styles of Alerts are Stop, Caution and Note. Each style denotes different level of severity
level. Forms runtime messages are ranked by Severity. Message severity is represented
visually by a unique icon that is displayed in the alert window.
When an event occurs that causes an alert to display, the operator must respond to the
alerts message by selecting one of the pre-defined alert button. Selecting any button
immediately dismisses the alert.

Creating an Alert

In the object Navigator, select the Alerts node, choose Navigator | Create. In the properties
window, set the Alert Style property to the style that corresponds to the severity of the
message: Stop, Caution or Note. Set the message property by entering the message that
need to be displayed at runtime.
Define one or more buttons for the alert by entering a text label in the Button1 label property
field. Choose the default alert button from the defined buttons.

Messages and Alerts are the form of communication between the application and the User.
Types of Messages:
1)

Informative message

2)

Error message

3)

Working message

4)

Application message

Informative Message informs the user about the current state of processing. Example: Last value
retrieved Press [Accept] to enter answer. Informative messages can be suppressed with an OnMessage Trigger.
Error Message informs the user about the errors interrupting the processing. Example: Function key
not allowed. Press [Show function keys] for list of valid keys too many arguments on command line.
Error messages can be suppressed with an On-Error Trigger.
Working Message informs the operator that the form is currently in processing. Example: Working
Working message can be suppressed by setting the system variable SUPPRESS_WORKING to
True.Example: Sytem.suppress_working: =TRUE
Application Message is created by the programmer using the MESSAGE built-in.
Types of Alerts:

1) System Alert
2) Application Alert
Alerts are displayed in a Modal window.
System Alert is a system acknowledgement to the operator before processing can be continue.
Application Alert are designed and created by the programmer as part of application using
SHOW_ALERT built-in.
Question 8: When can the Triggers in oracle forms can be failed?
Triggers are failed only when one of the following occurs:
a)
b)

During an Unhandled exception


By raising built-in exception FORM_TRIGGER_FAILURE. Means failing a trigger in a

controlled manner.
c)

FORM_TRIGGER_FAILURE is a predefined Pl/Sql exception available only in form Builder.

Question 9: What is a difference between ON-ERROR and ON-MESSAGE Trigger?


ON-ERROR Trigger fires whenever an Oracle Forms causes an error message to display. ONERROR Trigger is used to replace default error message with a customized
functions that are used to determine the Error message are:

Message. Built-in

ERROR_CODE, ERROR_TEXT,

ERROR_TYPE (FRM, ORA).


ON-MESSAGE Trigger fires whenever an Oracle Forms causes a message to
MESSAGE Trigger is used to replace default message with a customized

display. ON-

Message. Built-in

functions that are used to determine the message are: MESSAGE_CODE, MESSAGE_TEXT,
MESSAGE_TYPE (FRM, ORA, NULL).
Question 10: Name the types of Alert properties?
Types of Alert properties are: Stop, Caution and Note.
Question 11: What are Input items? Explain different types of Input items?
Input Items are those items that accepts user Input. Input items enables insert, update, delete or
query an item process.
Types of Input Items:

Check Box is a two-state interface object that indicates whether a certain value is Checked or
unchecked. Trigger associated with check box is WHEN-CKECKBOX-CHANGED.
WHEN-CHECKBOX-CHANGED:This Trigger fires whenever an operator changes the state of a
check box, either by clicking with the mouse or through keyboard interaction.
List Item consists of many alternative choices, out of which one and only one can be selected at a
time. There are three types of list item: Poplist, Tlist and Combo Box. Poplist is a field with an iconic
button attached to the right side. When user clicks on

a poplist, all of its elements are displayed.

Tlist appears as a rectangular box that displays the list elements. Scroll bar appears to the right side
of the list, if the list is bigger.
Combo box accepts user input. Appears as a field with a down arrow next to its right side. Trigger
associated with list item is WHEN-LIST-CHANGED. WHEN-LIST-CHANGED Trigger fires when an
operator selects a different element in a list item or de-selects the currently selected element. In
addition, if a When-List-Changed trigger is attached to a combo box style, it fires each time the
operator enters or modifies the entered text.
Radio Group consists of a fixed number of radio button options and only one can be selected at a
time. It is alternative to List item. Consider List Item instead of Radio Group if there are more than
four or five choices. Trigger associated with Radio Group is WHEN-RADIO-CHANGED. WHENRADIO-CHANGED Trigger fires when an operator selects a different Radio button in a radio group or
de-selects the currently selected radio button either by clicking with the mouse or through keyboard
interactions.
Question 12: What are Non-Input items? Explain its types?
Non-Input Items are those items that do not accept direct user input.
Types of Non-Input items:
Display Item is a read-only text item. Display item is similar to text item except that it cannot not be
edited, queried, Navigated or accepts user input.
Image Item is used to store and display images. User can populate an image item either by fetching
from a LONG RAW or BLOB Column or by using a trigger and a built-in to populate the image item
programmatically. Images can be stored in either the database or the file system. When user insert
images into the database by means of a save (commit), they are automatically compressed using
the Oracle image compression. Images can also be populated with a BFILE, but will need to use
DBMS_LOB to do so. Images cannot be cached. Triggers associated with the image item are:
WHEN-IMAGE-ACTIVATED, WHEN-IMAGE-PRESSED. WHEN-IMAGE-ACTIVATED Trigger fires
whenever an operator selects or de-selects the image item. WHEN-IMAGE-PRESSED Trigger fires
whenever an operator single-click or double-click on an image item.

Push Button Push Button is a non-input item that does not store or display data. Push Button is an
interface object that is clicked to initiate an action. It is used for: Navigating between items, Display
an LOV, Invoke an editor, calling to another window, Commit the data, Issue a query, Perform
Calculations. Trigger associated with the Push Button is: WHEN BUTTON-PRESSED.WHENBUTTON-PRESSED Trigger fires when an operator selects a button either by way of key or by
clicking with a mouse.
Calculated Items are read-only items that are used for performing calculations. Can be expressed
as:
Formula Calculated Item: Performs horizontal calculations. Involves bind variables.
Summary calculated Item: Performs Vertical calculations on values of a single item over all rows in
a block.
Hierarchical Tree Items displays data in the form of standard Navigator style.
Bean Area Item enables you to integrate JAVA components into your application.
JAVA Bean is a component written in JAVA that can plug into any applet or JAVA application. JAVA
Beans helps to interact with the client machine.
Question 13: What are Relations in Oracle Forms and explain its types?
Relations involve the Master-Detail relationship. Relation can be build automatically through Data
block wizard or manually through create toolbar.
Types of Relations:
Master Deletes Property: Allows to specify how the deletion of a record in the Master block should
affect records in the Detail block. These can be non-isolated, isolated or cascading.
Non-Isolated Relation: Non-Isolated is the default setting, which prevents the deletion of a Master
record if associated Detail record exist in the database.
Isolated: When deleted in the Master record does not affect the associated Detail records in the
database.
Cascading: allows the Master record to be deleted and automatically deletes any associated Detail
records from the base table at commit time.
Question 14: What is Co-ordination Causing Event? Explain different types of Co-ordination?
Any event that changes the current record in a Master block is a Co-ordination Causing Event.
Types of Co-ordination:
1)

Deferred

2)

Automatic Query

Three Conditions for coordination causing event are:

1)

Immediate (Deferred=NO, Automatic Query=NO)

2)

Deferred (Deferred=YES, Automatic Query=NO)

3)

Deferred with Automatic Query (Deferred=YES, Automatic Query=YES)

Immediate: When the coordination-causing event occurs, Form builder fetches the detail record
immediately.
Deferred: When the coordination-causing event occurs, the Oracle Forms does not automatically
fetch the detail records. To fetch the detail records, the operator must navigate to the detail block
and explicitly execute a query.
Deferred with Automatic Query:
When the coordination-causing event occurs, the Form Builder has to navigate to the Detail Block in
order to fetch the detail records.
Question 15: What are the two phases of block coordination?
Two phases of block coordination are:
Clear Phase: During the clear phase Oracle forms navigates internally to the detail block and
fetches the detail records.
Population Phase: During a population phase Oracle forms issue a select statement to repopulate
the detail records associated with the new master record.
Question 16: What are Editors? Explain different types of editors in oracle forms?
Editors are used for special requirements such as: larger editing window, Search/Replace, cut, copy,
paste etc.
Types of Editors:
1)

Default Editor

2)

System Editor

3)

User-Named Editor

Default Editor: The default editor provides standard editing features, including search/replace and
cut, copy, and paste. The default editor is built into every form and is automatically available from
every text item.
System Editor: If there is a system editor available, you can specify that Form Builder should use
the current system editor, rather than the default editor.

User-Named Editor: Is a named object. You can specify editor attributes such as Window display
size, Position and Title.
Built-in used for Editor:
SHOW-EDITOR: Is a built-in procedure, which accepts any editor name and takes some I/P string
and returns modified O/P string.
EDIT_TEXTITEM: Needs the input focus to be in the text item before the built-in is executed.
Question 18: What is a LOV? Explain its types?
LOV (List of Values): An LOV is a scrollable popup window with either single or multi-column
selection list.
Types of LOV:
Static LOV: Contains the predetermined values.
Dynamic LOV: Contains values that come at runtime.
LOV for Validation property of an item:
When LOV for validation is set to true, Oracle forms compares the current value of the Text item to
the values in the first column displayed in the LOV whenever the Validation event occurs. If the value
in the text item matches one of the values in the first column of LOV, validation succeeds, the LOV is
not displayed and the processing continues normally. If the value in the text item does not match one
of the values in the first column of the LOV, Oracle forms displays the LOV and uses the Text item
value as the search criteria to automatically reduce the list.

Creating LOV

Creating LOV : As LOV values are derived from Record Group, to create LOV,
first Record Group is created and this is to be associated to a LOV.
The Record Group values can be from one of the following two sources:
o The execution of a select statement that is associated with the Record
Group at design time (query Record Group).
o An array of static values that are associated with the Record Group at
design time (static Record Group).
While creating a LOV, specify which of the columns in the underline Record
Group should be displayed in the LOV window.
And designate a return item for any column that is included in the LOV.
Because LOVs and Record Groups are separate objects, multiple LOVs can be
created based on the same Record Group.

Creating a LOV using the LOV wizard

To create an LOV using the LOV wizard:


In the Object Navigator, click the LOV node. Click the create button in the
toolbar. In the new LOV dialog, choose use the LOV wizard.
Use the LOV wizard to create an LOV based on an existing query Record
Group, or a new query Record Group (which you will create during the wizard
process), or an existing static Record Group. To create LOV based on a new
static Record Group, first create the new static Record Group and then use
the LOV wizard to create the LOV.

While creating LOV based on a new query Record Group, enter the SQL query
in the Query Text field. To import SQL query from a file, click the Import SQL
Query button.
In column mapping properties of the LOV, column title, return item and
display width of the fields can be specified.

Question 17: What are Property Classes?


A Property Class is a named object that contains a list of properties and their settings. There can be
any number of properties in a property class and the properties in a class

can apply to different

types of objects. Property Class can be subclass in any number of modules. Property Class can
have Triggers. You can define a Trigger in a property class when you want a form, block or item that
you base on the class to inherit the trigger. When you define a trigger in a property class, the trigger
appears in the object navigator under the trigger node for the class, but does not appear under the
trigger node for objects based on the class.
Question 18: What are the various different types of Properties in Oracle Forms?
The various different types of Properties in Oracle Forms are:
Default Property: Is the default property of an object. Is denoted by a circle.
Changed Property: When changing the default property value of an object to some new value. Is
denoted by a square.
Inherited Property: Is one that takes its value from the property class. It is displayed with an arrow
to the left of the property name.
Variant Property: Changes a value of inherited property results to a variant property. It is displayed
with a red cross over an arrow.
Question 19: What are Visual Attributes?
Visual Attributes are the font, color and pattern properties that can be set for form and Menu objects.
Visual Attributes includes the Font Properties such as Font name, font size, font style Font width etc.
and color or pattern properties such as foreground color, background Color, Fill pattern etc.
Question 20: What is a difference between Object and PL/SQL Libraries?
PL/SQL Libraries are the collection of PL/SQL procedures, functions and packages. When you
compile a PL/SQL library, it produces a .PLX file which does not contain the source code. If you
distribute this instead of your PLL file then you can protect your source code from other people.
PL/SQL libraries can be referenced and called from other modules.

PL/SQL libraries can be attached to multiple forms and menus.

PL/SQL libraries support dynamic loading. Program units are loaded into a computers
memory only when an application needs it. This significant features not only reduce memory
usage but prevent to slow an application.

PL/SQL Library Formats:


o

.PLL

.PLX

Contains both source code and executable code


Contains only executable code

.PLD

.PLD is a text format file and used for technical documentation of library file

Object Libraries are the collection of other types of objects, such as alerts, triggers, windows,
canvases, record groups, and list-of-values. There is no 'compiled' version of an object library, so if
you store a trigger in an Object Library, then the source code is visible.

Object Libraries used to share components across the files.

These are separately stored outside the FMB file.

Object Libraries are stored separately in a file with extension .OLB Provide high security
while sharing.

Library tabs are containers holds the controls in it.

Object Library can have any no of library tabs.

Provide label property for library tabs.

Object Libraries Formats:


o .OLB
Object Library design File
o .OLT
o Object Library text export file

Advantages of Libraries:

Increase Productivity: Reusing objects and code decreases development time, thereby
increasing productivity.
Decrease Maintenance: Changing the code at one place reflects at many other places,
thereby reducing maintenance time.
Increase modularity: Sharing and reusing code increases the modularity of the applications.

Creating a Library

In the Navigator, choose File/New/Object Library or Select the Libraries node and then
choose Navigator/Create.
To create a program unit, expand the desired library node, select the Program Units node,
and then choose Navigator/Create. The New Program Unit dialog appears.
Specify the program unit Name and its Type and then Choose OK. The PL/SQL Editor
appears.
In the PL/SQL Editor, define the program unit and then choose Compile to compile. Choose
Close to dismiss the editor.
Choose File/Administration/Compile File to compile any un-compiled library program units.
Choose File/Save to save the library module to a file or to the database.

Attaching a Library

In the Navigator, open the desired forms, menu or library module. To open a module, choose
File/Open and then specify the module type to Open.
Expand the module and then select the Attached Libraries node and choose
Navigator/Create to attach a library.
Specify the name of the library to be attached.
Save the active Form or menu module to incorporate the library attachment in the module
definition.

Question 21: What is a Console?


Console provides information at Runtime. Console consists of: Message line and Status
line. Message Line: The Message line displays both form and application messages. Status
Line: The Status Line displays a variety of Indicators to reflect the current status of the Form
Module. Such as: Record n/m, enter-query, List of values etc.
Question 23: What is a Debugger?
With the Debugger you can monitor the execution of code within the trigger and other

program

units. The steps include:


1)

Step Into: Executes the next statement.

2)

Step Over: Executes the next statement without stepping into a nested subprogram.

3)

Step Out: completes the nested subprogram and steps to the next executable statement in the

calling program.
4)

Go: resumes execution until the program terminates normally or is interrupted by the next

breakpoint.
5)

Pause: Pauses the execution of running PL/SQL code to enable you to examine the

environment. For Example, you could check variable values.


6)

Stop: Terminates debugging and program execution completely.

Question 24: What is a Menu Module in Oracle Forms?


Menu Module consists of a hierarchy of menus, each with selectable items.
Question 25: What are the different methods of Navigation in Oracle Forms?
Different methods of Navigation are:
1)

Default Menu

2)

Menu Toolbar

3)

Mouse

4)

Buttons

5)

Function Keys

Question 26: What are the different types of Form builder variables?
Different types of Form builder variables are:
1)

Item (:block_name.item_name)

2)

Global (:GLOBAL.variable_name)

3)

System (:SYSTEM.variable_name)

4)

Parameter (:PARAMETER.name).

Question 27: Explain the benefits of reusing objects and code in Oracle Forms?
Benefits of reusing objects and code are:
Question 28: Explain Triggers in Oracle Forms? Also explain different categories of Triggers?
Triggers are blocks of PL/SQL code that is written to perform some specific tasks. Trigger is a
program unit that is executed or fired due to an event. Triggers can be fired for events such as:
1)

Query-related events

2)

During validation or navigation events

3)

For error or messages

4)

During Post or Commit process etc.

Trigger consists of three components:


1)

Trigger Type: Events that causes the Trigger to fire. (Pre, Post, When, On, Key Events).

2)

Trigger Code: Defines the action that Trigger should perform.

3)

Trigger Scope: Defines the level of the Trigger (Form, Block or Item level)

Pre-Event: Fires before an action is performed.


Post-Event: Fires just after an action has performed.
When-Event: Fires in addition to standard Processing. Is used to augment functionality.

On-Event: Fires in place of standard processing. Used to replace or bypass a process. Also used
for suppressing errors and messages.
Key-Triggers: Fires in place of standard action of a function key. Fires when the operator presses
the associated key or key-sequence.
Trigger is divided into following categories:
1) Block Processing Triggers: When-Clear-Block, When-Create-Record, When-Database-record,
When-Remove-Record.
2) Interface Event Triggers: When-Button-Pressed, When-Checkbox-Changed, When-RadioChanged, When-List-Changed, When-Image-Activated, When-Image-Pressed, When-Mouse-Click,
When-Mouse-DoubleClick, When-Mouse-Down, When-Mouse-up, When-Mouse-Move, WhenMouse-Enter, When-Mouse-Leave, When-Timer-Expired, When-Window-Activated, When-WindowClosed, When-Window-Deactivated, When-Window-Resized.
3) Key Triggers: Function Key, Key-Fn, Key-Others.
4) Master-Detail Triggers: On-Check-Delete-Master, On-Clear-Details, On-Populate-Details.
5) Message-Handling Triggers: On-Error, On-Message.
6) Navigational Triggers: Pre-Form, Pre-Block, Pre-Record, Pre-Text-Item, Post-Form, Post-Block,
Post-Record, Post-Text-Item, When-Form-Navigate, When-New-Form-Instance, When-New-BlockInstance, When-New-Record-Instance, When-New-Item-Instance.
7) Query-Time Triggers: Pre-Query, Post-Query.
8) Transactional Triggers: On-Check-Unique, On-Close, On-Commit, On-Count, On-Fetch, OnSelect, On-Delete, On-Insert, On-Update, On-Logon, On-Logout, On-Rollback, Post-Change, PostDatabase-Commit, Post-Forms-Commit, Post-Delete, Post-Insert, Post-Update, Post-Select, PostFetch, Pre-Delete, Pre-Update, Pre-Insert, Pre-Commit, Pre-Select, Pre-Logon, Pre-Logout.
9) Validation Triggers: When-Validate-Item, When-Validate-Record.
10) User-Named Triggers: Execute_Trigger(Trigger_name)

Question 29: Explain Oracle Forms Builder


Four components make up the interface to Oracle Forms Builder, they are

Object Navigator: is primarily used to move quickly between the other three
interfaces.
Property palette: is where we set object attributes.
Layout Editor: This is the place where all objects for the particular screen that are
shown are placed.
PL/SQL Editor: is where all PL/SQL code can be added, modified, removed and
compile
Question 30: Explain Oracle Forms Compiler and Runtime
Forms Compiler

It is used to create executable files for runtime deployment. While compiling a form
module all of its object code is compiled (stored as .fmb ) and .fmx is created. These
.fmx are finally executed.
Forms Runtime
The runtime is the engine that form operators use to run a finished Oracle Forms
application.

Question 32: Explain Property Palette


Property palette is where you set the properties of objects you create in form
and menu modules.
Invoking Property Palette : The ways in which you can invoke the Property
Palette are
o Select Tools | Property Palette
o Double click the objects icon for any object except code objects and
canvas views.
o Double click an item in the Layout Editor.
Features of the Property Palette
o Name field displays the name of the object currently selected.
o Text field is displayed when the current property can be set by entering
a text value.
o Pop list is displayed for properties that are either yes/no, or that have a
fixed set of valid values.
Question 33: Explain Layout Editor

Layout Editor is a graphical design facility for creating and arranging interface
items, boilerplate texts and graphics in a form.
In Layout Editor you can work on a single canvas-view which are displayed in
windows at runtime.
To invoke the Layout Editor

In navigator, double click the object icon for the canvas-view you want
to edit
o In navigator, choose Layout Editor in from the Popup menu.
o Choose Tools | Layout Editor and indicate the canvas view you want
to work
Features of Layout Editor
o If there is only one canvas-view in the form, Oracle Forms displays it in
the Layout Editor automatically. A default canvas-view is created
automatically by the Oracle Forms.
o If there are more than one canvas-views, then list of values of the
canvas-view is listed for selection from which you can select the
canvas-view you want to edit.
o Rulers: The Horizontal and Vertical rulers at the top and left side of the
workspace provide a reference for sizing and arranging objects in the
Layout Editor.
o Grids: There is a grid defined within the workspace that helps us
position objects.
o

Question 34: Explain Items and Blocks

Blocks
o There are two types of blocks. Control Block and Base Table block.
o As defined earlier Control blocks dont have the table associated to it
and whereas the later has an association with some table or view.
Creating Blocks
o To create blocks you can do manually or you can use the wizard for
creating it.
o While creating each column specify and set Name, Data Type and Max
Length.
Items
o Forms support different types of interface items, which can be utilized
in building applications interface they are
o ActiveX, Bean Area, Chart Item, Check Box, Display Item, Hierarchical
tree item, Image Item, List Item, Push Button, Radio Group, Text Item,
Sound Item, User area.

Defining Items

Buttons: Buttons are interface items that operators select to execute


commands or initiate actions. Oracle Forms support 2 styles
o Text Button: displayed as a rectangle with a text label that describes
its action.
o Iconic Button: displayed as graphic icons, without text labels.
Creating Buttons in Object Navigator
o In the Object navigator, select the block where you want to insert the
button Select Items Node Choose Navigator | Create
o In the Property Palette, set the Item Type Property to Button and enter
the desired text in the Label Property field.
Creating Buttons in Layout Editor

Click the Button Tool Place the Mouse pointer at the required place
and then click and drag the button to size Go to Property Palette and
set the properties accordingly.

Defining Check Box

Check Box : is a two-state control that indicates whether a certain condition


or value is on or off i.e. True or False. The value of the check box can be set
by fetching records from a corresponding database column, by operator input
or through default value or runtime assignment. Check box values can be of
Char, Number and Date data type.
Creating Check Box
o In the Object navigator, select the block where you want to insert the
Check Box, then select Items node Choose Navigator | Create
o In the Property Palette, set the Item Type Property to Check Box and
enter the desired text in the Label Property field. The label is displayed
to the right of the Check Box element at runtime.
o Specify the values you want the Check Box to display as Checked
and Unchecked in Value when checked and Value when unchecked
Property field.
o Set the Check Box, Mapping of Other Values to specify how you want
the Check Box to handle other values.

Defining Display Item and List items

Display Item :are similar to text items with the exception that Display Items
only store and display fetched or assigned values. Operators cannot navigate
to display item values. Values are assigned to a display items through PL/SQL
code only, also fetched from the PL/SQL code only.
Creating Display Items : To create a display item, you either insert a new
display item into a block or you modify an existing item by converting its type
to Display item.
o In the Object navigator, select the block where you want to insert the
Display Items, then select Items node Choose Navigator | Create.
o In the Property Palette, set the Item Type Property to Display Items.
List Item : is a list of text elements that can be displayed a either a Poplist,
Tlist, or Combo Box. A list item displays a fixed number of elements. Each
element in a list is a text string up to 30 characters.
Creating List Item
o In the Object navigator, select the block where you want to insert the
List Item, then select Items node Choose Navigator | Create. In the
Property Palette, set the Item Type Property to list item.
o Specify the display style for the List Style Property to POPLIST, TLIST or
COMBO BOX. Double click on the LIST element dialog, then enter the
elements exactly as you want them to appear in the list at runtime.
Associate a value with each element in the list and then choose OK.

Defining Text Items

Text Items: is an interface control that allows operator to enter text in a field.
Creating Text Items :In the Object navigator, select the block where you want
to insert the Text Item, then select Items node Choose Navigator | Create. In
the Property Palette, set the Item Type Property to Text Item.
Forms Supports both single-line and Multi-line text itmes.
o Multi-line Text Items Property : Setting this property to Yes allows a text item to
store multiple line of the text, but it does not automatically make the item large
enough to display multiple-lines. Wrap Style Property of Multi-line text items : this
property determines how text is displayed when a line of text exceeds the width
of a text item or editor window.
o Scroll bar Property : The number of characters that can fit on one line is
determined by the width of the text item and the font assigned to it. Scroll bars
allow the operator to scroll upward and downward when viewing text item.
o Required Valid Data Values Property: The properties that can be set to specify
the values valid for a text item are Maximum Length, Required, Fixed Length,
Range Low Value/ Range High Value.
Format mask allows automatically embed special characters such as dashes
and monetary symbols, in values entered by operators.

Master/Detail Relationship

A Master/Detail relationship is an association between two base table blocks,


the Master block and Detail block.
The relationship between the blocks reflect a primary key to foreign key
between the tables on which the blocks are based.
The Master/Detail relationship automatically does the following:
o Ensures that the Detail block displays only those records that are
associated with the current (Master) record in the Master block.
o Co-ordinates querying between the two blocks.
The Master block is related to the Detail block though the Join Condition.
The Join Condition establishes the primary key item(s) in the Master block and
the foreign key item(s) in the Detail block.
The block co-ordination involves the following phases.
The clear phase: Oracle Forms Navigate internally to detail block and flushes
the obsolete Detail record.
The population phase: Oracle Form issues a select statement to repopulate
the Detail block with the Detail records associated with new Master record.
These operations are accomplished through the execution of triggers.

Creating a Relation

Master/Detail form can be build either by creating the relations between a


master and a detail block explicitly or by using the Data Block wizard.
Creating a Master-Detail form module using the Data Block wizard :
o Create the Master block in the same way as any other data block is
created. From the Object Navigator, invoke the Data Block wizard.
Follow the same steps as before to create a new Data Block in the Data

Block wizard, until Master-Detail Relationships creation or Deletion


page arrives.
o Click on Auto-Join checkbox and then click to Create Relationships.
o Select Master Block from the Data Block dialog box and click OK. The
Data block wizard automatically creates the join condition between the
master block and the detail block. This is displayed in the join condition
field and the name of the master block is displayed in the Master Data
block field.
o It is important t note that the Auto-Join condition data blocks check box
should not be clear otherwise this wizard does not auto create the
condition between the detail and master data blocks.
o Click Next and Finish the Data Block wizard steps.
Creating a Master-Detail Relation in the Object Navigator:
o Relationship can be defined between two existing blocks by creating a
relation object in the Object navigator.
o In the Object Navigator, locate the block that is to be the master block
in the relation, position the cursor on the Relation node under the
master block and then select Navigator | Create. The New Relation
dialog appears.
o Name of the master block selected appears in the Master block Field. In
the Detail Block field enter the name of the detail block.
o To specify the Join Condition, an item name exist in both the Master
and Detail blocks which can be equated.
o A combination of item name can exist with equating conditions which
are called Compound Joints.

Menus

Menu Module: A menu module is a hierarchically structured object that


provides a quick and easy method for operating your Forms application. Like
the from module, the menu module is one of the main components of an
application.
Menus: A menu is a list of related options. Each option performs a different
action. You can create three menu types in forms:
Main Menu
o Displays horizontally in the menu bar
o Contains options (menu items) that are typically individual manus
Individual Manu
o Displays vertically
Submenu
o Displays vertically
Menu Item: A menu item is an option that you can choose from a menu. Each
menu item has an associated command that enables the user to perform an
action.
Menu Toolbar: A menu toolbar is a toolbar of iconified buttons that represent
some individual items from your form menu. For a menu module, you can
have a vertical and a horizontal menu toolbar.

Menu Style
Pull-Down Manu: A Pull-down menu comprises a set of options, displayed
horizontally under the application window title. Each option can represent a
submenu or an action. Selecting a submenu displays a vertical list. Selecting
an action executes the action.
Full-screen Menu: A full screen menu displays each menu in a separate
window, Only the current item is highlighted, and the Enter Your Choice field
contains the chosen menu item number. Full Screen menus are commonly
used in character-mode applications and are rarely used for bitmapped
applications.
Bar Menu: A bar menu displays options horizontally under the application
window title line, but unlike the pull-down menu, when you select an item,
the submenu replaces the previous one, horizontally.
Every Form runs with one of the following
The Default menu that is built in every Form.
A customer menu that you define as a separate module and then attach to
the form for runtime execution.
No menu at all.
At runtime, an application can have only one menu module active at a time,
either the Default menu or a Customer menu.
To explicitly specify the Default menu
o Select the form module in the Navigator.
o In the Property palette, set the Menu Module property to
DEFAULT&SMARTBAR.
o If you want the form to run without a menu, leave the Menu Module
field blank.
At the Welcome to Form Builder Screen, make sure the Use the Data Block
Wizard is selected and click OK.
At the initial screen click Next.
Make sure Table View is selected and choose Next.
At this Screen select the Browse Option.
A Connect screen will then appear.
Enter your User Name, Password and Database that you were given for your
Oracle Accounts.

Menu Extensions:

.MMB

.MMX

What are Matrix Reports?


A matrix report looks like a grid that contains a row of labels, a column of labels,
and information in a grid format related to both the row and column labels. These
reports are sometimes referred to as "crosstab" reports.

A matrix report looks like a grid. it contains one row of labels, one column of
labels, and information in a grid format that is related to both the row and column
labels.

This sample matrix also contains three additions to the basic matrix: summaries
have been added, zeroes replace non-existent values in the cells, and the cells
themselves are surrounded by grid lines. Of the summaries, one sums the
salaries by department, one sums them by job, and one sums them for the whole
report.

Certain requirements exist for building matrix reports:

You must have at least four groups in your data model.

One group must be a cross product group.

At least two of the groups must be within the cross product group. These
groups furnish the "labels" of the matrix report.

At least one group must be a "cell" group; that is, it must provide the
information related to the labels. The values from this group fill the cells
created by the matrix.

These requirements can be seen in the preceding example. It contains four


groups--one group supplies the vertical labels (department numbers) and one
group supplies the horizontal labels (job identifiers). These two groups are the
children of the third group, called the cross product group, which creates the grid.
The fourth group provides the values that fill in the grid.

Matrix reports are different from tabular reports because the number of columns
is not known in advance; that is, the number of columns in your report is not
determined by the number of columns you specify in your SELECT statement plus
the columns you create yourself. The number of columns in your report depends
on the number of values contained in the columns providing the horizontal and
vertical labels. Thus, the report would automatically be extended if a new job
function, called RECEPTIONIST, was added to the underlying data tables.

The queries used to select data for these sample matrix reports are not intended
as definitive examples of matrix queries. If you are concerned with performance
issues, for example, there are alternate methods of querying data that can
improve the performance of a matrix report.

You can create matrix reports with any number of queries. Section 25.2, "Create
a single-query matrix" explains how to create the matrix report using one
query. Section 25.3, "Create a multiple-query matrix" explains how to create the
same report using three queries. These two methods yield the same results.
They are presented as options; feel free to try both methods and settle on a
favorite.

This report uses the matrix layout style. You'll modify some default settings to
ensure that the column and row labels display correctly. You'll also modify some
field widths to ensure that the fields fit across the page.

For additional conceptual information, see Section 1.3.7, "About matrix reports",

You might also like