You are on page 1of 56

Business Objects

Designer and VBA Programming


Ver 5.1

Girish Menon

Business Objects
One powerful platform for reporting, analysis, and performance management.
http://www.businessobjects.com

The Business Objects product line consists of data integration; integrated query, reporting and analysis; an analytic application framework; and a suite of packaged analytic applications.
Onix

BO Tools
ADMINISTRATION REPORTING

Supervisor

Designer

Business Objects

Web Intelligence

PORTAL

DW ANALYSIS

BO Broadcast Agent

InfoView

Set Analyzer

Business Query

Business Miner

BO Main Components
Supervisor
1. 2. 3. 4. 5. Define secured connection. Set/Manage User/Password combination Define Groups, Users and assign appropriate access rights. Set up permissions to the various components of the universes Control the exchange and distribution of documents of all Business Objects users.

Designer
1. 2. Create Universe with entities, attributes, and measures named using terms that the end user is familiar with. Exported Universe to the Business Objects repository

BO Main Components
BO Reporter
1. 2. 3. 4. 5.

contd1

Generate new/ Enhance existing reports (using Wizards) based on the universes Save a frequently used report as a template for reuse. Save related reports as a document. Save documents in a central repository and assign access rights for different users. Submit documents for scheduled processing. Various Data accessing methods are : Free-hand SQL, Stored Procedures in the Database, Personal Data files (e.g., Excel sheets, ASCII text files, etc.).

BO Main Components
BO Explorer

contd2

This is used for Online Analytical Processing (OLAP). The end user can do the following: 1. 2. 3. 4. 5. 6. Explore data by different dimensions Drill down, across, and up a dimension and define the scope of analysis Create a report based on multiple sources Synchronize data from two different Microcubes and display in a single report Group, filter, and sort data. Insert summary calculations.

BO Main Components
BO Document Agent

contd3

Document Agent provides scheduled or batch processing of documents. It is installed on a document server that resides on the network between the database server and client PCs. It supports the following: 1. 2. 3. 4. Receives requests from end users, processes them locally or in client/server mode, and then distributes the processed documents to the appropriate users. Sends processed documents to a worldwide web server Processes documents sent by Business Objects users at scheduled off-peak hours. Monitors requests from the Document Agent console and allows the administrator to modify their scheduling, priority, or distribution list.

BO Main Components
BusinessMiner

contd4

BusinessMiner is a powerful data mining tool that finds useful information hidden in business data (relational databases, data warehouses, or personal files). It is usually termed as a DDM product 1. 2. 3. 4. Discovers trends in the hidden data and displays the same as decision trees. Allows to perform a what-if analysis. Is fully integrated with Business Objects Can be used as an add-in to Business Objects or as a standalone product.

BO Main Components
WebIntelligence

contd5

It is similar to BO reporting except that, this can be deployed in the web. 1. 2. 3. 4. 5. 6. 7. 8. It is a multi tier, thin client system. Provides end users access to data in the data warehouses/data marts and various business applications. Allows users to access databases without knowledge of SQL or relational database concepts. Allows users to create custom pages which will have the point of entry into the system Supports Hyperdrill. Optimizes network traffic and provides high security Runs against any existing Universe Interfaces with Oracle APPs, SAP R/3, and PeopleSoft.

Scope
Inclusions Designer, Classes, Universe, Joints, VBA Programming (basic)

Exclusions Report creation, Advanced VBA, Web Intelligence, Broadcast Agent.

Introduction
Designer is the Business Objects Module for creating Universes. Universe is a Business-Oriented mapping of the data structure found in databases.

Design Methodology
Planning Analysis Design Implementation Maintenance
- from Business Intelligence Group

Planning
Break down the information system into Functional areas. For example in a Manufacturing industry we can break the information systems into functional areas of Sales, Finance, Production,Inventory and Shipping.

Analysis
This will provide the baseline for designing. Analyze the information needs of the users. The information needs will be the reporting fields required in each of the functional areas.

Designer

Design Universe
The Universe Design can be done using the Quick Design Wizard
Define the Universe Parameters Universe name Creating connection Choosing Network layer Login Parameters Testing the Connection Click OK to complete the connection

Create Initial Classes and Objects


Quick Design Wizard Add Classes Create Measure objects

Universe is Created

Inserting New Tables

Joins

It is a relational operation that causes two or more tables with a common domain to be combined into a single table.

