Instantiating BI Publisher Objects

The BI Publisher classes are not built-in classes, like Rowset, Field, Record, and so on. They are application classes. Before you can use these classes in your PeopleCode program, you must import them into your program.

Your import statements should look similar to the following:


Note: Using the asterisks after the package name makes all the application classes directly contained in the named package available. Application classes contained in subpackages of the named package are not made available.

After you've imported the appropriate BI Publisher classes, you instantiate an object of one of those classes using the constructor for the class and the create method.

The following example declares the variable &rptDefn and creates a new instance of the ReportDefn class:

Local PSXP_RPTDEFNMANAGER:ReportDefn &rptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn(&rptDefnId);