1. Creating a BI Java-Client Application
Exercise Objectives
Learn how to use the BI Java-Client Class wizard to develop a fully functional,
ad hoc query and analysis application.
Exercise Description
You will use the BI Java-Client Class wizard to generate a business intelligence
application that incorporates the stoplight report that you created in the previous
tutorial. The application enables an end user to perform typical OLAP analyses,
including the following:
- Open and save reports and graphs
- Modify queries
- Create calculations
- Format data presentations
- Export data to a spreadsheet
- Print
Menus and a toolbar provide access to these features. As
part of the exercise, you will run the application and learn how to use a subset
of the features that are provided.
Exercise Tasks
Building an application using the BI Java-Client Class wizard.
To create an application using the BI Java-Client Class wizard:
- Start JDeveloper9i and open Project1.jpr under
BIWorkspace.jws.
- Right-click Project1BIDesigner1 and choose New
from the popup menu. The New dialog box appears.
- Under Categories, select Business
Intelligence.
- Under Items, select Java-Client Class and choose
OK to close the dialog box.
- The Welcome screen, which describes the wizard steps, is displayed. Choose
Next to continue.
- To specify the name of the BI Designer that the application will use, select
Project1BIDesigner1 - Project1 from the drop-down
list and choose Next.
- To specify the presentation that is to be displayed when the application
starts, ensure that the Yes radio button is checked. Then,
choose Browse to view the presentations that are available
for selection. Select Sales Analysis Crosstab, which is a
presentation that you created previously, and choose OK.
Choose Next to continue.
- To include components such as menus and toolbars in the application, ensure
that the Yes box is checked for the following
items: Menus, the File menu item, the Tools menu item, and a toolbar. Choose
Next to continue.
- On the Summary screen, review your selections and choose Finish.
- From the File menu, choose Save All to save your work.
The application code is generated by the wizard and the BIApplication1.java
source code is added to the Navigation window under the project. A default deployment
profile bijavaclientarchive1.deploy is also created.
Running the Application
To use the new application:
- Right-click BIApplication1.java and choose Run
BIApplication1.java from the popup menu.
The running application is displayed in a new window and starts by showing
the stoplight report that was specified in the wizard. The application also
contains a menu that provides access to various features. If you copied objects
to the remote BI Beans Catalog and the Update the runtime settings
... box was checked, then you will display the crosstab from the
remote BI Beans Catalog. You will also open and save presentations in the
remote BI Beans Catalog from this application because your runtime settings
have been updated to reference the remote Catalog.
- Click the down arrow beside the Video Division header to
drill down video products.
- In the Time dimension drop-down on the paging control, select year 2001.
The crosstab is updated to the specified year and the formatting
rules also apply to the new time period.
- Use the formatting toolbar to modify the look and feel of the stoplight
report. The formatting toolbar functions the same as it does in the Presentation
Editor in JDeveloper. For example, click colored items in the crosstab and
use the color palette to change their colors. Also, experiment with text formatting
and alignment tools to apply changes to the current crosstab.
- Change the layout of the dimensions that are displayed
in the crosstab by using a drag-and-drop operation to move the Product
tile over the Geography edge.
This is only an example and you will not save these changes, although you could.
Continue to experiment with the formatting toolbar
and the rich set of OLAP tools and functionality that are offered by the application.
To open, modify, and save presentations:
This section demonstrates how to open the Sales Analysis Graph that you created
in the previous tutorial. Then, you modify the graph format and the query
that the graph is displaying. Finally, you save the modified graph to the Catalog
using a different name.
- From the File menu, choose Open and select the presentation
Sales Analysis Graph (which you created in the Developing
OLAP Objects tutorial). The graph presentation opens and is displayed in the
application replacing the stoplight report.
- Use the QueryBuilder to change the Sales measure that is displayed in the
graph to a Variance calculation that you defined in the Creating OLAP Objects
tutorial.
-
From the Tools menu, choose Edit Query.
-
In the Query Builder, select the Items tab.
-
Click the Remove All Items shuttle button ('<<')
to remove all selected measures (Sales). Notice that the accompanying
dimensions are removed also.
-
In the Available list, select Quota Variance. To move
this item to the Selected list, click the Add Selected Items
shuttle button ('>').
-
Choose OK to finish and exit the Query Builder. Now,
the graph displays the variance calculation.
- Save the new graph. From the File menu, choose Save
As. Enter
Sales Variance
as the name of the new graph.
- From the File menu, choose Exit.
If you want to verify that the presentation was saved to the remote Catalog,
then browse the remote Catalog from the BIDesigner in JDeveloper.
Exercise Summary
In this exercise, you learned how to generate an ad hoc query and analysis
application using the BI Java-Client Class wizard. You also learned how to use
the rich OLAP capabilities that are integrated into the BI Beans and runtime
editing tools to modify and save a new presentation.
The next exercises will show you how to incorporate presentation objects
into your application and how to add a customizer that allows you to modify
the presentation's titles.