SAP BusinessObjects XI 4.0 Interactive Analysis with ReportEngine SDK

Customizing SAP BusinessObjects Interactive Analysis with ReportEngine SDK
SAP BusinessObjects XI 4.0
2010-11-16
Copyright
© 2010 SAP AG. All rights reserved.SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.
2010-11-16

Contents

Preface....................................................................................................................................5Chapter 1
1.1
1.2
1.3
1.4
1.5
2.1
2.2
3.1
3.2
3.3
3.4
3.5
3.6
What you can learn from this guide?.........................................................................................5
Who should use this guide?.....................................................................................................5
What you should know?...........................................................................................................5
Related documents..................................................................................................................5
List of APIs not functional from the SAP BusinessObject XI 4.0 release onwards....................6
Introduction to the ReportEngine SDK....................................................................................7Chapter 2
Packages for customizing SAP BusinessObjects Enterprise.....................................................7
ReportEngine SDK in SAP BusinessObjects Enterprise environment.......................................8
Workflow of ReportEngine SDK application.........................................................................11Chapter 3
Application essentials.............................................................................................................11
Document management.........................................................................................................11
Viewing reports......................................................................................................................11
Formatting documents...........................................................................................................12
Open document workflow......................................................................................................12
Refresh document workflow...................................................................................................12
Setting up development environment...................................................................................15Chapter 4
4.1
4.2
4.2.1
4.2.2
4.3
4.3.1
4.4
4.4.1
4.4.2
4.4.3
Installing ReportEngine SDK components..............................................................................15
Setting up the Java environment............................................................................................16
Setting up the Eclipse environment........................................................................................16
Project Setup.........................................................................................................................16
Logging with ReportEngine SDK Overview.............................................................................18
Logging Systems...................................................................................................................19
Configuring ReportEngine using webi.properties....................................................................24
What is webi.properties?........................................................................................................24
How to update webi.properties..............................................................................................24
Configuration Options............................................................................................................25
2010-11-163
Contents
Developing web application using ReportEngine SDK.........................................................27Chapter 5
5.1
5.1.1
5.1.2
5.1.3
5.1.4
5.1.5
5.1.6
5.1.7
5.2
5.2.1
5.2.2
5.2.3
5.2.4
5.2.5
5.2.6
5.3
5.3.1
5.3.2
5.3.3
5.3.4
5.4
5.4.1
5.4.2
5.4.3
5.5
5.5.1
5.5.2
Application Essentials.............................................................................................................27
Overview................................................................................................................................27
"Hello World"..........................................................................................................................27
SAP BusinessObjects Enterprise sessions............................................................................29
Implementing "Hello World"....................................................................................................32
User preferences...................................................................................................................35
Exceptions generated by the SAP BusinessObjects Enterprise SDK......................................40
Working with the ReportEngine SDK......................................................................................41
Document Management.........................................................................................................43
Overview................................................................................................................................43
Document types.....................................................................................................................43
Document state: storage tokens............................................................................................44
Organizing documents in categories and folders....................................................................47
Working with documents........................................................................................................54
Document properties.............................................................................................................63
Viewing reports......................................................................................................................65
Overview................................................................................................................................65
Viewing reports......................................................................................................................65
Handling prompts...................................................................................................................72
Displaying a report map..........................................................................................................83
Drilling in Interactive Analysis Reports....................................................................................84
Overview................................................................................................................................84
Introduction to drilling.............................................................................................................84
Drilling in reports....................................................................................................................87
Working with Recordsets.......................................................................................................94
Overview................................................................................................................................94
Anatomy of a recordset..........................................................................................................94
Best Practices to improve ReportEngine performance.........................................................97Chapter 6
6.1
6.2
Index 101
Best Practices........................................................................................................................97
Developer tips........................................................................................................................98
More Information...................................................................................................................99Appendix A
2010-11-164

Preface

