Wednesday, May 25, 2016

CREATING BI PUBLISHER REPORT FROM A WEB SERVICE

Introduction
Most of us have been creating BIP (Business Intelligence Publisher) Reports in Oracle Fusion Applications using SQL query. Also in one of the previous posts we learned how we may create the same using static data the complete article may be read here.
In this example we will take a publicly available Web Service and try to develop a report out of it. This kind of report generation primarily involves 3 steps as below:
Configuring the Web Service as a BI Publisher Data Source
  1. Creating a Data Model from the configured Data Source
  2. Developing a BIP Report from the data model created
As a perquisite I have found a public web Service called ‘Weather’ and we would use the same in this example. A detailed step by step approach follows:
Configure Web Service as BI Publisher Data Source
As a first step we need to login to the environment with a user with BI Publisher Administrator Role (We will use ‘HCM_IMPL’ for the purpose as shown below:
Next Navigate from Reports and Analytics (image1) link to the Catalog (image2) and ultimately to the Adminstration (image3) as shown:
Once you click on the link it will take you to the Catalog Page as shown:
A mouse click on the Catalog Icon takes us to a new screen
In the next screen we will find different sections which will highlight different configuration and admin control features like security, session management, maintenance and troubleshooting…..
We will concentrate on the BI Publisher Admin controls and so will click on link (Highlighted in yellow color)
This opens up a new page where we can define various controls including defining data sources, security settings, integration setups, runtime configurations, setting up delivery options as well as system and maintenance options.
As we are trying to configure a web-service connection we will use that link:
Next we need to select the ‘Add Source’ option under the tab ‘Web Service’ (pre-selected)
Next populate the following details while defining the Web Service Data Source:
Click on ‘Apply’ and the setup is complete.
We may now move to creating a BI Publisher Data Model.
Creating a Data Model from the configured Data Source
Click on the “New’ icon. Select ‘Data Model’ from the drop down menu and then while selecting the ‘Data Set’ choose ‘Web Service’
We now need to enter details for the Data Source and they listed in a tabular format below:
Click on the ‘OK’ button on the bottom right hand-side and a new screen similar to the one shown below will appear.
But, we need to define a Parameter (Zip) of string type. So let us do that:
Once done, we should next move to the Data tab and it should display a Parameter with a Prompt as (Zip) , yes that is the one we defined at the time of parameter creation.
We will pass on a random value of Zip Code (94065 which is the zip code of Redwood City) and let-us hope we get weather details
We are able to see the results. We will now press the ‘Save as Sample Data’ button (which is a perquisite for creating a report) and Click ‘Ok’ on the new pop-up screen
We have now created the Data Model and should now move to next step where we will try to create a Report from this Data model.
Developing a BIP Report from the data model created
We have already learnt how to do this in previous articles, but no harm re-visiting the basics.
Click on the ‘Create Report’ Icon and then point to your Data Model by using the search (icon)
For this example we will use the ‘Guide Me’ and click on next
Select the default values (Page Options as Portrait and Layout as Table) and then click on ‘Next’
Click on the Finish Button and then you will be prompted to give a name to the Report. We would name it as WeatherDetailReport
When we navigate to the Report Section and pass ‘94065’
Oh we have encountered an error.
There could be many reasons for it, the primary one being we have chosen the Report Output Type as Interactive (shown in screen below) and we have not defined a layout. This combination isn’t supported as you need to have a template for an interactive report.
Click on the Edit Layout link and this takes us to a page (displaying a Report layout which is Blank)
We will define the template (by Creating a Data Model, Adding Relevant Columns) and post that we will have the following screen:
If we again try to View the Report it displays data:
So we have now completed creation of BIP Report.
Cool stuff!!
We can extend the same logic and create even more complex reports based on Web Service as a Data Source. You may try with any other publicly available web service and verify the results.

No comments:

Post a Comment