Report Engine Java Developer Guide

ulotrichousblueberryΛογισμικό & κατασκευή λογ/κού

3 Νοε 2013 (πριν από 3 χρόνια και 5 μήνες)

390 εμφανίσεις

Report Engine Java Developer Guide
BusinessObjects Enterprise XI R2
Windows and UNIX
Copyright If you find any problems with this documentation, please report them to Business Objects
S.A. in writing at documentation@businessobjects.com.
Copyright © Business Objects S.A. 2004. All rights reserved.
Trademarks Business Objects, the Business Objects logo, Crystal Reports, and Crystal Enterprise are
trademarks or registered trademarks of Business Objects SA or its affiliated companies in the
United States and other countries. All other names mentioned herein may be trademarks of
their respective owners.
Patents Business Objects owns the following U.S. patents, which may cover products that are offered
and sold by Business Objects: 5,555,403, 6,247,008 B1, 6,578,027 B2, 6,490,593 and
6,289,352.
Third-party
contributors
Business Objects products in this release may contain redistributions of software licensed
from third-party contributors. Some of these individual components may also be available
under alternative licenses. A partial listing of third-party contributors that have requested or
permitted acknowledgments, as well as required notices, can be found at:
http://www.businessobjects.com/thirdparty
Developing with Web Intelligence Report Engine SDK 3
Contents
Chapter 1
Introduction 7
Chapter 2
Introduction to ReportEngine

SDK 9
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Packages for customizing BusinessObjects Enterprise XI R2 . . . . . . . . . . 10
Migrating to
BusinessObjects XI R2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
A typical ReportEngine SDK application . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Installing ReportEngine SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Chapter 3
Application Essentials 15
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
“Hello World” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
BusinessObjects Enterprise sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Implementing “Hello World” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
User preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Exception handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Reporting essentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Chapter 4
Document Management 33
Document types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Document state: storage tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Organizing documents in categories and folders . . . . . . . . . . . . . . . . . . . . 38
Working with documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Document properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Chapter 5
Viewing Reports 59
Viewing reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Handling prompts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Displaying a report map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Developing with Web Intelligence Report Engine SDK 4
Chapter 6
Drilling in Web Intelligence Reports 77
Introduction to drilling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Drilling in reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Chapter 7
Building and Editing Data

Providers 89
Data providers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Building a data provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Executing queries and retrieving the data . . . . . . . . . . . . . . . . . . . . . . . . 100
Chapter 8
Formatting Reports 101
Creating and editing the document structure . . . . . . . . . . . . . . . . . . . . . . 102
Creating and editing cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Page layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Appendix A
Working with Recordsets 117
Anatomy of a recordset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Appendix B
Business Objects Information Resources 121
Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Customer support, consulting and training . . . . . . . . . . . . . . . . . . . . . . . . 123
Useful addresses at a glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Appendix C
Logging with ReportEngine SDK Overview 127
Logging Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Activating logging by editing the configuration files . . . . . . . . . . . . . . . . . 129
Appendix D
Configuring ReportEngine using webi.properties 135
Developing with Web Intelligence Report Engine SDK 5
Examples
Referencing BusinessObjects Enterprise SDK 17
Instantiating the ISessionMgr class 18
HTML form for gathering a user’s login information 19
Establishing a session 20
Printing a user’s preferences 26
Setting a user’s report panel preference to Java 27
Adding a new preference to a user’s profile 29
Referencing the ReportEngine SDK 30
Instantiating a ReportEngine an IReportEngine object 31
Instantiating a ReportEngine objects depending on file type 31
Storage token life cycle 36
how to check that a user has the right to create categories 40
Traversing the category tree recursively 41
Retrieve a user’s Inbox and Favorites folder IDs 43
Creating a new folder or category 44
Moving and renaming categories or folders 45
Retrieve the properties for a category 45
Displaying a document list 47
Save a document 48
Scheduling a document 49
Retrieve the list of groups to which a user belongs 51
Sending a document to folders and categories 52
Send a document to the inbox of groups of users 54
Getting the name of a document 56
Adding a property to a document 57
Viewing all the reports in a Web Intelligence document 61
Viewing a report in a Web Intelligence document 62
Viewing a report in Microsoft Excel format 63
Handling a single, simple prompt 64
Examples
6 Developing with Web Intelligence Report Engine SDK
Dynamically creating input names 66
Handling many, simple prompts 66
Displaying a simple list of values 68
Handling multivalued prompts 70
Handling multicolumn lists of values 70
Order of filling a hierarchy of nested prompts 72
Handling nested prompts 72
Refreshing a list of values containing nested prompts 73
Traversing the report map for a Web Intelligence document 74
Defining the query string parameters 82
Setting the drill path 84
Displaying the drilled report 86
Launching the Java Report Panel 94
Building a data provider 96
Creating a simple condition 98
Structure of a complex condition 99
Including a prompt in a condition 99
Creating a blank document 102
Creating a document structure 105
Creating an attachment 107
Editing the sections of a report 107
Building a report: adding expressions to axes 110
Accessing the values in a recordset 119
chapter
ReportEngine Developer Guide
Introduction
Introduction
About this guide
1
8 ReportEngine Developer Guide
About this guide
This guide describes the processes and procedures for creating web
applications using BusinessObjects Enterprise SDK and the ReportEngine
SDK package.
Who should read this guide
To use the BusinessObjects Enterprise SDK and ReportEngine SDKs you
need a working knowledge of the concepts of distributed computing systems,
HTTP server technology, and JSP development. You also need a basic
knowledge of the products in the BusinessObjects product line. Familiarity
with BusinessObjects Enterprise is assumed.
Business Objects information resources
For more information and assistance, see “Business Objects Information
Resources” on page 121. This appendix describes the Business Objects
documentation, customer support, training, and consulting services, with links
to online resources.
chapter
ReportEngine Developer Guide
Introduction to
ReportEngine

SDK
10 ReportEngine Developer Guide
Introduction to ReportEngine SDK
Overview
1
Overview
ReportEngine SDK consists of a number of Java packages. Typically, every
application that uses these packages must implement the same kinds of
workflows.
This chapter briefly introduces ReportEngine SDK and the workflows a typical
application needs to implement.
Packages for customizing BusinessObjects
Enterprise XI R2
There are two packages for customizing BusinessObjects Enterprise:

BusinessObjects Enterprise SDK
The "platform package," provides platform functions of the Business
Objects servers, and document scheduling.

ReportEngine SDK
This package plugs into Business Objects Enterprise SDK. It
provides the functions of the Web Intelligence and Desktop
Intelligence Report Engines.
BusinessObjects Enterprise SDK is called the platform package because it
exposes the platform functions of the Business Objects servers. ReportEngine
SDK exposes the functions of the Desktop Intelligence and Web Intelligence
Report Engines.
Web Intelligence documents
Metadata (universe)
View
Refresh
Analyze
Explore

Create

Format

ReportEngine SDK
Crystal Enterprise Documents
View
Refresh
Analyze
BusinessObjects Enterprise SDK
Platform functions
Manage sessions and users
Manage documents and categories
List universes and folders
Schedule documents
Desktop Intelligence documents
View
Refresh
Analyze


Web Intelligence Documents for REBean Only
ReportEngine Developer Guide 11
Introduction to ReportEngine SDK
Migrating to BusinessObjects XI R2
1
Migrating to BusinessObjects XI R2
If you already have a business intelligence solution based on previous
versions of ReportEngine SDK you might need to migrate your solution.
Migration affects the following areas:

referencing components of the BusinessObjects Enterprise platform

controlling user sessions

listing and navigating through folders and categories

managing and viewing documents

handling security commands

using the various dictionaries

deploying your application
For more information on migration issues see the Migrating Business Objects
Customized Applications to BusinessObjects XI R2 guide.
A typical ReportEngine SDK application
Not all applications that use ReportEngine SDK have the same features, but
all typically provide features for listing and viewing documents contained in the
BusinessObjects Enterprise Central Management System (CMS). A more
sophisticated application could also include features such as document
creation and report formatting.
Application essentials
Every application that uses ReportEngine SDK needs to perform common
tasks such as importing the appropriate packages, and creating and managing
the user’s BusinessObjects Enterprise session (login).
Every application should also take user profiles into account and ensure that
errors are handled properly. See “User rights for categories and folders” on
page 39 and “User preferences” on page 24.
Document management
Document management features include the ability to list the documents that
the current user can view, and, depending on the user’s rights, allowing the
user to browse and manage categories and folders used to organize the
documents.
Document management can also include features such as saving, and
scheduling documents.
12 ReportEngine Developer Guide
Introduction to ReportEngine SDK
A typical ReportEngine SDK application
1
Viewing reports
An application that provides for viewing documents can display them using the
default DHTML format. It is easy to extend this to handle documents that
contain prompts, and to provide drilling functions. These extended functions
have to be handled when a document is refreshed.
How you provide 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:

Web Intelligence (*.wid)

Crystal Reports documents