Preface
The ReportEngine Java developer guide helps you to customize web application using Java SDK.
1.1 What you can learn from this guide?
This guide describes the processes and procedures for creating web application using SAP BusinessObjects Enterprise SDK and the ReportEngine SDK.
1.2 Who should use this guide?
This guide is intended for developers who are interested in developing web applications using SAP BusinessObjects Enterprise SDK and the ReportEngine SDK.
1.3 What you should know?
To use the SAP BusinessObjects Enterprise SDK and ReportEngine SDK, you need a working knowledge of the concepts of distributed computing systems, HTTP server technology, and JSP or .NET development. You also need a basic knowledge of the products in the SAP BusinessObjects product line. Familiarity with SAP BusinessObjects Enterprise is assumed.
1.4 Related documents
For more information on classes and interfaces of SAP BusinessObjects Enterprise SDK and ReportEngine SDK, refer to the following guides:
SAP BusinessObjects Enterprise Java API Reference guide
2010-11-165
Preface
ReportEngine Java API Reference guide
For information on assembling and deploying web application, refer
Interactive Analysis ReportEngine SDK
guide.
Deploying the SAP BusinessObjects
1.5 List of APIs not functional from the SAP BusinessObject XI 4.0 release onwards
In SAP BusinessObjects XI 4.0 release, the Report Engine SDK does not support the following features:
Drilling in Web Intelligence documents
Building queries
Document and report editing
The following public classes and interfaces are no longer functional from SAP BusinessObjects XI 4.0 onwards:
2010-11-166

Introduction to the ReportEngine SDK

Introduction to the ReportEngine SDK
The ReportEngine SDK is used to view Interactive Analysis and Desktop Intelligence documents. It is also used to create and modify Interactive Analysis documents. The ReportEngine SDK is considered as a component of SAP BusinessObjects Enterprise SDK as they are designed to work together. For example, if you want to modify and view a Interactive Analysis document in SAP BusinessObjects Enterprise, then you must use SAP BusinessObjects Enterprise SDK and ReportEngine SDK in an integrated fashion.
You can use COM, Java, or .NET API interfaces to create web portals that access the back-end SAP BusinessObjects Enterprise server. Custom application developed using this SDK has the same functionality as Infoview since it is created with some of the same APIs.
2.1 Packages for customizing SAP BusinessObjects Enterprise
There are two packages for customizing SAP BusinessObjects Enterprise:
SAP BusinessObjects Enterprise SDK
This package is called the platform package and provides platform functions of the SAP BusinessObjects servers and document scheduling.
ReportEngine SDK
This package plugs into SAP BusinessObjects Enterprise SDK. It provides functionalities of Interactive Analysis ReportEngines.
2010-11-167
Introduction to the ReportEngine SDK
2.2 ReportEngine SDK in SAP BusinessObjects Enterprise environment
SAP BusinessObjects Enterprise is a framework of servers that facilitates enterprise-wide, web-based management and distribution of reports. Web applications can access the functionality of SAP BusinessObjects Enterprise through APIs provided by the SAP BusinessObjects Enterprise SDK and ReportEngine SDK. For detailed information on SAP BusinessObjects Enterprise, see the
BusinessObjects Enterprise Java SDK Developer Guide
The ReportEngine SDK enables you to create and modify Interactive Analysis and Desktop Intelligence reports. These report modification services are provided by the ReportEngine server. For more information about SAP BusinessObjects Enterprise servers, see the
Guide
.
The diagram below illustrates the relationship between the ReportEngine SDK and other SAP BusinessObjects Enterprise components,
.
SAP BusinessObjects Enterprise Administrator's
SAP
2010-11-168
Introduction to the ReportEngine SDK
2010-11-169
Introduction to the ReportEngine SDK
2010-11-1610

Workflow of ReportEngine SDK application

Workflow of ReportEngine SDK application
All applications that use ReportEngine SDK do not have the same features. But all typically provide features for listing and viewing documents contained in the SAP BusinessObjects Enterprise Central Management System (CMS).
3.1 Application essentials
Every application that uses ReportEngine SDK has to perform common tasks such as importing the appropriate packages, and creating and managing the user's SAP BusinessObjects Enterprise session (login).
Every application has to take user profiles into account and ensure that errors are handled properly. See User rights for categories and folders and User preferences.
3.2 Document management
Document management features include listing the documents that the current user can view depending on user's rights. It allows the user to browse and manage categories and folders used to organize documents.
Document management also include features such as saving and scheduling documents.
3.3 Viewing reports
An application that allows to view documents can display them using the default DHTML format. It is easy to extend the functions to handle documents that contain prompts, and to provide drilling functions. These extended functions are handled when a document is refreshed.
The viewing features depends on the type of document opened. The report-viewing part of the application should include routines for viewing reports in the following document types:
2010-11-1611
Workflow of ReportEngine SDK application
Interactive Analysis (*.wid)
other document types, for example Adobe Acrobat, Microsoft Excel or XML format.
See Viewing reports for a full listing of available formats.
3.4 Formatting documents
Formatting documents involves creating and positioning the elements of a report (blocks, sections, and cells) in the appropriate report structure. Using ReportEngine SDK you can build reports from scratch.
ReportEngine SDK includes classes for controlling report page decoration (fonts, colors, headers, and footers) and layout.
3.5 Open document workflow
The following diagram shows the workflow for opening a document.
The document contains data that is retrieved from the data source (universe). Each document is identified by an unique ID which is required to open a document.
3.6 Refresh document workflow
The following diagram shows the workflow for refreshing a document.
2010-11-1612
Workflow of ReportEngine SDK application
The document must be refreshed to get the latest information from the data source. The refresh action requires prompt information if the document contains prompts, and context information if the document contains contexts.
2010-11-1613
Workflow of ReportEngine SDK application
2010-11-1614

