Best Practices from Oracle Development's A‑Team

Creating custom report templates with BI Publisher


In the records management capabilities within WebCenter Content 11g, reports that are created are generated by a runtime version of Oracle BI Publisher.  In order to create those reports, there are report templates that are checked in during the initial configuration of records management.  These templates are in rich-text format (RTF) and can be easily modified in Word.  To make simple changes within the existing templates, you can simply check them out, download the RTF file, modify them in Word, and check in a new revision.  But to make more complex changes such as the input data into the report or to create a whole new report templates, that involves using the BI Publisher client to help design those templates.  I'll walk through a simple example of creating a new report template from scratch and then adding that template into WebCenter Content: Records.  In this sample report, we'll create a new Search Results report and output some custom metadata to the report.

Main Article

The first step is to download and install the Oracle BI Publisher Desktop for Windows utility.  Install this on your Windows client machine that has Microsoft Word installed.  This will add a new menu choice or ribbon for BI Publisher.

BI Publisher Ribbon

Next, we need to turn on the proper rights within our 'rmaadmin' role to enable customization of the reports.  In WebCenter Content, login as an administrator and go to Administration -> Admin Applets -> User Admin.  From the menu, go to Security -> Permissions by Role.  Highlight the 'rmaadmin' role (or role you want to grant this access to) and click 'Edit RMA Rights'. On the Admin tab, check the 'Customization' box.

Customization rights

Now log in as a user with the rmaadmin role.  In the menus, you should now have the additional choices within Records -> Configure -> Reports.

Reports menu

Select the  'Download BI XML Data' choice in the menu.  This will give you a list of the types of data you can export as part of the report.  In our example, we'll select the 'Content' choice.  Then click the Download button and download that to your local system.

Now go to Microsoft Word and start a new document.  Apply whatever look & feel, headers & footers, etc you want for the template.  Now go to the BI Publisher menu and select Load Data -> Sample XML. Select the XML file that saved previously.  It should report that data was loaded successfully.

Loaded Successfully

Now position the mouse where the table of results should appear.  Click Table Wizard in the menu.  Select the report format of 'Table' and click next.

Table Format

For the Data Set, select '/InternalContent/Values' and click Next.

Data set

You can now select the fields you want added to the table. Once selected, click Finish.

Report Fields

It should now add a table automatically for you.  The headers can be changed to reflect the display value for the field name.

Table Added

Now that we have our report template, save it out in rich text format (RTF).  Now we can add this into WebCenter Content as our new template.  Go back to the browser where you are logged in with the rmaadmin role.  Go to Records -> Configure -> Reports -> Templates.  Select the type of Report Template.  In this case, we'll select 'Content' and click Configure.

Template Choices

In the results menu, click 'Check In New Template'.  Fill out the appropriate metadata, browse to the RTF file, and submit the template.

Now that we have the template established, we need to create the report object itself.  Go to Records -> Configure -> Reports ->  Create New Report.  Select the type of report, in this case Content and click Configure.  In this case, we're not actually submitting a file.  Instead, we're associating our report with the report template and the service we want to tie it to.  Fill out the standard Type, Title, Security Group and other fields and scroll to the Report Template field.  Because we selected a report type of Content, we should see the list of templates associated with that type including the one we just added.  Select that from the list.  For Report Format, select the format of the report you want generated.  For Report Source Type, you have 3 choices: Service, Query, and Dynamic Query.  The Service and Query would use predefined services or direct database query statements.  Dynamic Query allows you to define a particular search query for results.  In this example, we want to rely on the results coming back from the users' searches, so we'll pick 'Service'.  For Report Source, click 'Add New'.  In the report sources dialog, scroll down to the 'GET_SEARCH_RESULTS' service and move that into the Report Source Services list.

Report Sources

This should now be in the Report Source field.

Report Check In

There are also choices to modify the source parameters of the service as well as the ability to schedule the report to be run at certain times.  In this example, neither option is necessary.  Fill out the rest of the form and check-in the report.

Now when you do a search, you should now have the report template available to run the report:

Search Results Menu

And when you run the report, you should get your report back presented in your template.

Final Report

To read more about creating custom reports, please review the online documentation.





Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha

Recent Content