Importing multiple reports in BI Publisher

When preparing the installation of OIM Suite Bundle Patch 6 i had to import the for supplied BI Publisher report artifacts. These supplied artifacts, reports and datamodels, are logically grouped in folders and sub-folders. For example; the "Access Policy Details" and "Access Policy List by Role" reports and reportmodels are grouped in the "Access Policy Reports". The BI Publisher catalog utility, BIPCatalogUtil.sh", has an import parameter, basedir, for importing a set of reports or data models. When importing the reports using the basedir, you probably will get, like me, a java.lang.StringIndexOutOfBoundException.

$ ./BIPCatalogUtil.sh basedir /tmp/OIM_11gR1_BIP11gReports
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1937)

Normally you will get this Exception if you do not substitute spaces in the names of the catalogpath or the reportname when importing a single report. So the catalog utility cannot import multiple reports if the path to these reports do contain spaces. So there is no other option to import all the reports than importing all the report artifacts one by one and replacing the spaces in the names by '+'. With every Report (.xdo) an appurtenant Datamodel (.xdm) has to be imported. When loaded in BI Publisher the Report needs a correct reference to the DataModel to be able to find it. Probably the catalog utility does not configure this reference when importing a report and appurtenant datamodel. If you select you fresh imported report, you will get an error similar "The report cannot be rendered because of an error" like the one below. When requesting the error details, an error similar like "oracle.xdo.servlet.CreateException: Data Model definition not found:"

image001

This reference is stored in the attribute url of element dataModel of the _report.xdo file. The correct reference is the location of the datamodel relative to the catalogpath. When importing a report, report.xdo and datamodel report.xdm from /tmp/BIPReports/RepBundle/ to catalogpath /impReports/RepBundle the correct value for attribute url in attribute dataModel is /impReports/RepBundle/report/report.xdm, not /impReports/RepBundle/report.xdm.

So when importing logically grouped artifacts with spaces in filenames or folders into BI Publishers catalog you should import them one by one, supplying the correct catalogpath and manually edit all _report.xdo files upfront the import or afterwards through the BI Publisher Admin Console. Here maybe a better alternative, download the ImportBIPReports.sh script and Import all reports with correct references to the datamodels. Just supply the oracle_home, source directory containing the reports and the desired location in BI Publiser, the catalog path.

./ImportBIPReports.sh -h /u01/app/oracle/middleware/Oracle_BI -b /tmp/OIM_11gR1_BIP11gReports/ -c /OIM_BP6_Reports


image002




blog comments powered by Disqus