Pages

Thursday, May 20, 2010

Accessing OBIEE Analytical Data from Windows C# Forms Application

OBIEE analytic repositories are accessible to the third party applications through the ODBC connectivity. In this post I am going to show a sample C#.NET windows application that connects to OBIEE server using ODBC to fetch analytical data and display it on a grid.

First of all, we will need to install the ODBC driver for Oracle BI Server on the machine from where we are trying to access it. Refer the guide Installing Oracle BI Open Intelligence Interface to do this. Next we need to create ODBC DSN. I explained the steps to do this in one of my earlier post Switch OBIEE Repository and Catalog. Now you are ready to code your windows application.



Launch the Microsoft Visual Studio and create new C# Windows Forms Application.


From the tools pane drag-n-drop DataGridView control over the Form and align it as needed. Visual Studio will name it dataGridView1 by default.

In the code-behind of the form, add using directive for System.Data.Odbc namespace.



Now lets add code to execute query over BI Server and get the output. In the form's load event include following code.

In the connection string, DSN name should match the name of ODBC DSN you created. Provide appropriate user id and password.

string constring = "DSN=AnalyticServer;UID=Administrator;Pwd=Administrator";

Create ODBC connection using connection string.

OdbcConnection con = new OdbcConnection(constring);

The query should contain select statment that you intend to execute against BI Server.

string query = "SELECT statement";

Create OdbcDataAdapter using query and connection. Create a DataSet to hold results. Execute query using Fill method.

OdbcDataAdapter da = new OdbcDataAdapter(query, con);
DataSet ds = new DataSet();
da.Fill(ds);

The dataset returned will contain a Table with results. Bind this table to the dataGridView1.
dataGridView1.DataSource = ds.Tables[0];

Now build and run the project and you should see output of the query in the grid.



Oracle BI ODBC Client executes queries in the similar way. However, it is not a .NET application.

Monday, May 17, 2010

Realtime access to OBIEE analysis over iPhone

Oracle Business Indicator is a business application designed to provide mobile business users realtime access to pre-defined OBIEE analytics from the iPhone device.

Business user can browse folders on OBIEE server and view any pre-created reports stored under it.





The client for iPhone device is available for download from http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=284793704&mt=8

There's only one configuration change needed on server side. Since the iPhone device does not support Flash components, we need to configure the BI Server to render charts in the PNG format. To make this change just add following configuration under section of the instanceconfig.xml file:

<charts>
<defaultimagetype>PNG</defaultimagetype>
</charts>

iPhone Client will require setting server URL, user and password etc. For more details about configuring Oralce Business Indicator client, refer configuration guide.

Monday, May 10, 2010

Creating custom styles for OBIEE Dashboard

The default look and feel of OBIEE dashboard can be modified by creating custom style. To create custom style, one should know Casecading Style Sheets (CSS) and have basic knowledge of graphic design.

Here are steps to apply custom style to OBIEE dashboard.

1. Stop OC4J

2. Go to folder Drive:\OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics\res and make copy of folder s_oracle10 with some different name. For instance, s_mycompany.

3. Modify CSS and images in the subfolder b_mozilla_4 under s_mycompany, as per the requirement.

4. Copy s_mycompany folder to Drive:\OracleBI\web\app\res

5. Start OC4j and Log on to analytics web application.

6. Go to dashboard properties and select newly created style "mycompany" in the style dropdown.


The screen below shows default OBIEE banner area.


Here I made changes to banner images and styles to change the looks.


You can write to me if you want files for above style.