Setting up development environment

Setting up development environment
This section describes how to set up a development environment for web application based on ReportEngine SDK in a Java environment.
4.1 Installing ReportEngine SDK components
The ReportEngine SDK components are added to the development machine when SAP BusinessObjects Enterprise is installed on the system. To develop a custom ReportEngine SDK application it is necessary to connect to a running SAP BusinessObjects Enterprise server. However, the development environment need not be on the same machine as the SAP BusinessObjects Enterprise Server.
To install the ReportEngine SDK components on a development machine, perform the following steps :
1.
Run SAP BusinessObjects Enterprise installer.
2.
Choose the Setup language and click OK.
3.
Click Next on the "BusinessObjects Enterprise XI 3.1 Installation Wizard" window.
4.
Select the I accept the License Agreement in the "License Agreement" panel.
5.
Click Next.
6.
Enter your corporate information and keycode.
7.
Click Next.
8.
Click Next.
9.
In the "Install Type" window, select Custom or Expand Install button.
10.
Specify the destination folder in the "Destination Folder" text box.
11.
Click Next.
12.
Deselect all BusinessObjects Enterprise Features.
13.
Enable the Developer Components.
To install J2EE components only, deselect the SDK products feature and install the Java features sub-component.
14.
Click Next.
2010-11-1615
Setting up development environment
15.
Click Next.
This installs all components necessary to develop custom Business Objects applications; Java libraries are installed and registered correctly.
4.2 Setting up the Java environment
To setup the ReportEngine Java environment, refer the following sections:
Setting up the Eclipse framework

Project Setup

