Deleting a program unit Moving a program unit between client and database server

4-120 Oracle Reports Users Guide to Building Reports 5. If your program unit is not a procedure a PLSQL subprogram that performs a specified sequence of actions, click one of the following: ■ Function a PLSQL subprogram that performs a specified sequence of actions, and then returns a value ■ Package Spec datatypes and subprograms that can be referenced by other program units ■ Package Body implementation of the package, which may include private subprograms and datatypes; optional if the package consists only of declarations ■ Type Spec declares the name, variables attributes and member subprograms methods for an object type or collection type ■ Type Body implementation of the member methods functions and procedures defined in the type specification for an object type. For each method specified in an object type, there must be a corresponding method body

6. Click OK.

7. In the Stored PLSQL Editor, select a database owner name from the Owner list to

indicate where the program unit will be stored in the database, then define the PLSQL for the stored program unit. See also Section 2.6.5, About stored program units

4.13.3.3 Deleting a program unit

To delete a program unit:

1. In the Object Navigator, expand the Program Units node.

2. Click the program unit you want to delete. 3. Click the Delete button in the toolbar.

4. In the message dialog box, click Yes to confirm the deletion.

See also Section 2.6.4, About program units

4.13.3.4 Moving a program unit between client and database server

To move a program unit from the client to the database server:

1. In the Object Navigator, double-click the Database Objects node. If this node is

disabled, the Connect dialog displays so you can establish a database connection. Note: If the radio button is not selected when you click, try clicking a different radio button, then click the desired Type again. Note: If you delete a PLSQL package, function, or procedure, you must also delete all references to it in your report. Otherwise, you will get an error when you compile, generate, or run the report. How To... 4-121 2. Expand the subnode that corresponds to the database user name you used to log in to the database to show the PLSQL Stored Program Units node.

3. In the Reports section of the Object Navigator, expand the Program Units node.

4. Click the program unit you want to store in the database, and drag it from the Program Units node to the Stored Program Units subnode. 5. Release the mouse button to insert a copy of the program unit on the server. To move a program unit from the database server to the client:

1. In the Object Navigator, double-click the Database Objects node. If this node is

disabled, the Connect dialog box displays so you can establish a database connection. 2. Expand the subnode that corresponds to the database user name you used to log in to the database.

3. Expand the Stored Program Units node.

4. Click the stored program unit you wish to move to the client and drag it from the Stored Program Units node to the Program Units node in the Reports section of the Object Navigator. 5. Release the mouse button to insert a copy of the program unit on the client. See also Section 2.6.5, About stored program units Section 2.6.4, About program units

4.13.3.5 Creating a report trigger