Rule of thumb : (n-1) joins for n tables. Supported Joins : Equi-joins Outer Joins Ways to Create joins : Detect join command Edit Join Dialog Box Theta Joins Shortcut Joins Tracing manually Formula Bar

Detect join command

Click on the icon Detect Join OR

Tracing manually 1. Position the mouse pointer over the column of the table which is to be the source of the join. The pointer appears as a hand symbol. 2. While keeping the left mouse button pressed, drag the join that begins to appear away from the source column toward the destination column. 3. The pointer is transformed into a pencil. 4. Position the pencil over the column to be the destination of the join. 5. When the second column is highlighted, release the mouse button. 6. The join between the two tables is created.

Edit Join Dialog Box

Formula Bar

Creating Classes
Class is a logical grouping of objects within a universe. In general, the name of a class reflects a business concept that conveys the category or type of objects. Insert Class button OR From the menu, Insert => Class. Fill in the class name and the description In a similar way, a subclass can be inserted in a class.

Creating Objects
Object is a component that maps to Data or a Derivation of Data in the database. For the purposes of multidimensional analysis, an object can be qualified as one of three types: a Dimension, Detail, or Measure. Objects are grouped into classes. Insert Object button From the menu, insert Object. 1. Choose the name of the object. 2. Choose type. 3. Write some description for user friendliness, then define the object. Definition can be made by using the SQL Editor

Properties of an Object
Set/Modify the properties of an object An object can be qualified as a dimension, a detail, or a measure. DIMENSION object is the object being tracked; ie: it can be considered the focus of the analysis. MEASURE object is derived from one of the aggregate functions. Statistical info DETAIL object provides descriptive data about a dimension object. However, a detail object cannot be used in drill down analysis.

Creating Condition Objects - Filters


These act as predefined conditions on a class. They represent Free Floating Where clauses. Insert condition 1. Click the class in which you want the condition to appear 2. In the dialog box, enter the name of the condition. 3. Click on the Arrows(>>) and select the condition.

Advance Functionalities of Objects


1. You can restrict an object so that only end users with the appropriate security access level can use it. 2. In this way, you can prohibit certain end users from viewing information of a sensitive or critical nature. 3. Security access levels are assigned to user profiles by the supervisor from SUPERVISOR module. 4. The levels are, from highest to lowest: Private, Confidential, Restricted, Controlled, and Public. 5. By default, an object is assigned a Public level.

Integrity Checking
This is used to check the anomalies of the Universe. As you create and modify classes and objects in the universe, this check from time to time will make sure that integrity of universe intact. Click on the Check Integrity icon Check all the required check boxes If everything is okay, then we get the following screen.

Resolving Loops in a Universe


Lookup Tables : A lookup (or dimension) table contains information associated with a particular entity or subject. In DESIGNER, Dimension and Detail objects are derived from lookup tables. Fact Tables : A fact table contains statistical information about transactions. In a BUSINESSOBJECTS universe, most but not all, Measures are defined from fact tables.

Country

Orders

There are two ways to resolve loops Alias Context

Customer

Alias
1. An Alias is an alternative name for a table. 2. The first step in creating an alias is to identify the LOOKUP table having more than one purpose in the database structure. 3. In this case, it is the COUNTRY table which is used to look up both the customers country of residence and the shipment destination. 4. This situation is referred to as a shared lookup table. We add an alias Destination to the Schema, Note that the three original joins still exist but that the loop has been broken. Country Destination Orders

Customer

Creating Aliases in Designer


Insert Alias After selecting a Table for which Alias is to be created we can create Alias manually by using the menu or the insert Alias button. Another method is, using Detect Alias Command Detect Alias

This automatically detects and indicates the tables causing loops in the active universe.

Contexts
A situation which commonly occurs is a transactional database with multiple FACT tables that share LOOKUP tables.This situation can cause loops to be formed . The only way to resolve this loop is to ensure that queries answer questions for one transaction or the other.This is done by Contexts in BO. A context is a rule by which BUSINESSOBJECTS can decide which of two paths to choose when more than one path is possible in the database. Orders Products

Customer

Loans

Contexts
For each of these paths, we can define a context by assigning a Label to it and identifying the set of joins it comprises. Orders Products Orders Context Products

Customer

Customer Loans Loans Context

Refreshing the connections of a Universe


When ever you make changes to the universe, or change connection, you need to refresh the connection. This can be done in following ways. File -> Parameters -> Connection -> Test. Tools -> Connections -> Test.

Display restrictions of a Universe