4.2.1 Setting up the Eclipse environment
Eclipse is an Integrated Development Environment (IDE) which provides a universal toolset for application development. Eclipse is an open development platform and can be downloaded from the eclipse web site for free of cost.
To create a Java web-based application, you must have an application server and Java Development Kit (JDK) installed on the machine. By default, Apache Tomcat application server is installed along with SAP BusinessObjects Enterprise installation. Hence, an example on creating a dynamic web project is explained considering Apache Tomcat as an application server.
4.2.2 Project Setup
It is recommended to create a dynamic web project using Eclipse. It has the following advantages:
External jars and other Eclipse projects can be included in the working project.
Easy to export a war file which can be deployed in any application server.
Easy to run the application code.
The Web project contains the JSP files, images and various web components in a structured manner. The WEB-INF, lib, classes and other directories which are required to create a web application will be predefined. This makes the coding simpler.
2010-11-1616
Setting up development environment
4.2.2.1 Creating a dynamic web project
The following are the pre-requisites for creating a web application:
Eclipse must be installed and configured.
Apache Tomcat application server must be installed.
Java Development Kit (JDK) must be installed and configured.
1.
Launch Eclipse by selecting a workspace.
2.
In the Package Explorer panel, right-click, select New and click Project. "Select a Wizard" window appears.
3.
In the list box, expand Web and select Dynamic Web Project.
4.
Click Next. "Dynamic Web Project" window appears.
5.
Enter the "Project Name".
6.
Under "Target Runtime", click New. "New Server Runtime" window appears.
7.
Under "Select the type of runtime that you want to define:", expand Apache and select the runtime.
8.
Click Next. "Tomcat Server" window appears.
9.
Under "Tomcat installation directory", click Browse and select the Tomcat installation directory.
10.
Under JRE, click Installed JREs. "Installed JREs" window appears.
11.
Click Add, enter "JRE name", "JRE home directory " and click OK.
12.
In the "Installed JREs" window, select the JRE and click OK.
13.
Click Finish.
14.
Click Finish. "Open Associative Perspective?" dialog box appears.
15.
Click Yes, to change the perspective to J2EE.
A dynamic web project is created.
4.2.2.2 Adding Rebean jars to the project
1.
In the Package Explorer, right-click on the project, select Build Path and click Configure Build Path.
2010-11-1617
Setting up development environment
"Properties for Project" window appears.
2.
Select Java Build Path and click on Libraries tab.
3.
Click on Add External JARS. "Jar Selection" window appears.
4.
Navigate to <BOBJ_INST_DIR>\Tomcat55\webapps\AnalyticalReporting\WEB-INF\lib directory, select all the jars and click Open.
The Rebean jars gets added in the library.
5.
Click OK.
6.
In the project, under WebContent directory, expand the WEB-INF directory. Right-click on lib directory and click on Import.
"Import" window appears.
7.
Expand General, select File System and click Next.
8.
Click Browse, navigate to <BusinessObjectsHome>\Tomcat55\webapps\AnalyticalRe porting\WEB-INF\lib directory, select all the jars and click Finish.
The jars gets imported to WEB-INF\lib directory.
4.2.2.3 Creating and running a JSP page
1.
In the Project Explorer, right-click on the WebContent directory, select New and then click JSP. "New JavaServer Page" window appears.
2.
Enter the "File name" and click Finish. JSP file gets created under WebContent directory.
3.
Double-click on the JSP file and write the code in it.
4.
In the Project Explorer, right-click on the JSP file, select Run Apps and click Run On Server. "Run On Server" window appears.
5.
Move the project to the right to configure it on the server and click Finish. The JSP file will be executed and the result will be shown in a browser.
4.3 Logging with ReportEngine SDK Overview
There are number of ways to trace the ReportEngine SDK application including the Java package optimized for ReportEngine SDK.
This section describes how to use the various logging systems.
2010-11-1618
Setting up development environment
4.3.1 Logging Systems
The ReportEngine SDK provides logging systems.
4.3.1.1 Logging in the Java
In the Java programming environment you can use the following logging systems.
Jakarta log4j
The Jakarta log4j system is part of the Jakarta project.
For more information, see http://Jakarta.apache.org/log4j.
java.util.logging
The java package java.util.logging is the logging system provided with JDK1.4.1.
For more information, see http://java.sun.com/j2se/1.4.1/docs/guide/util/logging/index.html.
log4j.logger.com.businessobjects.rebean.ReportEngines
The <BOProductName>Interactive Analysis SDK package log4j.logger.com.businessobjects.rebean.ReportEngines allows you to integrate trace messages from your own application with those generated by the SAP BusinessObjects servers and <BOProductName>Interactive Analysis SDK.
The following sections describe the REBean logging in more details:
"Trace Levels"
"Activating logging by editing the configuration files"
"Activating logging by using the default settings"
"Activating logging while Tomcat is running"
4.3.1.1.1 Trace Levels
The following table shows the trace levels available through the above mentioned trace systems:
2010-11-1619
Setting up development environment
Provides messages onTrace Level
helper classes
DEBUG
calls from REBean to the report engine server
JHSAL activity
entry of each JSP
INFO
WARN
ERROR
calls to the methods exposed by REBean
potentially harmful situations
non-fatal exceptions
exceptions that stop the execution of applica-
FATAL
tion
4.3.1.1.2 Activating logging by editing the configuration files
To activate logging, you must edit the webi.properties file. When you change this file, you need to restart Tomcat for your changes to take effect.
To activate the logging system, add the following lines to the webi.properties configuration file:
Trace=1, LEVEL
Adapter=log4j.logger.com.businessobjects.rebean.ReportEngines.system
Where LEVEL can be one of: DEBUG, INFO, WARN, ERROR, or FATAL. This automatically selects the log4j logging system and sets the trace level to LEVEL. If there is no log4.properties file, log4.properties.todo is generated.
system is one of: Log4jLogger (log4j), or StandardLogger (debugdiag)
This activates logging, selects the system logging system, and sets the trace level to LEVEL. If there is no configuration file for the logging system a .todo file is generated.
4.3.1.1.3 Activating logging by using the default settings
To activate the logging system using the default settings:
1.
Add the following line to the webi.properties configuration file:
Trace=1
2.
Start, or restart Tomcat.
2010-11-1620
Setting up development environment
This activates logging, by default the log4j logging system is selected, and the trace level is set to INFO. If there is no log4j.properties file, log4j.properties.todo is generated.
4.3.1.1.4 Activating logging while Tomcat is running
To activate logging while Tomcat is running, put the following code in a file called traces.jsp and put the file in the same folder at the InfoView files. Then, to activate logging, open traces.jsp in a web browser and select the options (logging system, and trace level) you want.
The following is an example of the traces.jsp file:
Example: Activating logging while Tomcat is running
<%@ taglib uri="/WEB-INF/wilog.tld" prefix="log" %> <jsp:useBean id="systems" class="java.util.Hashtable" scope="application" /> <%
if (systems.isEmpty()) {
systems.put("fake", "log4j.logger.com.businessobjects.rebean.ReportEngines.FakeLogger"); systems.put("debugdiag",
"log4j.logger.com.businessobjects.rebean.ReportEngines.StandardLogger");
systems.put("log4j", "log4j.logger.com.businessobjects.rebean.ReportEngines.Log4jLogger");
} %> <html> <head><title><BOProductName>Interactive Analysis Logging System</title></head> <body> <%
String uri = request.getRequestURI();
String sys = request.getParameter("sys");
String level = request.getParameter("level");
String prop = request.getParameter("prop");
String adapter = request.getParameter("adapter");
if (sys == null)
{
out.println("<form method=\"POST\" action=\"" + uri + "\">"); out.println("<h4>Change the
<BOProductName>Interactive Analysis Logging System</h4>");
out.println("<input name=\"sys\" value=\"log4j\"
type=\"RADIO\" CHECKED/>Enable Log4J, "); out.println(" properties <input value=\"Choose\" name=\"prop\" type=\"FILE\" size=\"25\"/> ");
out.println("<br><input name=\"sys\"
value=\"debugdiag\" type=\"RADIO\"/>Enable Debugdiag "); out.println("<br><input name=\"sys\" value=\"fake\" type=\"RADIO\"/>Disable Any ");
out.println("<br><br>Level <input name=\"level\"
value=\"debug\" type=\"RADIO\"/>DEBUG "); out.println("<input name=\"level\" value=\"info\" type=\"RADIO\" CHECKED/>INFO ");
out.println("<input name=\"level\" value=\"warn\"
type=\"RADIO\"/>WARN ");
out.println("<input name=\"level\" value=\"error\"
type=\"RADIO\"/>ERROR ");
out.println("<input name=\"level\" value=\"fatal\"
type=\"RADIO\"/>FATAL ");
out.println("<br><br><input type=\"SUBMIT\"
SELECTED value=\"GO\" /><br><br>"); } else {
%> <log:reinit adapter="<%=(String)systems.get(sys) %>" level="<%=level %>" lib="" prop="<%=prop %>"/> <%
out.println("<h5><a href=\""+ uri +"\">
Back</a></h5>");
2010-11-1621
Setting up development environment
} %> </body> </html>
4.3.1.2 Configuring the Jakarta log4j logging system
The Jakarta log4j logging system uses a configuration file called log4j.properties. This file must be present in the classes directory of the web application, for example, webapps\wijsp\WEB-INF\classes. If the configuration file is not present log4j.properties.todo is created in the bin folder of the application server, however you should move this file to the classes directory for your web application (and remove the "todo" from the file name) so you can have one configuration file for each application.
This logging system is delivered with the SAP BusinessObjects platform. It is installed in $INSTALLDIR\classes. See also http://jakarta.apache.org/log4j/docs/index.html for further explanation of the configuration options for this tool.
The following sections describe the Jakarta log4j logging system in more details:
Setting the trace level
Setting the trace mechanism
Setting the trace output
Specifying the trace level for individual classes
4.3.1.2.1 Setting the trace level
You set the trace level in log4j.properties. The possible levels are DEBUG, INFO, WARN, ERROR, and FATAL.
The trace level setting in log4j.properties takes precedence over the trace level setting in webi.properties.
4.3.1.2.2 Setting the trace mechanism
You set the trace output mechanism in log4j.properties. Possible output mechanisms are: file, console (stdout), or a socket.
4.3.1.2.3 Setting the trace output
You can set the output format in log4j.properties. The following table shows the formatting tokens you can use.
2010-11-1622
Setting up development environment
Adds this to the traceThis token
date%d
thread%t
trace level%p
the name of the logger%c
time since the trace system was initialized%r
thread content, for example, the session ID%x
the message%m
4.3.1.2.4 Specifying the trace level for individual classes
You can specify the trace level for a package or a class.
For example, if the root trace level is DEBUG, but you do not want to see the trace for the REBean package, add the line log4j.logger.com.businessobjects.rebean.wi=WARN to log4j.properties.
Similarly, you can exclude the trace for the ReportEngine interface with log4j.logger.com.busi
nessobjects.rebean.wi.ReportEngine=WARN
log4j.properties
Example: log4j.properties
The following lists the contents of log4j.properties. In this example, the root trace level is set to DEBUG, and traces from the Report interface are excluded.
log4j.rootCategory=DEBUG, A1 # Console output log4j.appender.A1=org.apache.log4j.ConsoleAppender # File output #log4j.appender.A1=org.apache.log4j.FileAppender #log4j.appender.A1.File=infoview.log # Socket output #log4j.appender.A1=org.apache.log4j.net.SocketAppender #log4j.appender.A1.RemoteHost=bergame #log4j.appender.A1.Port=8887 # Format log4j.appender.A1.layout=org.apache.log4j.PatternLayout
2010-11-1623
Setting up development environment
log4j.appender.A1.layout.ConversionPattern= %-4r %-5p %c{10} (%x) - %m\n ## to filter REBean logging, uncomment #log4j.logger.com.businessobjects.rebean.wi=WARN #log4j.logger.com.businessobjects.rebean.wi.AxisType=WARN #log4j.logger.com.businessobjects.rebean.wi.BarType=WARN #log4j.logger.com.businessobjects.rebean.wi.HTMLView=WARN log4j.logger.com.businessobjects.rebean.wi.Report=WARN ## to filter REPORT ENGINE SERVLET, uncomment #log4j.logger.com.businessobjects.cdzlet=WARN ## to filter INFOVIEW JSP logging, uncomment #log4j.logger.scripts=WARN #log4j.logger.viewers=WARN
4.4 Configuring ReportEngine using webi.properties
You can configure individual ReportEngine SDK or viewer applications such as InfoView to improve their efficiency on application server on which they have been deployed. The purpose of this chapter is to tell you how to improve SAP BusinessObjects Enterprise application efficiency.
4.4.1 What is webi.properties?
Each ReportEngine web application can have a webi.properties file. For SAP BusinessObjects Enterprise applications this file is optional. The webi.properties file is located in the WEB-INF\classes subdirectory of the <BOProductName>AnalyticalReporting. For example, if you have deployed InfoView on a Tomcat application server the webi.properties file would be found in the following directory:
<TOMCAT_HOME>\webapps\AnalyticalReporting\WEB-INF\classes\webi.properties
4.4.2 How to update webi.properties
The webi.properties file is a plain text file containing variables used to tune the individual <BOProductName>Web Intelligence web application. The variables defined in the webi.properties file are taken in to account when your <BOProductName>Interactive Analysis server starts up. To change variable settings in webi.properties, Business Objects recommends that you do the following:
1.
Navigate to the classes subdirectory in your <BOProductName>Interactive Analysis web application, that is to say <MyWebIntelligenceApp>/WEB-INF/classes.
2.
Make a copy of the webi.properties file. This copy is to stay in the <MyWebIntelligenceApp>/WEB-INF/classes subdirectory as a backup.
2010-11-1624
Setting up development environment
3.
Copy webi.properties to a temporary directory.
4.
Edit webi.properties using text editor, set the value of the variables as required.
5.
Replace <MyWebIntelligenceApp>/WEB-INF/classes/webi.properties with your updated version.
6.
Restart the server. A comprehensive list of variables to update can be found in the next section.
4.4.3 Configuration Options
TEMP_DIR
The directory where temporary files generated by <BOProduct­Name>Interactive Analysis are stored.
Default ValueDescriptionVariable Name
same as the Java temporary directory
XML_TRANSFORMER
CHUNK_SIZE
FAILOVER_SIZE
MAX_HEAP_SIZE
Trace
The parser used for XML transla­tion.
The size of binary or character object sent between the client browser and the <BOProduct­Name>Interactive Analysis serv­er.
Control the maximum number of document states kept in memory.
Prevent the web application from consuming all the heap of the Java Virtual Machine.
Set the application to trace inter­nal <BOProductName>Interac­tive Analysis calls.
org.apache.xalan.proces sor.TransformerFactoryImpl
In bytes: 60000
In kilobytes: 60k
11
750m
Commented out.
Uncomment and set to 1 to ac­tivate.
2010-11-1625
Setting up development environment
STORAGE_TO KEN_STACK_SIZE
The following variables can be used to tune web applications:
Note:
For application servers running with the Java Virtual Machine 1.4 and above, runtime.maxMemory is used to set the MAX_MEMORY variable internally. This ensures that your <BOProductName>Interactive Analysis application does not consume the Java Virtual Machine heap.
Sets the limit of undo actions possible for DocumentInstance objects.
Set to 0 for no limit for file persis­tence and token are storage until memory reaches FAILOVER_SIZE.
Default ValueDescriptionVariable Name
11
In order to optimize resources on the Interactive Analysis server, the STORAGE_TOKEN_STACK_SIZE parameter is used to limit the size of the stack by limiting document serialization. For the end user, this means the number of undo actions that can be done.
The default value of STORAGE_TOKEN_STACK_SIZE is 10, the same as the FAILOVER_SIZE variable.
If STORAGE_TOKEN_STACK_SIZE =0, then there is no limit for file persistence and token are
stored into memory until reaching FAILOVER_SIZE. If failover happens, the maximum number of DocumentInstance objects in the storage manager will fail over to a backup application server.
If STORAGE_TOKEN_STACK_SIZE <= FAILOVER_SIZE, then there is no file persistence.
If STORAGE_TOKEN_STACK_SIZE > FAILOVER_SIZE up to (STORAGE_TOKEN_STACK_SIZE
minus FAILOVER_SIZE), instances are stored in file system.
The memory footprint for a document state that is higher than the value of STORAGE_TOKEN_STACK_SIZE in the stack is deleted. If a client tries to use an out of stack token to access a document state the ReportEngine will throw an exception. You can retrieve the stack size programmatically and validate storage tokens using:
int ReportEngine.getStorageTokenStackSize()
boolean ReportEngine.IsStorageTokenValide(String storageToken)
ReportEngine.StorageTokenStackSize{get}
boolean ReportEngine.IsStorageTokenValide(String storageToken)
2010-11-1626

Developing web application using ReportEngine SDK

Developing web application using ReportEngine SDK
This section describes the procedures to develop a custom web application using ReportEngine SDK.
5.1 Application Essentials
5.1.1 Overview
Before providing viewing, reporting, and editing functions, the ReportEngine SDK applications need to perform basic tasks, such as referencing the appropriate package and creating a BusinessObjects Enterprise session for the user.
This section covers the essential concepts and tasks, which all the applications that customize BusinessObjects Enterprise must use.
5.1.2 "Hello World"
The simplest application you can write with SAP BusinessObjects Enterprise SDK is the one that creates a SAP BusinessObjects Enterprise session which provides log in and log out functions.
This is the basis for building much more sophisticated applications that provide functions to list, view and create documents, and attach them to hierarchical categories.
2010-11-1627
Developing web application using ReportEngine SDK
This application gathers login details from the user, and sends the details to another page which uses SAP BusinessObjects Enterprise SDK to open a SAP BusinessObjects Enterprise session. If the session is successfully created, the application displays a "Hello World" message and the option to log out. When the user clicks the logout link, the application closes the user's SAP BusinessObjects Enterprise session with SAP BusinessObjects Enterprise SDK and displays the first page again.
Each page that uses SAP BusinessObjects Enterprise SDK must:
reference SAP BusinessObjects Enterprise SDK
create or reference an IEnterpriseSession object
create or reference an IInfoStore object
See "Implementing "Hello World"" for code that implements this application.
5.1.2.1 Referencing SAP BusinessObjects Enterprise SDK
Referencing SAP BusinessObjects Enterprise SDK gives your web application access to the SAP BusinessObjects Enterprise platform functions exposed by the SDK.
Note:
You must use SAP BusinessObjects Enterprise SDK prior to using ReportEngine SDK.
To develop a Java application SAP BusinessObjects recomments that you add all libraries found in the <BusinessObjectsHome>\Tomcat55\webapps\AnalyticalReporting\WEB-INF\lib into the WEB-INF\lib directory of your JSP project.
5.1.2.1.1 Referencing SAP BusinessObjects Enterprise SDK
To reference SAP BusinessObjects Enterprise SDK, import the SAP BusinessObjects Enterprise packages.
2010-11-1628
Developing web application using ReportEngine SDK
Example: Referencing SAP BusinessObjects Enterprise SDK
To import SAP BusinessObjects Enterprise SDK packages, add the following line to pages that use the packages.
<% page import="com.crystaldecisions.sdk.framework.*,
com.crystaldecisions.sdk.occa.infostore.*, com.crystaldecisions.sdk.occa.pluginmgr.*, com.crystaldecisions.sdk.plugin.*, com.crystaldecisions.sdk.plugin.desktop.server.*, com.crystaldecisions.sdk.occa.infostore.*, com.crystaldecisions.sdk.plugin.destination.smtp.*, com.crystaldecisions.sdk.plugin.destination.managed.*, com.crystaldecisions.sdk.exception.SDKException, com.crystaldecisions.sdk.occa.security.*, com.crystaldecisions.sdk.plugin.desktop.user.*, com.crystaldecisions.sdk.properties.*,
com.businessobjects.sdk.plugin.desktop.webintelligence.CeWebIntelligenceRightID"%>
You need to include this line in every page that uses SAP BusinessObjects Enterprise SDK.
5.1.2.2 Creating a new user session
In SAP BusinessObjects Enterprise SDK, the ISessionMgr allows user to log in to the SAP BusinessObjects Enterprise server and create a session. Session information is stored in the IEnter
priseSession object returned by logon method. Every session has a corresponding IEnterpris eSession object which is used to access the ReportEngine SDK.
5.1.2.2.1 Creating an ISessionMgr object
To create a user session for an application that uses SAP BusinessObjects Enterprise SDK, you must first instantiate a new ISessionMgr object.
Example: Instantiating the ISessionMgr class
ISessionMgr mySessionMgr = CrystalEnterprise.getSessionMgr();
5.1.3 SAP BusinessObjects Enterprise sessions
Every user of InfoView requires a SAP BusinessObjects Enterprise session for logging in and using the system. The SAP BusinessObjects Enterprise session represents the user's current interaction with SAP BusinessObjects Enterprise. A user's SAP BusinessObjects Enterprise session provides access to the user's details, and objects that are subject to the rights of the user, for example, the list of universes that the current user can use to create documents.
2010-11-1629
Developing web application using ReportEngine SDK
You must create a SAP BusinessObjects Enterprise session for the user which is a key part of the log in and authentication process.
To create a session for a user:
1.
Get the user's login information:
name
password
the Central Management System (CMS), that the user wants to log into
authentication type (Enterprise, LDAP, winAD)
2.
Establish a valid SAP BusinessObjects Enterprise session for the user.
5.1.3.1 Getting login information
The simplest way to get a user's login information is to use an HTML form in which the user enters the name, the password, the CMS, and the auth type. When the user submits the form, the values for the fields are passed through the query-string to a page that processes the values.
Example: HTML form for gathering a user's login information using Java
<FORM name="LoginForm" action="Login.jsp" method="POST">
<TABLE> <TR>
<TD>Name:</TD>
<TD><input type = "text" name="Name"></TD> </TR> <TR>
<TD>Password:</TD>
<TD><input type="password" name="Pass"></TD> </TR> <TR>
<TD>Central Management System:</TD>
<TD><input type = "text" name="CMS"></TD> </TR> <TR>
<TD>Authentication:</TD>
<TD>
<select name='auth'> <option value='secEnterprise'>Enterprise</option> <option value='secLDAP'>LDAP</option> <option value='secWinAD'>WinAD</option> </select>
</TD> </TR> <TR>
<TD><input id=submit1 name=submit1
type=submit value="Login"></TD>
</TR></TABLE>
</FORM>
When the user enters login information and clicks the Login button, the values of the fields are passed to Login.jsp in the query string parameters. The method attribute of the form is set to POST, and therefore these values will not be visible in the URL.
2010-11-1630
Loading...
+ 74 hidden pages