Desktop Intelligence (*.rep)

other document types, for example Adobe
®
Acrobat
®
, Microsoft
®
Excel
or XML format.
See “Viewing reports” on page 60 for a full listing of available formats.
Creating documents: building and editing data providers
To give users the ability to create documents and generate their own reports,
you need to provide them with tools to build and edit data providers.
A data provider encapsulates information about an information source and the
query that defines the information retrieved. Creating a document essentially
means creating a data provider. You can use the same classes to provide
different features for editing a query, such as adding conditions and changing
the scope of analysis.
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.
ReportEngine Developer Guide 13
Introduction to ReportEngine SDK
A typical ReportEngine SDK application
1
Open document workflow
The following diagram shows the workflow for opening a document.
Refresh document workflow
The following diagram shows the workflow for refreshing a document.
open a document
check for prompts
fill prompts until there are none left unfilled
get the report map
get the report in the requested format
fill document
toolbar
Client
pages
fill report
map
fill rendering
area
Report Engine
SDK
<open document workflow>
check for prompts
fill prompts until there are none left unfilled
get the report map
get the report in the requested format
set the position
refresh the report
refresh
fill document
toolbar
fill report
map
fill rendering
area
update
document
toolbar
Client
pages
Report Engine
SDK
14 ReportEngine Developer Guide
Introduction to ReportEngine SDK
Installing ReportEngine SDK
1
Installing ReportEngine SDK
Installing Business Objects components
ReportEngine SDK components are added to the development machine
when BusinessObjects Enterprise XI R2 is installed on the system. To
develop a custom ReportEngine SDK application it is necessary to connect to
a running BusinessObjects Enterprise server, however, the development
environment does not have to be on the same machine as the
BusinessObjects Enterprise Server. Install ReportEngine SDK components
on a development machine by:
1.Run BusinessObjects Enterprise XI R2 installer.
2.Click Next on the BusinessObjects Enterprise XI R2 Installation Wizard
panel.
3.Select the I accept the License Agreement button in the License
Agreement panel.
4.Click Next.
5.Select the Perform Server Installation
6.Click Next.
7.Enter your corporate information and keycode.
8.Click Next.
9.Specify the destination folder in the Destination folder text box.
10.Click Next.
11.Select the Custom button
12.Click Next.
13.Deselect all BusinessObjects Enterprise Features.
14.Enable the SDK products feature.
To install J2EE components only, deselect the SDK products feature and
install the Java features sub-component.
15.Click Next.
16.Click Next.
This installs all components necessary to develop custom Business Objects
applications; Java libraries are installed and registered correctly.
chapter
ReportEngine Developer Guide
Application Essentials
16 ReportEngine Developer Guide
Application Essentials
Overview
2
Overview
Before providing viewing, reporting, and editing functions ReportEngine SDK
applications need to perform basic tasks, such as referencing the appropriate
package and creating a BusinessObjects Enterprise session for the user.
This chapter covers the essential concepts and tasks that all applications that
customize BusinessObjects Enterprise must use.
“Hello World”
The simplest application you can write with BusinessObjects Enterprise SDK
is one that creates a BusinessObjects Enterprise session, that is, provides log
in and log out functions.
This is the basis for building much more sophisticated applications that
provide, for example, functions to list, view and create documents, and attach
them to hierarchical categories.
Table 2-1 Application for logging in and out of BusinessObjects Enterprise
This application gathers login details from the user, and sends the details to
another page which uses BusinessObjects Enterprise SDK to try to open a
BusinessObjects Enterprise session. If the session is successfully created, the
application displays a “Hello World” message and the option to log out. When
open a
session
get name and
password
from user
display “Hello
World” and a
logout link
close session
Name = “janderson”
Pass = “*******”
ReportEngine Developer Guide 17
Application Essentials
“Hello World”
2
the user clicks the logout link, the application closes the user’s
BusinessObjects Enterprise session with BusinessObjects Enterprise SDK
and displays the first page again.
Each page that uses BusinessObjects Enterprise SDK must:

reference BusinessObjects Enterprise SDK

create or reference an
IEnterpriseSession
object

create or reference an
IInfoStore
object
See “Implementing “Hello World”” on page 21 for code that implements this
application.
Referencing BusinessObjects Enterprise SDK
Referencing BusinessObjects Enterprise SDK gives your web application
access to the BusinessObjects Enterprise platform functions exposed by the
SDK.
Note: You must use BusinessObjects Enterprise SDK prior to using
ReportEngine SDK.
To develop a Java application Business Objects recomments that you add all
libraries found in the <BusinessObjectsHome>\common\3.5\java\lib into the
WEB-INF\lib directory of your JSP project.
Referencing BusinessObjects Enterprise SDK
To reference BusinessObjects Enterprise SDK, import the BusinessObjects
Enterprise packages.
Example: Referencing BusinessObjects Enterprise SDK
To import 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.CeWeb
IntelligenceRightID"%>
18 ReportEngine Developer Guide
Application Essentials
BusinessObjects Enterprise sessions
2
You need to include this line in every page that uses BusinessObjects
Enterprise SDK.
Creating an new user session
In BusinessObjects Enterprise SDK the
ISessionMgr
lets a user to log in to
the BusinessObjects Enterprise server and create a session. Session
information is stored in the
IEnterpriseSession
object returned by this
method. Every session has a corresponding
IEnterpriseSession
object
which is used to access ReportEngine SDK.
Creating an ISessionMgr object
To create a user session for an application that uses BusinessObjects
Enterprise SDK, you must first instantiate a new
ISessionMgr
object.
Example: Instantiating the ISessionMgr class
ISessionMgr mySessionMgr =
CrystalEnterprise.getSessionMgr();
BusinessObjects Enterprise sessions
Every user of InfoView requires a BusinessObjects Enterprise session before
entering and using the system. The BusinessObjects Enterprise session
represents the user’s current interaction with BusinessObjects Enterprise. A
user’s 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.
You must create a BusinessObjects Enterprise session for the user: it is the
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) the user wishes to log into

authentication type (Enterprise, LDAP, winAD)
2.Establish a valid BusinessObjects Enterprise session for the user.
ReportEngine Developer Guide 19
Application Essentials
BusinessObjects Enterprise sessions
2
Getting login information
The simplest way to get a user’s login information is to use an HTML form into
which the user enters a name and a password. When the user submits the
form, the values for the fields are passed via the query string to a page that
processes the values.
Example: HTML form for gathering a user’s login information
<FORM name="LoginForm" action="Login.jsp" method="POST">
<TABLE><TR>
<TD>Name:</TD>
<TD><input name="Name"></TD>
</TR>
<TR>
<TD>Password:</TD>
<TD><input type="password" name="pass"></TD>
</TR>
<TR>
<TD>Central Management System:</TD>
<TD><input name="CMS"></TD>
</TR>
<TR>
<TD>Authentication:</TD>
<TD>
<select name='auth'>
<option value='secEnterprise'>Enterprise</option>
<option value='secLDAP'>LDAP</option>
<option value='secLDAP'>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
for the fields are passed to Login.jsp in the query string parameters Name and
Pass. Since the method attribute of the form is set to POST, these values will
not be visible in the URL.
Authentication
The way you monitor passwords depends on how BusinessObjects Enterprise
passwords have been set up by the BusinessObjects Enterprise system
administrator.
There are two settings available to the system administrator which you can use
as the basis for the login procedure in your own application:
20 ReportEngine Developer Guide
Application Essentials
BusinessObjects Enterprise sessions
2

Enterprise Mode
This mode requires from the user to submit a user name and password
which are unique to BusinessObjects Enterprise (and may be different
from their network name/password combination).

LDAP Mode
This mode requires the user to submit a user name and password which
are stored on a corporate LDAP server.

