Creating custom report templates with BI Publisher
By Kyle Hatlestad on Mar 08, 2012
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.
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.
Now log in as a user with the rmaadmin role. In the menus, you should now have the additional choices within Records -> Configure -> Reports.
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.
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.
For the Data Set, select '/InternalContent/Values' and click Next.
You can now select the fields you want added to the table. Once selected, click Finish.
It should now add a table automatically for you. The headers can be changed to reflect the display value for the field name.
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.
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.
This should now be in the Report Source field.
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:
And when you run the report, you should get your report back presented in your template.
To read more about creating custom reports, please review the online documentation.