Universe has a default restriction of fetching limited number of rows. You need to change this at the design time itself, otherwise it will give you, a Partial results alert in the reports. This can be done by
Tools -> Options -> Database -> Maximum Number of Rows Fetched File -> Parameters -> Controls -> Limit size of result set to

VBA Programming

The Challenge When to Go For?


Third party database, Part of a packaged application. Data embedded in a text string, unable to extract the elements using SQL. Unable to display the individual pieces of the text string in a column format Text wraps across multiple rows, the data wraps across multiple rows with certain/some delimiters

Approach/Solution
Retrieve the data Concatenate(if reqd:) the message string for the required condition Parse out the diagnosis code for each test Populate a new table with the data in the new format

The Solution with VBA


Retrieve all applicable rows of data using the query panel Define a new data provider using VBA. Use the classes in the DPVBAInterface Object to create the data provider. Create the VBA data provider with the same structure as the data provider using the query panel

The Solution with VBA


Populate it with data from the query built on the universe Use VBA to traverse the existing data provider, parsing out the appropriate diagnosis code from the text string/ condition/s Finally populate the VBA data provider Use this to populate the reports.

VBA
Microsoft Visual Basic for Applications (VBA) is a standard feature in BusinessObjects. It is used to extend the features and capabilities of BusinessObjects. Business Objects comes with its own set of object models that conform to Microsofts Component Object Model (COM) specifications. This means the application is exposed and can be accessed by VBA. Each object has a set of properties and methods that can be used to control the BusinessObjects program behavior.

VBA Options
Macros
1. 2. Series of commands and functions which perform a task. Attached to a Business Objects document.

Add-Ins
1. 2. 3. 4. Provide added functionality. Not specific to one report. Stored in a file with a .REA extension. Other users can load these Add-Ins and use them in their own reports.

Structure of VBA Data Provider


In BO-Reporter queries are built on a universe using the query panel The Data Provider class provides access to the individual data elements of a data provider The idea here is to create a VBA data provider and populate it with data from the query built on the universe

How to Create a Data Provider


1. 2. Write a VBA procedure which takes the interface DPVBAInterface as a parameter Write this procedure within the VBA environment of the Reporter module

Visual Basic Editor

Reporter contains a Visual Basic editor which can be used for developing macros, add-ins, and VBA data providers

Procedure for Writing a Data Provider


Create a Data cube Set the dimensions, For this use the structure of the existing data provider Populate the cube from the data provider based on the universe, parsing out the required data

Using the Object Model


DPVBAInterface DPVBACubes DPVBACube DPVBAColumns DPVBAColumn Provides access to the VBA data provider Automation object Provides access to the collection of data cubes Provides access to a data cube Provides access to the collection of columns Provides access to a column within a data cube

Creating the Data Cube


To create a new VBA data provider object, create a VBA procedure which takes a DpVBAInterface variable as an argument

Public Sub DataProvObj (varDPInterface as DpVBAInterface) . End Sub

Creating the Data Cube


Declare a DpVBACube variable
Dim varDPCube as DpVBACube

Return an object of type DPVBCube


varDPCube = DPinterface.DPVBACubes.Item(index)

Set the Dimensions of the Data Cube


First declare a DPVBAColumns variable
Dim varColumns As DPVBAColumns

Return an object of type DPVBAColumns


Set varColumns = varDPCube.DPVBAColumns

Define the number of columns in the VBA data provider based on the number of columns in the original data provider
varNumColumns = ActiveDocument.Dataproviders(1).Columns.Count varColumns.SetNbColumns(varNumColumns)

Manipulating the Column(use it for the new DP)

If the 1-st column of the old data provider is Motorola


If ActiveDocument.DataProviders(1).Columns(1).Name = "Motorola" Then

Reassign the column of the old data provider to Motorola1


varColumns.Item(i).Name = Motorola1"

Set the column properties


Specify the qualification of the column
varColumns.item(i).qualification 1. 2. 3. boDetail boDimension boMeasure

Specify the type of the column


varColumns.item(i).type 1. 2. 3. 4. boCharacterObject boDateObject boNullObject boNumericObject

Summary
1. 2. 3. 4. Business Objects COM interface allows end users to extend the capabilities of the tool VBA data providers allows for accessing data in ways not available via SQL VBA data providers support the re-formulating of malformed data VBA data providers behave just as other data providers in Business Objects

Thank you ..
References :

Extreme VBA programming Session by Marty C. BO help files.


Disclaimer :

The trademarks referenced are the property of their respective owners. BO 5.1.3 was used to validate some portions.

You might also like