Oracle Business Intelligence Beans Sample

Creating Calculations

Overview

The Creating Calculations sample application demonstrates how to use CalcBuilder to modify a Crosstab.  BICalc connects to Oracle9i OLAP (the source of the business data for the application) and to the BI Beans Catalog (where object definitions, like crosstabs and graphs, are saved).

The BICalc class extends BIFrame. BICalc provides a menu with access to a simple connection dialog which prompts a user for security credentials. BICalc then makes the two connections described above. After the connection is established, a new crosstab can be created using the "New Crosstab" file menu option.

After a Crosstab is created, the user can perform one of the following functions:

Setup Requirements

If you have not already done so, you must perform several installation and configuration tasks, then open the workspace javaclient\javaclient.jws under the samples directory within JDeveloper. All the necessary files for this sample can be found in the creating_calcs.jpr project under the javaclient.jws workspace.

Code Highlights

There are three significant areas in the code which comprise most of the features of the BICalc sample. The two methods

protected void runCalcBuilder()

and

private void insertYearAgo(MDMeasure measure)

show how to use CalcBuilder to generate a custom measure and how to manually create a custom measure, respectively. Once the measure has been obtained, both methods use

private void updateMeasures(MDMeasure mdMeasure)

to include it in the query.

How To Run

To run the BICalc sample within JDeveloper, simply right-click the file BICalc.java and choose Run BICalc.java.
From the File Menu in the application, choose Connect and enter the username and password of the user that owns the BI Beans Catalog (e.g. BIBCAT).

oracle logo  
Copyright © 2002, 2003 Oracle. All Rights Reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.