41.9 Move the Packages Into a Library

If you have many reports that use these same REF CURSOR types and SELECT statements, you can move the program units that you created into a PL/SQL library stored in a file, so that other reports can easily share the code. The steps in this section will help you to move the program units to a PL/SQL library.

To move the packages into a library:

  1. In the Object Navigator, click the PL/SQL Libraries node, then click the Create button in the toolbar to add a new library.

  2. Choose File > Save As.

  3. Type DEPT_CONTAINER as the Library.

  4. Ensure that File System is selected.

  5. Click OK.

  6. Drag and drop the following program units from your report to the Program Units node under the newly created DEPT_CONTAINER library:

    • CONCL_CV (Package Spec)

    • CONT_CV (Package Spec)

    • CONT_CV (Package Body)

    • PORT_CV (Package Spec)


  8. If the Paper Design view is open, close it.

  9. In the Object Navigator, under the Program Units node for your report, delete CONCL_CV (Package Spec), CONT_CV (Package Spec), CONT_CV (Package Body), and PORT_CV (Package Spec).


    If the Paper Design view is open when you delete the packages from the report, you may get some errors.
  10. Click the Attached Libraries node for your report, then click the Create button in the toolbar to add a new attached library.

  11. Click Browse to find the DEPT_CONTAINER library. It will have a .PLL file extension. After you have found and selected DEPT_CONTAINER, click Open.

  12. Click Attach.

  13. Choose Program > Compile > All.

  14. Click OK to close the Compile window.

  15. Click the Run Paper Layout button in the toolbar to run the report and view it in the Paper Design view.

  16. Save the report as ref_68_your_initials.rdf.