You can enter this code by copying and pasting it from the provided text file called plsql_code.txt.

Click Compile.

If there are compilation errors, match your code to the code we have provided (either in the example RDF file or in this chapter), then compile it again.

Once there are no compilation errors, click Close.

Your new function displays in the Object Navigator.

Choose File > Save to save your new function.

In the Save Library dialog box, type bonus.pll, make sure File System is selected, then click OK.

In the Object Navigator, under the MODULE1 report you have created, click the Attached Libraries node. Be sure to select this node, and not the one under the PL/SQL Libraries node.

Choose Edit > Create.

In the Attach Library dialog box, in the Library field, type bonus.pll.

Note:

If you saved bonus.pll to another directory, you can click Browse to find it on your file system. Just make sure you have selected File System before browsing.

When the library name displays in the Library field, click Attach to attach the library.

Note:

If you attach a library whose name also includes a path, Reports Builder will inform you that the path names are not portable, and will give you the option of deleting the path. If you choose to continue using a path specification, Reports Builder will only look in that specific location for the library. So, if you move the library, Reports Builder will not be able to find it. If you delete the path, Reports Builder will use a standard search path to locate the library if it is moved.

The objects in your Object Navigator should now look something like this: