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:

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:
  1. Start JDeveloper9i and open Project1.jpr under BIWorkspace.jws.
  2. Right-click Project1BIDesigner1 and choose New from the popup menu. The New dialog box appears.
  3. Under Categories, select Business Intelligence.
  4. Under Items, select Java-Client Class and choose OK to close the dialog box.
  5. The Welcome screen, which describes the wizard steps, is displayed. Choose Next to continue.
  6. To specify the name of the BI Designer that the application will use, select Project1BIDesigner1 - Project1 from the drop-down list and choose Next.
  7. 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.
  8. 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.
  9. On the Summary screen, review your selections and choose Finish.
  10. 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:
  1. Right-click BIApplication1.java and choose Run BIApplication1.java from the popup menu.
  2. 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.

  3. Click the down arrow beside the Video Division header to drill down video products.
  4. 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.
  5. 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.
  6. 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.

  1. 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.
  2. 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.

    1. From the Tools menu, choose Edit Query.
    2. In the Query Builder, select the Items tab.
    3. Click the Remove All Items shuttle button ('<<') to remove all selected measures (Sales). Notice that the accompanying dimensions are removed also.
    4. In the Available list, select Quota Variance. To move this item to the Selected list, click the Add Selected Items shuttle button ('>').
    5. Choose OK to finish and exit the Query Builder. Now, the graph displays the variance calculation.

  3. Save the new graph. From the File menu, choose Save As. Enter Sales Variance as the name of the new graph.
  4. 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.

Overview | 2. Working with Presentations