Triggers are blocks of PL/SQL code that are written to perform tasks when a specific event occurs within an application. In effect, an Oracle Forms trigger is an event-handler written in PL/SQL to augment (or occasionally replace) the default processing behavior. Every trigger has a name, and contains one or more PL/SQL statements. A trigger encapsulates PL/SQL code so that it can be associated with an event and executed and maintained as a distinct object. There are different level trigger in oracle forms.
Block Processing Triggers: Block processing triggers fire in response to events related to record management in a block.
- When-Create-Record Perform an action whenever Oracle Forms attempts to create a new record in a block.
- When-Clear-Block Perform an action whenever Oracle Forms flushes the current block; that is, removes all records from the block.
- When-Database-Record Perform an action whenever Oracle Forms changes a record’s status to Insert or Update, thus indicating that the record should be processed by the next COMMIT_FORM operation.
Master/Detail Triggers: Oracle Forms generates master/detail triggers automatically when a master/detail relation is defined between blocks.
- On-Check-Delete-Master Fires when Oracle Forms attempts to delete a record in a block that is a master block in a master/detail relation.
- On-Clear-Details Fires when Oracle Forms needs to clear records in a block that is a detail block in a master/detail relation because those records no longer correspond to the current record in the master block.
- On-Populate-Details Fires when Oracle Forms needs to fetch records into a block that is the detail block in a master/detail relation so that detail records are synchronized with the current record in the master block.
Message-Handling Triggers:
- On-Error Replace a default error message with a custom error message, or to trap and recover from an error.
- On-Message To trap and respond to a message; for example, to replace a default message issued by Oracle Forms with a custom message.
Query-Time Triggers:
- Pre-Query Validate the current query criteria or provide additional query criteria programmatically, just before sending the SELECT statement to the database.
- Post-Query Perform an action after fetching a record, such as looking up values in other tables based on a value in the current record. Fires once for each record fetched into the block.
Interface Event Triggers:
- When-Button-Pressed Initiate an action when an operator selects a button, either with the mouse or through keyboard selection.
- When-Checkbox-Changed Initiate an action when the operator toggles the state of a check box, either with the mouse or through keyboard selection.
- When-Image-Activated Initiate an action whenever the operator double-clicks an image item.
- When-Image-Pressed Initiate an action whenever an operator clicks on an image item.
- When-Radio-Changed Initiate an action when an operator changes the current radio button selected in a radio group item.
- When-Window-Activated Initiate an action whenever an operator or the application activates a window.
- When-Window-Closed Initiate an action whenever an operator closes a window with the window manager’s Close command.
- When-Window-Deactivated Initiate an action whenever a window is deactivated as a result of another window becoming the active window.
Transactional Triggers:
- On-Delete
- On-Insert
- On-Update
- On-Logon
- On-Logout
- Post-Database-Commit
- Post-Delete
- Post-Insert
- Post-Update
- Pre-Commit
- Pre-Delete
- Pre-Insert
- Pre-Update
Navigational Triggers:
- Pre-Form Perform an action just before Oracle Forms navigates to the form from “outside” the form, such as at form startup.
- Pre-Block Perform an action before Oracle Forms navigates to the block level from the form level.
- Pre-Record Perform an action before Oracle Forms navigates to the record level from the block level.
- Pre-Text-Item Perform an action before Oracle Forms navigates to a text item from the record level.
- Post-Text-Item Manipulate an item when Oracle Forms leaves a text item and navigates to the record level.
- Post-Record Manipulate a record when Oracle Forms leaves a record and navigates to the block level.
- Post-Block Manipulate the current record when Oracle Forms leaves a block and navigates to the form level.
- Post-Form Perform an action before Oracle Forms navigates to “outside” the form, such as when exiting the form.
- When-New-Form-Instance Perform an action at form start-up. (Occurs after the Pre-Form trigger fires).
- When-New-Block-Instance Perform an action immediately after the input focus moves to an item in a block other than the block that previously had input focus.
- When-New-Record-Instance Perform an action immediately after the input focus moves to an item in a different record.
- When-New-Item-Instance Perform an action immediately after the input focus moves to a different item.
Validation Triggers:
- When-Validate-Item
- When-Validate-Record
The sequence of firing triggers in forms When forms open is
- Pre-form
- Pre-block
- Pre-recorded
- Pre-text-item
- When-new-form-instance
- When-new-block-instance
- When-new-record-instance
- When-new-item-instance
2. Tab Canvas
3. Toolbar Canvas
4. Stacked Canvas
The enlisted trigger gets created during the creation of the master-detail block:
- ON-CHECK-DELETE-MASTER
- ON-CLEAR-DETAILS
- ON-POPULATE-DETAILS
Various types of reports include:
- Tabular
- Group Left
- Group Above
- Matrix-Minimum 4 Groups are required
- Matrix with Group
- Form Reports
- Form Letter Reports
- Mailing Labels Reports
There are three types of columns in Oracle reports. They are:
- Formula Columns: Columns that can do user-defined calculations on values within other columns and return some value. Formula columns are used to calculate information dynamically.
- Summary Columns: Columns can do summary computations like sum, average, etc. on values placed in the other columns.-Used for calculating summary information.
- Placeholder Columns: Column for which data type or value can be set using PL/SQL.Used to hold some values at runtime.
No comments:
Post a Comment