WinAD Mode
This mode requires the user to submit a user name and password which
are stored on a Windows Authentication Server.
For more information on authentication in Windows, see the BusinessObjects
Enterprise XI R2 Administrator’s Guide.
Establishing a valid BusinessObjects Enterprise user’s session
To establish a valid BusinessObjects Enterprise user’s session:
1.Try to create an
IEnterpriseSession
object for the user.
2.If the
IEnterpriseSession
object is valid, store this object in the user’s
session attributes.
3.Create an
IInfoStore
object and store in the user’s session attributes.
These steps are usually done together and are normally followed by
redirecting the user to an appropriate page: a welcome page or back to the
login page, depending on the validity of the session.
Example: Establishing a session
The following code fragment illustrates how to establish a BusinessObjects
Enterprise session.
ISessionMgr mySessionMgr =
CrystalEnterprise.getSessionMgr();
IEnterpriseSession eSession;
try {
eSession = mySessionMgr.logon(name, password, CMS, auth);
if (eSession != null){
session.setAttribute("EnterpriseSession",
enterpriseSession);
IInfoStore iStore = (IInfoStore)
enterpriseSession.getService("InfoStore");
session.setAttribute("InfoStore", iStore);
} catch (SDKException sdkEx){
;
}
ReportEngine Developer Guide 21
Application Essentials
Implementing “Hello World”
2
Retrieving a BusinessObjects Enterprise session
Once you have established a valid BusinessObjects Enterprise session for the
user, you can retrieve it from the user’s session attributes.
Closing a BusinessObjects Enterprise session
To close a session, that is, log a user out of BusinessObjects Enterprise, use
IEnterpriseSession.logoff
.
Closing a session is important:

It frees the resources held by the user’s BusinessObjects Enterprise
session.

It forces other users to start their own sessions rather than just taking
over an existing session.
Note: See “logout.jsp” on page 24 for an example of how to close a
BusinessObjects Enterprise session.
BusinessObjects Enterprise session time-out
The time-out of a Business Objects Enterprise SDK Session is the life time of
the IEnterpriseSession object; the session is destroyed when the object is
destroyed.
Business Objects recommends that you store the users IEnterpriseSession
object in the application server session objects, in this way the user session
have the exact same time out as the Application server session.
Implementing “Hello World”
Following is an implementation of the Hello World application discussed on
page 16. To run this application you need to have installed BusinessObjects
Enterprise and established a Business Objects Central Management System.
For more information, see the Installation and Configuration Guide for
Windows or UNIX.
22 ReportEngine Developer Guide
Application Essentials
Implementing “Hello World”
2
In this implementation index.jsp displays a form which collects the user’s login
information which is passed to login.jsp. Login.jsp attempts to create a session
and
IInfoObject
for the user. If the operation is successful, login.jsp
redirects to home.html which displays the “Hello World” message and a link to
logout.jsp. When the user clicks the logout link, logout.jsp closes the session
and displays index.jsp again.
index.jsp
<html>
<body>
<h1>Create a BusinessObjects Enterprise Session</h1>
<form name="LoginForm" action="login.jsp" method="POST">
<table><tr>
<td>Name: </td>
<td><input name="Name"></td>
</tr>
<tr>
<td>Password: </td>
<td><input type="password" name="Pass"></td>
</tr>
<TR>
<TD>Crystal Management System:</TD>
<TD><input name="CMS"></TD>
</TR>
<TR>
<TD>Authentication:</TD>
<TD>
<select name='auth'>
<option value='secEnterprise'>Enterprise</
option>
<option value='secLDAP'>LDAP</option>
</select>
</TD>
Name = “janderson”
Pass = “********”
index.jsp login.jsp
logout.jsp
home.html
ReportEngine Developer Guide 23
Application Essentials
Implementing “Hello World”
2
</TR>
<tr>
<td><input id=s1 name=s1 type=submit value="Login"></
td>
</tr></table>
</form>
</body>
</html>
login.jsp
This page is opened when the user clicks Login in the form LoginForm
described on page 19. The user name and password used for the login are
passed from the HTML form in the query string parameters Name and Pass.
<%@ page
import="com.crystaldecisions.sdk.framework.CrystalEnterp
rise" %>
<%@ page
import="com.crystaldecisions.sdk.framework.IEnterpriseSe
ssion" %>
<%@ page
import="com.crystaldecisions.sdk.framework.ISessionMgr"
%>
<%@ page
import="com.crystaldecisions.sdk.exception.SDKException"
%>
<%
String CMS = request.getParameter("cms");
String userID = request.getParameter("user");
String password = request.getParameter("password");
String
auth = request.getParameter("auth");
if ( CMS == null) CMS = "";
if ( userID == null) userID = "";
if ( password == null) password = "";
if ( auth == null) auth = "";
IEnterpriseSession enterpriseSession;
try
{
ISessionMgr mySessionMgr =
CrystalEnterprise.getSessionMgr();
enterpriseSession =
mySessionMgr.logon(userID, password, CMS,auth);
if (enterpriseSession != null)
{//Create and store useful objects for the session.
session.setAttribute("EnterpriseSession",
enterpriseSession);
IInfoStore iStore = (IInfoStore)
enterpriseSession.getService("InfoStore");
session.setAttribute("InfoStore", iStore);
response.sendRedirect("home.html");
}
else response.sendRedirect("index.jsp");
24 ReportEngine Developer Guide
Application Essentials
User preferences
2
}
catch( SDKException mySDKExept)
{
response.sendRedirect("index.jsp");
}
%>
home.html
<html>
<body>
<h1>Create a Web Intelligence Session: Home Page</h1>
<p>Hello World!</p>
<a href="logout.jsp">Log out</a>
</body>
</html>
logout.jsp
<%@ page
import="com.crystaldecisions.sdk.framework.IEnterpriseSe
ssion" %>
<%
IEnterpriseSession enterpriseSession;
enterpriseSession =(IEnterpriseSession)
session.getAttribute("EnterpriseSession");
session.removeAttribute("EnterpriseSession");
if(enterpriseSession != null)
{
enterpriseSession.logoff();
enterpriseSession = null;
}
%>
User preferences
Users can set their InfoView and ReportEngine viewing options using the
Preferences page in InfoView or BusinessObjects Enterprise SDK.
When designing a ReportEngine SDK application you should take this into
account. For example, if the user wants to use the Java version of the Report
Panel for creating and editing documents, then you need to design your
application so that it can display the Java Report Panel rather than the DHTML
Report Panel.
ReportEngine Developer Guide 25
Application Essentials
User preferences
2
Accessing InfoView user preferences
With BusinessObjects Enterprise SDK you can get, set and add new
preferences in a user’s profile. Standard preferences and possible settings
are:
BusinessObjects Enterprise user preference variables, values and meaning.
Variable Name
Possible
Values
Meaning
webi_view P View documents in PDF
format.
I View Documents in
Interactive format.
H View Documents in
DHTML format.
(default)
webi_panel java Create documents
using the Java Report
Panel.
(default)
html Create documents
using the HTML Report
Panel.
DOCUMENT_WIStartNewDrill duplicate Start the drill action in a
duplicate report.
existing Start the Drill action in
the current report.
(default)
DOCUMENT_WIPromptDrillOutScope N Prompt if drill requires
additional data.
(default)
Y Do not prompt if Drill
requires additional data.
DOCUMENT_WISyncDrillBlocks N Synchronize Drill on
report blocks.
(default)
Y Do not Synchronize Drill
on report blocks.
26 ReportEngine Developer Guide
Application Essentials
User preferences
2
Note: other applications may have their own user settings which are stored
in the user profile. For more information see “Adding custom options to a
user’s profile” on page 28.
Getting a user’s InfoView preferences
To read the value of a user’s option:
1.Get the current user’s
IUser
object using an
IInfoStore
query.
2.Get the "desktopsettings" profile string.
3.Convert the profile string to a Map for easy manipulation and printing.
Example: Printing a user’s preferences
The following code functions show how to retrieve a user’s BusinessObjects
Enterprise preferences and print them to an HTML response stream.
<%!
//Return a string containing a user’s Web Intelligence
Preferences
String getWebiPrefs(IInfoStore iStore, int uId){
String prefs = "";
String sQuery = "SELECT SI_ID, SI_NAME, SI_DATA FROM”
+ “ CI_SYSTEMOBJECTS WHERE SI_ID = '"
+ uId + "'";
IInfoObjects users = null;
try{
users = iStore.query(sQuery);
if (users.size() > 0){
IUser user = (IUser)users.iterator().next();
prefs = user.getProfileString("desktopsettings");
}
}catch(SDKException sEx){
return ““;
}
return prefs;
}
//Convert a String of preferences to a Map
Map webiPrefsToMap(String prefs){
StringTokenizer st = new StringTokenizer (prefs, "&");
Map webiPrefs = null;
while (st.hasMoreTokens()) {
String s2 = st.nextToken();
StringTokenizer st2 = new StringTokenizer (s2, "=");
if (st2.countTokens() == 2)
DOCUMENT_WIDrillBar N Show the Drill bar.
Y Hide the Drill bar.
(default)
Variable Name
Possible
Values
Meaning
ReportEngine Developer Guide 27
Application Essentials
User preferences
2
webiPrefs.put(st2.nextToken(), st2.nextToken());
}
return webiPrefs;
}
%>
The following code fragment shows how to use the functions declared above
to print a user’s BusinessObjects Enterprise preferences to an HTML stream.
<%
int userID = myIEnterpriseSession.getUserInfo().getUserID();
PrintWriter myWriter = response.getWriter();
String prefs = getWebiPrefs(myIInfoStore, userID);
Map prefsMap = webiPrefsToMap(prefs);
if (prefsMap != null){
Iterator itr = prefsMap.entrySet().iterator();
while(itr.hasNext()) {
Map.Entry current = (Map.Entry)itr.next();
myWriter.print (
current.getKey()
+ "="
+ current.getValue() + "<br>");
}
}
%>
Setting an option in a user profile
To set an option:
1.Get a user’s preferences.
2.Update a standard option in the Map continuing the user preferences.
3.Convert the Map to a String.
4.Update the user profile with
IInfoStore.commit
.
Example: Setting a user’s report panel preference to Java
The following code functions enables a user’s profile to be updated to use the
Java Report Panel.
<%!
//Update the user’s Web Intelligence preferences.
void setWebiPrefs(IInfoStore iStore, String prefs, int uId)
{
String sQuery = "SELECT SI_ID, SI_NAME, SI_DATA FROM
CI_SYSTEMOBJECTS WHERE SI_ID = '"
+ uId + "'";
IInfoObjects users = null;
try{
users = iStore.query(sQuery);
if (users.size() > 0){
28 ReportEngine Developer Guide
Application Essentials
User preferences
2
IUser user = (IUser)users.iterator().next();
user.setProfileString("desktopsettings", prefs);
iStore.commit(users);
}
}catch(SDKException sEx){
;
}
}
//Convert a preferences Map to a string
String webiPrefsToSting(Map wPrefs){
StringBuffer sbWebiPrefs = new StringBuffer();
Iterator itr = wPrefs.entrySet().iterator();
while(itr.hasNext()) {
Map.Entry current = (Map.Entry)itr.next();
if(sbWebiPrefs.length() != 0)
sbWebiPrefs.append("&");
sbWebiPrefs.append(current.getKey());
sbWebiPrefs.append("=");
sbWebiPrefs.append(current.getValue());
}
return sbWebiPrefs.toString();
}
%>
The following code fragment shows how to use the functions declared above
to update a user’s Web Intelligence preferences.
<%
//Update a user’s Web Intelligence preferences
int userID = myIEnterpriseSession.getUserInfo().getUserID();
String prefs = getWebiPrefs(myIInfoStore, userID);
Map prefsMap = webiPrefsToMap(prefs);
prefsMap.put( "webi_panel", "java");
setWebiPrefs(iStore, webiPrefsToSting(prefsMap), userID);
%>
Note: The functions getWebiPrefs and webiPrefsToMap are declared in the
example “Printing a user’s preferences” on page 26
Adding custom options to a user’s profile
To add custom options to a user’s profile:
1.Get a user’s preferences.
2.Set the custom option with Map.put.
When you set an option that does not exist in the user profile, Map.put
creates a new option and sets it to the value you specify.
3.Convert the Map to a String.
ReportEngine Developer Guide 29
Application Essentials
Exception handling
2
4.Update the user profile with
IInfoStore.commit
.
Example: Adding a new preference to a user’s profile
The following code fragment sets a custom preference.
<%
//Add a custom Web Intelligence preference using functions
defined in the previous examples
int userID = myIEnterpriseSession.getUserInfo().getUserID();
String prefs = getWebiPrefs(myIInfoStore, userID);
Map prefsMap = webiPrefsToMap(prefs);
prefsMap.put( "MyPreference", "tea");
setWebiPrefs(iStore, webiPrefsToSting(prefsMap), userID);
%>
Note: The functions getWebiPrefs and webiPrefsToMap are declared in the
example “Printing a user’s preferences” on page 26.
Exception handling
BusinessObjects Enterprise SDK generates exceptions of the type
REException
.
Depending on the cause of the exception, ReportEngine SDK generates
exceptions of the following type:

CommunicationException

ConfigurationException

CustomSortException

DSObjectSynchroException

FilterConditionException

NotImplementedException
Exceptions and their descriptions are listed in the online reference
documentation.
Note: All exception classes (above) are subclasses of the
REException

class, Business Objects recommends using the
REException.getCode

when testing code.
Note: You can return localized error messages message by calling
REException.getLocalizedMessage.
30 ReportEngine Developer Guide
Application Essentials
Reporting essentials
2
Reporting essentials
All applications that view, edit or format Web Intelligence and Desktop
Intelligence documents need to:

reference ReportEngine SDK

retrieve the
ReportEngines
service

retrieve the
ReportEngine
instance
This links the
ReportEngine
and platform packages.

close the
ReportEngines
object
Note: You use Report Engine SDK to:

View, refresh, fill prompt, drill, edit query and format Web Intelligence
documents.

View refresh, fill prompt Desktop Intelligence documents.
Referencing ReportEngine SDK
Referencing the ReportEngine packages gives your web application access to
the ReportEngine SDK functions.
ReportEngine SDK allows users to work with both Web Intelligence and
Desktop Intelligence documents. Use the ReportEngines factory object to
retrieve the ReportEngine instance necessary to open the document type
required.
If the web application uses J2EE it must reference REBean.
Example: Referencing the ReportEngine SDK
To import the REBean package, add the following line to JSP pages that use
REBean.
<%@ page import= "com.businessobjects.rebean.wi.*" %>
You need to include this line in every JSP page that uses REBean classes.
Creating a ReportEngine object
To create a
ReportEngine
object for an application that uses ReportEngine
SDK, retrieve the
ReportEngines
object from the user’s
IEnterpriseSession
. Using the
ReportEngines
object you can retrieve a
ReportEngine
instance to open either Web Intelligence or Desktop
Intelligence documents.
ReportEngine Developer Guide 31
Application Essentials
Reporting essentials
2
Once instantiated, manipulation of a
ReportEngine
instance is essentially the
same, regardless of whether the current user has opened a Web Intelligence
or Desktop Intelligence document. This eliminates the need for repeated
conditional statements to check the document type and allows simpler, more
streamlined code to be written.
Example: Instantiating a ReportEngine an IReportEngine object
To instantiate the
ReportEngine
object, add the following lines to one page
of the web application that uses the reporting features of the ReportEngine
SDK.
ISessionMgr mySessionMgr =
CrystalEnterprise.getSessionMgr();
enterpriseSession =
mySessionMgr.logon(userID, password, CMS,auth);
if (enterpriseSession != null)
{
ILogonTokenMgr iLManager =
enterpriseSession.getLogonTokenMgr() ;
ReportEngines repEngines = (ReportEngines)
enterpriseSession.getService("ReportEngines");
ReportEngine widocRepEngine =
(ReportEngine)repEngines.getService(
ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
session.setAttribute("widReportEngine", widocRepEngine);
}
Use the “kind” attribute of a document IInfoObject to see if a Web Intelligence
or Desktop Intelligence ReportEngine needs to be opened.
Example: Instantiating a ReportEngine objects depending on file type
String strQuery = "Select SI_KIND from CI_INFOOBJECTS”
+ “where SI_ID=" + strDocId;
IInfoObjects iDocObjects = iStore.Query(strQuery);
IInfoObject iDocObject = null;
try
{
iDocObject = (InfoObject) iDocObjects[0];
}
catch
{
...
}
String strKind = iDocObject.Kind;
ReportEngine reportEngine = null;
if(strKind.Equals("Webi"))
{
reportEngine = reportEngines.getService(
ReportEngineType.WI_ReportEngine);
}
else
{
reportEngine = reportEngines.getService(
32 ReportEngine Developer Guide
Application Essentials
Reporting essentials
2
ReportEngineType.FC_ReportEngine);
}
Closing a ReportEngines object
Just as you need to close a BusinessObjects Enterprise session, you should
also close a
ReportEngines
when you have finished with it. To close a report
engine object use
ReportEngines.close()
. This method deallocates the
memory assigned to the object and should be called before you call
IEnterpriseSession.logoff()
.
chapter
ReportEngine Developer Guide
Document Management
34 ReportEngine Developer Guide
Document Management
Overview
3
Overview
Two key parts of a typical ReportEngine SDK application are listing the
documents that the user can view, and depending on the user’s rights, allowing
the user to browse and manage categories and folders used to organize the
documents.
This chapter explains how to open, list, and work with documents.
Document types
With BusinessObjects Enterprise SDK you can work with:

Web Intelligence documents

Desktop Intelligence documents

Crystal Reports documents

third-party documents, for example Microsoft Excel (.xls), and Adobe
Acrobat (.pdf) files
Using ReportEngine SDK you can do everything Web Intelligence users can
do with Web Intelligence documents:

view as DHTML

view as PDF

view as Excel

view as XML

refresh

create

categorize

delete

drill

save

schedule

send
ReportEngine Developer Guide 35
Document Management
Document state: storage tokens
3
Document state: storage tokens
Storage tokens represent a state of a document at a particular stage, each
time a document is edited, for example refreshed, the document state
changes. Storage tokens are used to:

Retrieve the document state from page to page.

Simulate an undo action in a customized application.
Storage token life cycle
ReportEngine SDK generates a storage token:

when you open a document

when the microcube contents are modified or formatted
When you open a document, ReportEngine SDK creates a
DocumentInstance
object that has a storage token. ReportEngine SDK also
creates a temporary state that contain information about the document’s
current state.
A storage token is self descriptive with regards to the type of
ReportEngine

required to open the associated document. This means that you do not need
to check the document type before opening. For information on how to control
storage token, see “Configuring ReportEngine using webi.properties” on
page 135.
As the document changes state through the execution of JSP files, the storage
token changes too, and more temporary states, representing the document’s
states, are created.
StorageToken = r0
Temporary files
r0
open doc
Executing file
doc object
view1
36 ReportEngine Developer Guide
Document Management
Document state: storage tokens
3
You can retrieve the maximum storage stack size, that is to say, the maximum
number of storage tokens that can be created as a document changes state
programmatically and validate that a storage token is valid by calling
ReportEngine.getStorageTokenStackSize()
or
ReportEngine.IsStorageTokenValid.
ReportEngine SDK generates a new storage token and corresponding set of
temporary files at the following triggers:
Note: Setting a password and filling in a prompt does not cause a new token
to be generated directly. However, a new storage token is generated when
you commit the change using
DocumentInstance.getView
.
Example: Storage token life cycle
The following diagram shows how storage tokens change according to triggers
in the user interface and the object model. It also shows how the storage
tokens are passed between web pages and refer file states stored in memory
that can be used to reconstruct the DocumentInstance object using the call
ReportEngine.getDocumentFromStoratagetoken
. In the diagram below,
this call name is shortened to “get doc”.
Using the storage token as an identifier for a document state, you can restore
the document to any of its saved states.
User interface Triggers
SDK Triggers
refreshing the document calling

DocumentInstance.getView
drilling modifying the DrillPath
object
creating and editing a document calling DataProvider.getResult
applying new formats calling DataProvider.runQuery
IDataProvider.RunQuery
running a query opening a document
ReportEngine Developer Guide 37
Document Management
Document state: storage tokens
3
e.
GIF
GIF
GIF
GIF
GIF
StorageToken = r0
r0-s0
StorageToken = r0-s0
StorageToken = r0-s1
StorageToken = r0-s2
StorageToken = r0-s3
view1
view2
view3
Temporary files
r0-s0
r0
r0-s1
r0-s2
r0-s3
open docInstance
run query
get doc(r0-s0)
drill
get doc(r0-s1)
drill
commit change
Executing files
docInstance object
r0-s1
1
2
3
38 ReportEngine Developer Guide
Document Management
Organizing documents in categories and folders
3
Table 3-1 Storage token life cycle
Advantages of storage tokens
Performance
Using a storage token is to refer to document states is fast and optimized for
memory usage.
Lifetime
A storage token in the file system lasts as long as the ReportEngines object
used to create
ReportEngine
instances. Business Objects recommended
that you store a ReportEngines object in the session object once it is created
and retrieve it again as required for document storage tokens to be valid
throughout an application.
Browser navigation back and forward
After progressing through several document states, users can go back and
forwards in their browser to a previous document state and continue working
from that state.
Undo mechanism
You can build an undo mechanism by passing the storage token from the
previous action perform on the document to the next web page.
Organizing documents in categories and
folders
In InfoView, categories and folders are used to classify documents in the
central management system. Documents organized in the hierarchical
category and folder structures are easier for users to find; A user can save a
document to selected categories and folders. A document can be assigned to
one or more public or personal categories.
ReportEngine Developer Guide 39
Document Management
Organizing documents in categories and folders
3
Table 3-2 Categorized documents.
Using the BusinessObjects Enterprise query mechanism you can navigate a
category or folder hierarchy and retrieve
IInfoObjects
containing the
individual categories and folders. These in turn enable you to:

create, rename and delete categories and folders

get the details of a categories and folders
User rights for categories and folders
A System administrator, using BusinessObjects Enterprise Central
Management Console, can set how much control a user or group has over
categories and folders. User rights settings are updated in the Advanced
Rights page of the InfoView section for BusinessObjects Enterprise
Applications of the Central Management Console.
The following table lists an InfoView user’s possible rights.
Folder and category-related settings in a Web Intelligence user’s rights
InfoView Advanced Right
Variable Name
User can change preferences
CeInfoViewRightID.PREFERENCE
User can move and copy
objects, create shortcuts and
add object to the favorites
folder.
CeInfoViewRightID.ORGANIZE
Can use InfoView simple
search
CeInfoViewRightID.SIMPLESEARCH
Can use InfoView advanced
search
CeInfoViewRightID.ADVANCEDSEARCH
40 ReportEngine Developer Guide
Document Management
Organizing documents in categories and folders
3
A list of a user’s rights over an object in the
IInfoStore
can be recovered by
retrieving the user’s
ISecurityInfo
object for a certain BusinessObjects
Enterprise application.
Example: how to check that a user has the right to create categories
This code fragment shows how to validate a user has the right to create
categories.
<%
IInfoStore iStore =
(IInfoStore)session.getAttribute("InfoStore");
IInfoObject infoView = null;
String query = "SELECT STATIC FROM CI_APPOBJECTS,”
+ “ CI_SYSTEMOBJECTS WHERE”
+ “ (SI_PARENTID = 99 AND SI_KIND=\'"
+ CeKind.INFOVIEW + "\')";
try{
IInfoObjects appObjects = iStore.query( query);
if (appObjects.size() > 0)
infoView = (IInfoObject )appObjects.get(0);
if (infoView != null){
ISecurityInfo secInfo =
infoView.getSecurityInfo();
if (secInfo.checkCustomRight(
CeInfoViewRightID.CREATECATEGORIES,
infoView.getKind()))
{
...
}
}
Can use InfoView filter feature
CeInfoViewRightID.FILTER
User has a favorites folder
CeInfoViewRightID.FAVORITES
User can view inbox contents
CeInfoViewRightID.VIEWINBOX
User can create categories
CeInfoViewRightID.CREATECATEGORIES
User can assign categories to
users or groups
CeInfoViewRightID.ASSIGNCATEGORIES
User can send documents to
users and groups
CeInfoViewRightID.SENDDOCUMENTS
User can create dashboards
CeInfoViewRightID.CREATEDASHBOARDS
User can create folders
CeInfoViewRightID.CREATEFOLDERS
InfoView Advanced Right
Variable Name
ReportEngine Developer Guide 41
Document Management
Organizing documents in categories and folders
3
}catch (Exception exc){
...
}
%>
Note: Before trying to manage categories, check that the user who started
the session has the appropriate rights.
Note: A list of a rights for other BusinessObjects Enterprise applications can
be found by changing the
CeKind
being searched for. For example, to search
for a user’s Web Intelligence rights the query string would include
CeKind.WEBINTELLIGENCE
in the place of
CeKind.INFOVIEW
.
Navigating categories and folders
Categories and folders in a Central Management System are represented as
a tree. Personal and Public are root nodes for categories. Home is the root
node for folders.
To access the category or folder trees, query the repository to retrieve the ID
of the parent node for categories or folders. Use this ID to navigate the child
nodes.
Example: Traversing the category tree recursively
The following example shows functions that use BusinessObjects Enterprise
SDK to recover the ID of the parent folder for a user’s personal categories.
Using this ID a bulleted list containing the hierarchical structure of the user’s
personal categories is generated.
<%! //Return the ID of a specific folder
public int getFolderParentId(IInfoStore iStore, int userID,
String kind){
int FolderID = 0;
IInfoObjects folders = null;
String query = "SELECT SI_PARENTID FROM CI_INFOOBJECTS”
+ “ WHERE SI_KIND='" + kind + "'"
+ “ AND SI_OWNERID=" + userID;
try{
folders = iStore.query(query);
if(folders.size() > 0)
FolderID=
((IInfoObject)folders.get(0)).getParentID();
}catch (SDKException sdke){
return FolderID;}
return FolderID;
}
//Return a selectable list of categories or folders
String getCategoryList(IInfoStore iStore,
int id, String kind ){
String results = "";
IInfoObject category;
if (id == -1) id = 0;
String sQuery = "SELECT SI_ID, SI_NAME, SI_PARENTID FROM”
42 ReportEngine Developer Guide
Document Management
Organizing documents in categories and folders
3
+ “ CI_INFOOBJECTS WHERE SI_PARENTID=" + id
+ " AND SI_KIND= \'"+ kind + "\'" ;
try{
IInfoObjects categories = iStore.query(sQuery);
if (!categories.isEmpty()){
results += "<ul>";
for(int i = 0; i < categories.size(); i++){
category = (IInfoObject)categories.get(i);
String name = category.getTitle();
int catID = category.getID() ;
results += "<li><input type=\"radio\" name=\""
+ kind + "\" value=\""
+ catID + "\" >" + name + "</li>\n";
results += getCategoryList(iStore,
category.getID(), kind);
}
results += "</ul>";
}
}catch (SDKException sdke){
results = null;
}
return results;
}
%>
The following code fragment shows how to use the functions declared above
to print personal categories for a user.
<%
IEnterpriseSession enterpriseSession =(IEnterpriseSession)
session.getAttribute("EnterpriseSession");
IInfoStore iStore=
(IInfoStore)session.getAttribute("InfoStore");
int userID = enterpriseSession.getUserInfo().getUserID();
int persoCatsfolderID = getFolderParentId(
iStore,userID,(String)CeKind.PERSONALCAT);
String catButtons =
getCategoryList(
iStore, (String)CeKind.PERSONALCAT));
%>
Note: For an example of how to list documents in a folder, see “Displaying a
document list” on page 47.
Retrieving Inbox and favorites folder IDs
Each BusinessObjects Enterprise user has unique personal directories. The
Inbox and Favorites directories contain documents sent to a specific user or
saved for personal rather than corporate use. To list the contents of these
folders you need to retrieve the ID for each user’s personal directories. Once
the root directory ID is retrieved, you can list and navigate the contents in the
same way corporate folders are navigated.
ReportEngine Developer Guide 43
Document Management
Organizing documents in categories and folders
3
Example: Retrieve a user’s Inbox and Favorites folder IDs
The following example shows functions that use BusinessObjects Enterprise
SDK to recover the ID of the parent folder for a user’s Inbox and Favorites
folders.
<%!
//Retrieve the ID for any type of personal folder
public int getFolderId(IInfoStore iStore, int userID,
String kind){
int FolderID = 0;
IInfoObjects folders = null;
String query = "SELECT SI_ID" +
" FROM CI_INFOOBJECTS" +
" WHERE SI_KIND='" + kind + "'" +
" AND SI_OWNERID=" + userID;
try{
folders = iStore.query(query);
if(folders.size() > 0)
FolderID = ((IInfoObject)folders.get(0)).getID();
}catch(SDKException sdke){
FolderID = -1;
}
return FolderID;
}
//Retrieve the ID of a user’s Inbox
int getInboxFolderId(IInfoStore iStore, int userID){
return getFolderId(iStore,userID,(String)CeKind.INBOX);
}
//Retrieve the ID of a user’s favorites folder
int getFavoritesPFolderID(IInfoStore iStore, int userID){
return
getFolderId(iStore,userID,(String)CeKind.FAVORITESF);
}
%>
//The following example shows how to retrieve a list of
documents in the current user’s Inbox. See
“Displaying a
document list”
on page 47 for the definition of getList.
<%
IEnterpriseSession enterpriseSession;
IInfoObjects docList = null;
enterpriseSession = (IEnterpriseSession)
session.getAttribute("EnterpriseSession");
IInfoStore iStore = (IInfoStore)
session.getAttribute("InfoStore");
int userID = enterpriseSession.getUserInfo().getUserID();
int inboxID = getInboxFolderId(iStore, userID);
docList =
getList(iStore, inboxID, (String)CeKind.WEBI );
%>
44 ReportEngine Developer Guide
Document Management
Organizing documents in categories and folders
3
Note: See “Displaying a document list” on page 47 for the definition of
getList.
Creating categories and folders
You can add categories and folders by:

getting the ID of the folder or category in which you wish to create a node

getting the correct plug-in to create a node

committing the new object to the Central Management System
Example: Creating a new folder or category
The following example shows functions that use BusinessObjects Enterprise
SDK to create a new folder or category.
<%!
int addFolderOrCategory(IInfoStore iStore,
int parentFolderID,String name,
String description, String type){
int objectID = 0;
IPluginInfo plugin;
try{
IPluginMgr pluginMgr = iStore.getPluginMgr();
plugin = pluginMgr.getPluginInfo(type);
IInfoObjects newInfoObjects =
iStore.newInfoObjectCollection();
newInfoObjects.add(plugin);
IInfoObject infoObject = (IInfoObject)
newInfoObjects.get(0);
infoObject.setTitle (name);
infoObject.setDescription (description);
objectID = infoObject.getID();
infoObject.properties().setProperty(
CePropertyID.SI_PARENTID, parentFolderID);
iStore.commit (newInfoObjects);
}catch (SDKException e) {
throw new Error("Failed to add the object.");
}
return objectID;
}
%>
The following code fragment shows how to use the functions declared above
to create a new personal category and a new folder.
<%//How to use this function
//Create a new personal category
addFolderOrCategory(iStore, categoryParentID,
"Category Name", "Keywords",CeKind.PERSONALCAT);
//Create a new personal folder
addFolderOrCategory(iStore, categoryParentID,
"Folder Name", "Keywords", CeKind.FOLDERS);%>
ReportEngine Developer Guide 45
Document Management
Organizing documents in categories and folders
3
Moving and renaming categories and folders
You can move categories and folders from one parent to another using the
IInfoObject.setParentID
method. You can rename categories and
folders using the
IInfoObject.setTitle
method
.
After the category or folder has been renamed or moved,

IInfoStore.commit
must be called with the changed IInfoObject passed as
a parameter.
Example: Moving and renaming categories or folders
The following function changes the name of a folder or category and moves it
in the folder or category hierarchy respectively.
<%!
String changeNameMove(IInfoStore iStore, int ID, String
newName, int newParentID){
String query;
IInfoObjects result;
String res = "";
query = "Select SI_NAME, SI_ID From CI_INFOOBJECTS “
+ “ Where SI_ID=" + ID;
try{
result = iStore.query(query);
if ( result.size() > 0 ){
IInfoObject currResult;
currResult = (IInfoObject)result.get(0);
currResult.setTitle(newName);
currResult.setParentID(newParentID);
iStore.commit(result);
}
}
catch(SDKException e){
;
}
return res;
}
Getting the properties of a category
Each
IInfoObject
in the BusinessObjects Enterprise IInfoStore contains a
collection of all properties assigned to that object, known as a “properties bag.”
To retrieve
IInfoObject
details, request
SI_NAME
,
SI_DESCRIPTION
,
SI_KEYWORD
in the query string used to recuperate the
IInfoObject

representing a category or folder.
Example: Retrieve the properties for a category
The following method returns the properties of a category, folder, or document
as an
IInfoObject
:
<%!
IInfoObject getProps(IInfoStore iStore, int ID){
46 ReportEngine Developer Guide
Document Management
Working with documents
3
String query;
IInfoObjects result = null;
IInfoObject properties = null;
String res = "";
query = "SELECT SI_FILES, SI_DESCRIPTION,”
+ ” SI_KEYWORD, SI_KIND";
query += " FROM CI_INFOOBJECTS WHERE SI_ID=" + ID;
try{
result = iStore.query(query);
if (result.size() > 0){
properties = (IInfoObject)result.get(0);
}
}
catch(SDKException e){
return null;
}
return properties;
}
%>
The following code fragment shows how to use the functions declared above
to print the description and keywords of an
IInfoObject
object to an HTTP
stream.
<%
int ID = Integer.parseInt(request.getParameter("ID"));
PrintWriter myWriter = response.getWriter();
IInfoStore iStore = (IInfoStore)
session.getAttribute("InfoStore");
IInfoObject fProperties = getProps(iStore, ID);
myWriter.print( fProperties.getDescription() + "<br>\n");
myWriter.print( fProperties.getKeyword() + "<br>\n");
//Another way to retrieve the keyword IInfoObject Property
myWriter.print(
fProperties.properties().getProperty(
CePropertyID.SI_KEYWORD).getValue().toString());
%>
Working with documents
Working with documents involves opening and listing the documents, then
providing facilities for saving, sending, scheduling, and organizing documents.
Opening documents
After establishing a session for a user (see “Establishing a valid
BusinessObjects Enterprise user’s session” on page 20) you can open a
document on behalf of the user.
In general, to open a document you:
ReportEngine Developer Guide 47
Document Management
Working with documents
3
1.Establish a BusinessObjects Enterprise session for the user.
2.Get an identifier for the document.
The identifier can be a storage token (see “Document state: storage
tokens” on page 35), or more simply the document’s ID.
3.Retrieve the
ReportEngine
instance relating to the type of document to
be opened.
4.Open the document using the
ReportEngine.openDocument
method
for Web Intelligence or Desktop Intelligence documents. See
“Instantiating a ReportEngine objects depending on file type” on page 31
for an example of how this is done.
Taking into account user rights and profiles
Because your Web Intelligence application acts on behalf of a user, what your
application can do with the document is subject to the user’s rights. They are
set in the BusinessObjects Enterprise Central Management Console. You
should take these rights into account in your application.
You should also take into account the settings in the user’s profile. See “User
preferences” on page 24.
Displaying document lists
To display a list of documents you:
1.Use the
IInfoStore.query
method to return the list of
IInfoObjectss
representing the root directory of the user’s folders and documents.
2.Loop through the
IInfoObject
list and print the values of the fields of
each row.
3.Allow navigation through the folders.
Note:
IInfoObject
is the base BusinessObjects Enterprise type. An
IInfoObject
can be used to store any type of object in the central
management system.
Refreshing a document list
A document list is refreshed every time
IInfoStore.query
is called. The
results come directly from the BusinessObjects Enterprise Central
Management System (CMS) with no intermediary cache.
Example: Displaying a document list
The following code fragment is a helper function called
getList
. This function
is passed an
IInfoObject
object as a parameter, which is then used to return
a list of
IInfoObject
objects of a required type, in this case Folders or Web
Intelligence documents.
48 ReportEngine Developer Guide
Document Management
Working with documents
3
This function is placed either at the head of the listfolders.jsp script or in a file
containing helper functions included in listfolders.jsp.
<%!
IInfoObjects getList(IInfoStore iStore,
int searchID, String kind){
IInfoObjects list = null;
String query = "SELECT SI_ID, SI_NAME, SI_PARENTID,”
+ “ SI_KIND, SI_INSTANCE, SI_DESCRIPTION FROM”
+ “ CI_INFOOBJECTS WHERE SI_PARENTID="
+ searchID + " AND SI_KIND = '" + kind + "'";
try{
list = iStore.query(query);
}
catch (SDKException sdke){
list = null;
}
return list;
}
%>
The function
getInfoList
is called from listfolders.jsp. The following code
fragment shows returns a list of Web Intelligence documents in the document
root folder.
<%
int iID= 0; //ID of the root folder
IInfoObjects webiDocs = null;
String searchID=request.getParameter("sID");
if (searchID!=null) iID=Integer.parseInt(searchID);
IInfoStore iStore =
(IInfoStore)session.getAttribute("InfoStore");
webiDocs=getList(iStore,iID,(String)CeKind.WEBI);
...
%>
Saving documents
To save a document use
DocumentInstance.save
and
DocumentInstance.saveAs
.
Example: Save a document
The following example shows how to open a document to be worked on, then
open and save the original version of the document.
<%
DocumentInstance doc =
myReportEngine.openDocument(docID);
String docToken doc.getStorageToken();
//User perform actions on document doc...
//Open the first version of the document and save.
DocumentInstance docToSave =
ReportEngine Developer Guide 49
Document Management
Working with documents
3
theReportEngines.getDocumentFromStorageToken(docToken);
docToSave.save();
%>
Note: Go to “Sending documents to users, groups and categories” on
page 50 to see how to use the saveAs method.
Scheduling documents
Scheduling refreshes a document automatically at a specified time or times.
When a scheduled document refreshes successfully, an instance is created.
An instance is a version of the document containing data available at the time
it is refreshed. Instances created later contain more recent data. By scheduling
and viewing instances, a user can have the latest information available for
viewing, printing, and distributing. For example, you can schedule a document
to run every night so data viewed first thing in the morning is sure to be up to
date.
To schedule a document you need to:
1.Query the
IInfoStore
to get the
IInfoObject
representing the
specific document.
2.Get the document’s
ISchedulingInfo
object.
3.Set the type and frequency of the scheduling.
4.Use the
IInfoStore
to schedule the document.
Note: The schedule action refreshes data in a document. This means that
Prompt, Context, and Drill actions have to be handled automatically at run
time using information gathered from the user when the schedule action is
created.
Example: Scheduling a document
The following function shows how to schedule a document to run once
immediately or recurrently on a specific interval of days. The document
instance created is stored in the list of document instances attached to a
document.
<%!
boolean scheduleDocument(IInfoStore iStore, int documentID,
int days){
IInfoObjects documentList;
ISchedulingInfo schedulingInfo;
IInfoObject document;
String res = "";
boolean success = true;
50 ReportEngine Developer Guide
Document Management
Working with documents
3
try {
String schedQuery = "Select SI_schedulingInfo From”
+ “ CI_INFOOBJECTS Where SI_ID="
+ documentID;
documentList = iStore.query( schedQuery);
if ( documentList.size() > 0 ){
document= (IInfoObject) documentList.get(0);
schedulingInfo = document.getSchedulingInfo();
if (days == -1){
schedulingInfo.setType(CeScheduleType.ONCE);
schedulingInfo.setRightNow(true);
} else {
schedulingInfo.setIntervalDays(days);
schedulingInfo.setType(
CeScheduleType.DAILY );
}
iStore.schedule(documentList);
}
} catch( SDKException e ) {
success = false ;
}
return success;
}
%>
The following code fragment shows how to call the scheduleDocument
function to schedule a document to be run once immediately.
<%
String docId = request.getParameter("docID");
IInfoStore iStore =
(IInfoStore)session.getAttribute("InfoStore");
scheduleDocument(iStore, Integer.parseInt(docId), -1);
%>
Sending documents to users, groups and categories
The list of BusinessObjects Enterprise users to whom a document can be sent
depends on the groups to which the current user belongs, and the current
user’s permissions.
ReportEngine Developer Guide 51
Document Management
Working with documents
3
Example: Retrieve the list of groups to which a user belongs
The following JSP function shows how to retrieve the list of groups the current
user belongs to.
<%!
IInfoObjects getUserGroups(IInfoStore iStore)
{
IInfoObjects groups = null;
String query = "SELECT SI_ID, SI_NAME" +
" FROM CI_SYSTEMOBJECTS" +
" WHERE SI_KIND='" + CeKind.USERGROUP + "'" ;
try{
groups = iStore.query(query);
} catch (SDKException sdke){
groups = null;
}
return groups;
}
%>
BusinessObjects Enterprise uses object security, which means that security is
set for each object in the system and not for each user. Thus, for a particular
object, certain users and certain groups have the rights to different actions,
depending on the object’s settings. Access to folders and categories can be
restricted to specific groups and individual users. Saving a document to a
specific folder and category is a way of publishing a document to a group of
users.
These permissions are controlled by the system administrator using
BusinessObjects Enterprise Central Management Console.
Procedure for sending a document to folders and categories
BusinessObjects Enterprise documents are organized by folder and category.
Action
To these groups and/or
users …
Depending on the current
user’s settings for these
permissions…
Save to Groups
and Categories
groups and categories to
which the current user
has access
DocumentInstance.saveAs
Send to Inbox,
FTP, email,
groups.
groups to which the
current user belongs,
and/or the other users in
those groups
IInfoStore.schedule
52 ReportEngine Developer Guide
Document Management
Working with documents
3
To send a document to folders use
DocumentInstance.saveAs
. Typically,
however, to send a document, you need to gather the appropriate information
from the current user before sending. To do this you need two web pages:
In the first page:
1.Display the name of the document to be sent.
2.Retrieve the IDs of:

corporate folders and categories

the root directory of the current user's personal categories
3.Get and display the list of folders and categories to which the current user
can send documents.
4.Pass this information to the second page.
Then, in the second page:
1.Get the details entered by the user.
2.Call
DocumentInstance.saveAs
.
Example: Sending a document to folders and categories
The following code fragments are used to save a document in specific
folders and categories. saveDocAs.jsp is called by a page that passes the
name and ID of the document in the query string. In saveDocAs.jsp the user
selects the folders and categories the document is to be saved in. When the
user clicks “Save Document” in the form, saveDocAs.jsp is executed and the
document is sent according to the user’s selections.
Note: The function getCatOrFoldersRadioButtons and webiPrefsToMap is
declared in the example “Traversing the category tree recursively” on
page 41.
<%!
//Return the ID of a specific folder
public int getFolderParentId(IInfoStore iStore, int userID,
String kind){
int FolderID = 0;
IInfoObjects folders = null;
String query = "SELECT SI_PARENTID FROM “
+ “ CI_INFOOBJECTS WHERE SI_Kind='"
+ kind + "'" + AND SI_OWNERID=" + userID;
try{
folders = iStore.query(query);
if(folders.size() > 0)
FolderID=((IInfoObject)folders.get(0)).getParentID();
}catch (SDKException sdke){
return FolderID;}
return FolderID;
}
%>
ReportEngine Developer Guide 53
Document Management
Working with documents
3
The following code fragment shows how to use the functions declared above
to create a form used to select the folders and categories in which a document
will be saved.
In saveDoc.jsp
<%
//get the parameters from the request object
String docId = request.getParameter("docID");
String docName = request.getParameter("docName");
String docParentFolderID =
request.getParameter("corpFolder");
String corpCategID = request.getParameter("corpCategory");
String persoCatedID = request.getParameter("persoCategory");
List ccIDlist = new ArrayList();
List pcIDlist = new ArrayList();
//Validate the parameters
if (corpCategID != null)
ccIDlist.add(Integer.decode(corpCategID));
if (persoCatedID != null)
pcIDlist.add(Integer.decode(persoCatedID));
if (docId != null && docParentFolderID != null){
//Open and save the document
DocumentInstance docToSave =
webiRepEngine.openDocument(Integer.parseInt(docId));
if( docToSave != null)
docToSave.saveAs( docName,
Integer.parseInt(docParentFolderID),
ccIDlist,pcIDlist);
}
%>
Note: corpCategories and persoCategories are strings containing the ID’s of
the corportate and personal category chosen by the active user to store the
document in.
Sending a document to the Inbox of users or groups
If the current user has the appropriate permissions, you can schedule a
document to be send to the inboxes of users or groups of users to which the
current user belongs.
Procedure for sending a document to inboxes
To schedule a document, you need to gather the appropriate information from
the current user before sending. To do this you need to:
1.Query the
IInfoStore
to get the
IInfoObject
representing the
document to be sent.
2.Get the document’s
ISchedulingInfo
object.
3.Retrieve the
Inbox
plugin used to send a document to users.
4.Set the destination and send options for the Inbox plugin.
54 ReportEngine Developer Guide
Document Management
Working with documents
3
5.Create a Set containing the IDs of users or groups to which the current
user can send the document.
6.Allow the user to choose the users/groups to send the document to.
7.Add the set of IDs created in the previous step to the Inbox plugin
options.
8.Set the type and frequency of the scheduling.
9.Schedule the document.
Note: In the InfoView user interface, this action is called “Send to
BusinessObjects Inbox.”
You get the list of groups to which the current user can publish documents by
querying the
IInfoStore
. The returned
IInfoObjects
object contains the
ID’s of all groups the current user has the right to send to.
Example: Send a document to the inbox of groups of users
<%!
//This function retrieves the Inbox destination plugin
IDestinationPlugin getInboxDestPlugin(IInfoStore iStore){
int PLUGIN_ROOT = 29;
IDestinationPlugin inboxPlugin = null;
String[] pluginsToLoad = new String[]
{CeKind.DISKUNMANAGED, CeKind.SMTP, CeKind.FTP,
Kind.MANAGED_DEST};
String pluginString = "";
for (int i = pluginsToLoad.length - 1; i >= 0; i--){
pluginString += "'" + pluginsToLoad[i] + "'";
if (i != 0) pluginString += ", ";
}
String pluginQuery = "SELECT * FROM CI_SYSTEMOBJECTS”
+ “ WHERE SI_PARENTID=” + PLUGIN_ROOT
+ “ AND SI_NAME in "
+ "(" + pluginString + ")";
try{
IInfoObjects destPlugins = iStore.query(pluginQuery);
for (int i = 0; i < destPlugins.size(); i++){
IInfoObject plugin =
(IInfoObject)destPlugins.get(i);
if (
CeKind.MANAGED_DEST.equals(plugin.getTitle()) )
inboxPlugin = (IDestinationPlugin)(plugin);
}
} catch (SDKException e){
inboxPlugin = null;
}
return inboxPlugin;
}
//This function retrieves the IDs of the groups the current
//user can schedule to
Set getUserGroupIDs(IInfoStore iStore){
IInfoObjects groups = null;
ReportEngine Developer Guide 55
Document Management
Working with documents
3
Set IDs = new Set();
String query = "SELECT SI_ID, SI_KIND, SI_NAME"
+ " FROM CI_SYSTEMOBJECTS"
+ " WHERE SI_Kind='" + CeKind.USERGROUP + "'";
try{
groups = iStore.query(query);
int size = groups.size();
for (int i = 0; i < size; i++) {
IInfoObject obj = (IInfoObject)groups.get(i);
if (CeKind.USERGROUP.equals(obj.getKind())) {
IDs.add(new Integer(obj.getID()));
}
}
} catch (SDKException sdke){
IDs = null;
}
return IDs;
}
%>
The following code fragment shows how to send the copy of a document to the
inbox of all users in the groups the current user is allowed to post to once a
week.
<%
String docId = request.getParameter("docID");
IInfoStore iStore =
(IInfoStore)session.getAttribute("InfoStore");
IDestinationPlugin inboxPlugin = null;
IManagedOptions destOptions = null;
ISchedulingInfo schedulingInfo = null;
IInfoObjects documentList = null;
IInfoObject document = null;
try {
String docQuery = "Select SI_schedulingInfo FROM”
+ “ CI_INFOOBJECTS Where SI_ID=" + docId;
documentList = iStore.query(docQuery);
if ( documentList.size() > 0 ) {
document= (IInfoObject)documentList.get(0);
schedulingInfo = document.getSchedulingInfo();
inboxPlugin = getInboxDestPlugin(iStore);
IDestination destination =
schedulingInfo.getDestination();
if (inboxPlugin != null){
destOptions =(IManagedOptions)
inboxPlugin.getScheduleOptions();
destOptions.setDestinationOption(
IManagedOptions.CeDestinationOption.ceInbox);
destOptions.setSendOption(
IManagedOptions.CeManagedSendOption.ceCopy);
Set IDs = getUserGroupIDs(iStore);
Set destinationIDs =
destOptions.getDestinations();
destinationIDs.clear();
destinationIDs.addAll(IDs);
56 ReportEngine Developer Guide
Document Management
Document properties
3
destination.setFromPlugin(inboxPlugin);
schedulingInfo.setIntervalDays(7);
schedulingInfo.setType(CeScheduleType.DAILY);
iStore.schedule(documentList);
}
}
} catch( SDKException e ) {
throw e;
}
%>
Document properties
Some important characteristics of Web Intelligence and Desktop Intelligence
documents are stored as part of the document. You can access these
properties using the
DocumentInstance
object.
ForReportEngine SDK the process for accessing a property of a Web
Intelligence document is:
1.Get the collection of properties.
2.Set/Read the property.
3.Commit the change, if any, to the collection of properties.
Working with properties
Using ReportEngine SDK, you can access a document’s properties with
DocumentInstance.getProperties
and
DocumentInstance.setProperties
. These methods make use of the
java.util.Properties
class.
There are predefined properties defined in
PropertiesType
. You can also
add you own properties to the document.
To avoid confusion in the central management system,
PropertiesType.NAME
is read only.
Example: Getting the name of a document
The following code fragment illustrates how to get the NAME property of a Web
Intelligence document.
DocumentInstance doc =
myReportEngine.openDocument(docID);
java.util.Properties props = doc.getProperties ();
String dName = props.getProperty (PropertiesType.NAME);
ReportEngine Developer Guide 57
Document Management
Document properties
3
Adding your own properties to the document
Use
Properties.setProperty
to add your own properties to the document.
Example: Adding a property to a document
The following code fragment illustrates how to add the RefreshCount property
to a Web Intelligence document.
DocumentInstance doc =
myReportEngine.openDocument(docID);
java.util.Properties props = doc.getProperties ();
props.setProperty ("RefreshCount", "12");
doc.setProperties (props);
If you create a new
Properties
collection and add properties to that
collection, when you call
DocumentInstance.setProperties
the values in
the new object are added to the standard property collection. Permanent
properties such as NAME and AUTHOR are not erased in the merge. Values
for the properties that you have set in the new collection take precedence over
those in the one attached to the
DocumentInstance
.
58 ReportEngine Developer Guide
Document Management
Document properties
3
chapter
ReportEngine Developer Guide
Viewing Reports
60 ReportEngine Developer Guide
Viewing Reports
Overview
4
Overview
Web Intelligence Report Engine SDK contains classes and methods for
viewing documents. Applications for viewing Web Intelligence and Desktop
Intelligence documents handle prompts, and provide report and section
navigation using the
ReportMap
.
This chapter discusses how to use Report Engine SDKto view Web
Intelligence and Desktop Intelligence reports.
See also and “Formatting Reports” on page 101.
Viewing reports
You can view complete documents, that is to say, including all reports or
individual reports or report pages in a variety of different formats. The following
tables show the different formats available
Desktop Intelligence Documents
Web Intelligence Documents
To view an entire document, call
DocumentInstance.getView,
to view an
individual report, call
Report.getView
. If you want to view all the reports in a
document in DHTML format, you need to get views of each report in DHTML
BINARY
CONTENT
EXCEL
DataCentric
EXCEL
PDF
CSV
XML
DHTML
HTML
DOCUMENT Y Y Y
REPORT Y Y Y Y Y
REPORT_PAGE Y Y Y
DATA_PROVIDERS Y
DATA_PROVIDER Y Y
BINARY
CONTENT
EXCEL
DataCentric
EXCEL
PDF
CSV
XML
DHTML
HTML
DOCUMENT Y Y Y Y
REPORT Y Y Y Y Y Y
REPORT_PAGE Y Y
DATA_PROVIDERS Y
DATA_PROVIDER Y Y
ReportEngine Developer Guide 61
Viewing Reports
Viewing reports
4
and display those separately. See “Viewing an individual report in DHTML” on
page 62. More information can be found in the API doc for the
SupportedViews
interface.
Note: Calling
DocumentInstance.getView
and
Report.getView

generates a new storage token. For more information on storage tokens see
“Document state: storage tokens” on page 35.
Viewing all the reports in a document
To view all the reports in a document:
1.Open the document.
2.Get a binary view of the document.
You can get a binary view of a document in PDF or Microsoft Excel
format. When ReportEngine SDK converts the document into PDF it
places reports on separate pages and creates a bookmark for each
report. In Microsoft Excel format the reports of a Web Intelligence
document appear on separate sheets.
3.Output the binary view of the document via the implicit response object.
You need to prepare the response object to receive the appropriate content
type. For Adobe Acrobat format set the content type to “application/pdf”. For
Microsoft Excel format, set the content type to “application/vnd.ms-excel”.
Example: Viewing all the reports in a Web Intelligence document
The following code fragment displays all the reports in a document in Adobe
Acrobat format. In this example, the name of the document is stored in
docName and the ID is stored in docID. Typically these would be passed
to the script in the query string.
<%
// get the document
String strDocID = request.getParameter("DocID");