Accessing the Java SDK

The Crystal Enterprise Java SDK consists of a set of Java classes packaged up in a set of .jar files. These .jar files can be found in the following directory:

Program FilesCommon FilesCrystal Decisions2.5jar

For more information on Java, p. 655

Most Java application servers have the following folder structure for Web applications:






To make the classes contained in these .jar files available for use, copy them to the lib folder.

The documentation (JavaDocs) for the SDK can be found at the following location:

Program FilesCrystal DecisionsEnterprise 10Web ContentHelpsdkhtmljava_docs.zip

The naming convention for the Java SDK is almost exactly the same as the COM SDK, which makes it easy to understand for those developers working on multiple development platforms. The exception to the naming is that rather than dealing with Java objects directly, interfaces are exposed. These interfaces begin with the letter I, such as IEnterpriseSession, IInfoStore, and so on.

In Java, all classes are organized into namespaces. The namespace for the Crystal Enterprise Java SDK classes all begin with com.crystaldecisions.sdk. There are more granular namespaces beneath that. For example, the ISessionMgr and IEnterpriseSession classes are contained in the com.crystaldecisions.sdk.framework namespace. For a list of all namespaces and the classes contained in them, consult the JavaDocs.

Listing 34.15 is a JSP version of the previously provided report viewing page.

Listing 34.15. Viewing a Report in a Java Server Page

<%@ page import="com.crystaldecisions.sdk.framework.*" %>


// Log on to CE

ISessionMgr sessMgr = CrystalEnterprise.getSessionMgr();

IEnterpriseSession sess = sessMgr.logon("Ryan", "123", "CMS1", "secEnterprise");

// Get the name of the report from the query string

String reportID = request.getParameter("reportID");

// Retrieve the report source object given the ID IReportSourceFactory factory =


IReportSource reportSource = factory.OpenReportSource(reportID);

// Create and set up the viewer object

CrystalReportViewer viewer = new CrystalReportViewer();



// Instruct the viewer to render the HTML output into the response stream

viewer.processHttpRequest(request, response, getServletContext());


For more examples, visit the Developer Zone on the Business Objects Web site at http://www.businessobjects.com/devzone.

Part I. Crystal Reports Design

Creating and Designing Basic Reports

Selecting and Grouping Data

Filtering, Sorting, and Summarizing Data

Understanding and Implementing Formulas

Implementing Parameters for Dynamic Reporting

Part II. Formatting Crystal Reports

Fundamentals of Report Formatting

Working with Report Sections

Visualizing Your Data with Charts and Maps

Custom Formatting Techniques

Part III. Advanced Crystal Reports Design

Using Cross-Tabs for Summarized Reporting

Using Record Selections and Alerts for Interactive Reporting

Using Subreports and Multi-Pass Reporting

Using Formulas and Custom Functions

Designing Effective Report Templates

Additional Data Sources for Crystal Reports

Multidimensional Reporting Against OLAP Data with Crystal Reports

Part IV. Enterprise Report Design Analytic, Web-based, and Excel Report Design

Introduction to Crystal Repository

Crystal Reports Semantic Layer Business Views

Creating Crystal Analysis Reports

Advanced Crystal Analysis Report Design

Ad-Hoc Application and Excel Plug-in for Ad-Hoc and Analytic Reporting

Part V. Web Report Distribution Using Crystal Enterprise

Introduction to Crystal Enterprise

Using Crystal Enterprise with Web Desktop

Crystal Enterprise Architecture

Planning Considerations When Deploying Crystal Enterprise

Deploying Crystal Enterprise in a Complex Network Environment

Administering and Configuring Crystal Enterprise

Part VI. Customized Report Distribution Using Crystal Reports Components

Java Reporting Components

Crystal Reports .NET Components

COM Reporting Components

Part VII. Customized Report Distribution Using Crystal Enterprise Embedded Edition

Introduction to Crystal Enterprise Embedded Edition

Crystal Enterprise Viewing Reports

Crystal Enterprise Embedded Report Modification and Creation

Part VIII. Customized Report Distribution Using Crystal Enterprise Professional

Introduction to the Crystal Enterprise Professional Object Model

Creating Enterprise Reports Applications with Crystal Enterprise Part I

Creating Enterprise Reporting Applications with Crystal Enterprise Part II

Appendix A. Using Sql Queries In Crystal Reports

Creating Enterprise Reporting Applications with Crystal Enterprise Part II

Special Edition Using Crystal Reports 10
Special Edition Using Crystal Reports 10
ISBN: 0789731134
EAN: 2147483647
Year: 2003
Pages: 341

Similar book on Amazon

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net