Sie sind auf Seite 1von 68

JASPERREPORTS SERVER EVALUATION GUIDE

RELEASE 4.2

http://www.jaspersoft.com

JasperReports Server Evaluation Guide Copyright 2011 Jaspersoft Corporation. All rights reserved. Printed in the U.S.A. Jaspersoft, the Jaspersoft logo, Jaspersoft iReport Designer, JasperReports Library, JasperReports Server, Jaspersoft OLAP, and Jaspersoft ETL are trademarks and/or registered trademarks of Jaspersoft Corporation in the United States and in jurisdictions throughout the world. All other company and product names are or may be trade names or trademarks of their respective owners. This is version 0811-JSP42-11 of the JasperReports Server Evaluation Guide.

Table of Contents

TABLE OF CONTENTS
Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1 1.2 1.3 Overview of Jaspersoft BI Suite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 About Your License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.5 1.6 1.5.1 Activating a License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Replacing an Expired Evaluation License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Locating JasperReports Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Learning about the Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Overview of the Jaspersoft Ultimate Guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Mastering Report Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Overview of the JasperReports Server Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Overview of this Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Chapter 2 Getting Started with Jaspersoft Dashboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13


2.1 2.2 Viewing a Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Editing a Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Chapter 3 Getting Started with the Ad Hoc Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17


3.1 Understanding the Ad Hoc Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.1.1 3.1.2 3.1.3 3.2 3.2.1 3.2.2 3.2.3 3.3 3.3.1 3.3.2 3.3.3 Understanding Ad Hoc Sources: Topics, Domains, and OLAP Connections . . . . . . . . . . . . 17 The Ad Hoc Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Tables, Charts, and Crosstabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Selecting the Content of a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Formatting the Appearance of a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Viewing and Running a Report in the Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Creating an Initial Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Focusing on Specific Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Refining the Crosstab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Designing an Ad Hoc Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Exploring and Analyzing Data in the Ad Hoc Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

JasperReports Server Evaluation Guide 3.4 3.5 Creating a Report from a Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Creating a Report from an OLAP Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 3.5.1 3.5.2 Creating a Report based on an OLAP Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Refining an OLAP Connection-based Crosstab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Chapter 4 Getting Started with OLAP Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45


4.1 4.2 Opening an OLAP View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 OLAP Tool Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.2.10 4.2.11 4.2.12 4.2.13 4.2.14 4.2.15 4.3 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.4 4.4.1 4.4.2 4.4.3 4.5 Drill into a Dimension Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Sort Across Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Natural Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Hierarchical Ascending and Descending . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Show Empty Rows & Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Swap Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Edit Display Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Show Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Edit Chart Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Change Data Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Show MDX Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Export to Excel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Export to PDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Edit Output Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Save Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Expand/Collapse Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Expand/Collapse Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Zoom In/Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Show Source Data (Drill-through) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Expand All/Collapse All . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Zoom Out All . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Edit Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Output as CSV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Page Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Navigation Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Drill-through Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Saving an OLAP View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

Introduction

CHAPTER 1
This section includes:

INTRODUCTION

Welcome to JasperReports Server, our commercially-available Business Intelligence (BI) platform. Overview of Jaspersoft BI Suite Installation About Your License Mastering Report Design Overview of the JasperReports Server Documentation Overview of this Document

1.1

Overview of Jaspersoft BI Suite

JasperReports Server builds on JasperReports as a comprehensive family of Business Intelligence products, providing robust static and interactive reporting, report server, and data analysis capabilities. These capabilities are available as either standalone products, or as part of an integrated end-to-end BI suite utilizing common metadata and providing shared services, such as security, a repository, and scheduling. The server exposes comprehensive public integration interfaces enabling seamless integration with other applications and the capability to easily add custom functionality. The heart of the Jaspersoft BI Suite is the server, which provides the ability to:

Easily create new reports using an intuitive web-based drag and drop Ad Hoc reporting interface. Efficiently and securely manage many reports. Interact with reports, including entering parameters and drilling on data. Arrange reports and web content to create appealing, data-rich Jaspersoft Dashboards that quickly convey business trends.

For business intelligence users, Jaspersoft offers Jaspersoft OLAP, which runs on the server. This optional component, which runs on JasperReports Server, helps you:

Make well-informed business decisions by identifying trends, anomalies, outliers, and correlations in your data. Quickly and easily access the OLAP (On Line Analytical Processing) data you need through an intuitive web interface. Explore data by drilling, pivoting, filtering, visualizing, and providing alerts based on your data.

While the Ad Hoc Editor lets users create simple reports, more complex reports can be created outside of the server. You can use iReport Designer or you can write your own JRXML code to create a report that can be run in the server. Jaspersoft recommends that you use iReport unless you have a thorough understanding of the JasperReports file structure. For more information on these subjects, see the JasperReports Server User Guide.

JasperReports Server Evaluation Guide Jaspersoft provides several other sources of information to help extend your knowledge of JasperReports Server:

Our Ultimate Guides document advanced features and configuration. They also include best practice recommendations and numerous examples. The guides are available as downloadable PDFs. Community project users can purchase individual guides or bundled documentation packs from the Jaspersoft online store. Commercial customers can download them freely from the support portal. For more information, see 1.5, Overview of the JasperReports Server Documentation, on page 10. Our free Business Intelligence Tutorials let you learn at your own pace, and cover topics for developers, system administrators, business users, and data integration users. The tutorials are available online from the Professional Services section of our website. Our free samples, which are installed with JasperReports, iReport, and JasperReports Server, are documented online. For more information about the samples, see section 1.4, Mastering Report Design, on page 9.

1.2

Installation

You can obtain an evaluation version of JasperReports Server from this location: http://www.jaspersoft.com/downloads The evaluation version provides all editions of both JasperReports Server and Jaspersoft OLAP for Windows or Linux. This document assumes youre evaluating JasperReports Server and Jaspersoft OLAP. Download the evaluation version for your operating system. Save the downloaded file to a location on the computer that will host your JasperReports Server evaluation. Start the installer in a windowed environment by double-clicking it. The installer appears, and steps you through a series of windows that prompt you for information about how you want to install JasperReports Server. For an evaluation, you can accept all the default values; a few steps bear mentioning:

Be sure to install the bundled versions of Tomcat and PostgreSQL. When prompted to install sample data, click Yes. The sample data is referenced throughout this document. When prompted to opt into the Heartbeat program, Jaspersoft recommends that you accept the default. The Heartbeat program reports specific information to Jaspersoft about your implementation: the Operating System, JVM, application server, RDBMS (type, version), and JasperReports Server edition and version number. By tracking this information, Jaspersoft can build better products that function optimally in your environment. No personal information is collected; for more information see http://www.jaspersoft.com/heartbeat. When prompted to start JasperReports Server, click Yes. JasperReports Server starts, and you are presented with a login page. In the Username field, enter jasperadmin; in the Password field, enter jasperadmin. A single instance of JasperReports Server can support multiple organizations; if you are prompted for an organization, enter organization_1. For more information, refer to the JasperReports Server Administrator Guide. The Home page appears, offering four starting points:

View Your Reports displays the sample reports Jaspersoft provides. Create a Report launches the Ad Hoc Editor, which is described in Chapter 3, Getting Started with the Ad Hoc Editor, on page 17. Analyze Data displays the sample analysis views Jaspersoft OLAP provides. For more information, refer to Chapter 4, Getting Started with OLAP Views, on page 45. Manage Server displays administrative options, such as managing users and roles. This option is only available to users who have the ROLE_ADMINISTER or ROLE _SUPERUSER role (see the JasperReports Server Administrator Guide).

1.3

About Your License

The server installation provides you with evaluation licenses for four editions of Jaspersoft commercial servers and activates the Enterprise edition license initially. To start evaluating this edition, point your browser to the web interface:
http://localhost:8080/jasperserver-pro

Introduction
To view information about the edition youre evaluating:

Click the About JasperReports Server link in the lower left corner of the login page.

Figure 1-1

The About JasperReports Server link

The server edition, version, and a license expiration date appear. Installation includes evaluation licenses for these editions:

Enterprise Express Professional Workgroup

Use the About JasperReports Server link to check which edition is active. Figure 1-2 shows an example of the information that appears for each edition.

Figure 1-2

Checking which Edition Youre Evaluating

To start evaluating a different edition, activate its license.

JasperReports Server Evaluation Guide

1.3.1

Activating a License

This procedure describes how to activate the additional licenses that are installed with the server. The following table lists the evaluation licenses files by name, edition, and product. Evaluation License File Name
jasperreports-server-enterprise_jasperserver.license jasperreports-server-express_jasperserver.license jasperreports-server-professional_jasperserver.license jasperreports-server-workgroup_jasperserver.license To activate a license to evaluate another edition:

Edition
Enterprise Express Professional Workgroup

Commercial Product
JasperReports Server Enterprise JasperReports Server Express JasperReports Server Professional JasperReports Server Workgroup

1.

Copy one of the evaluation license files from <js-install>\eval-licenses to <js-install>. For example, copy jasperreports-server-express_jasperserver.license to <js-install>.
<js-install> is the root directory where JasperReports Server is installed.

Two license files now appear in <js-install>:


The active evaluation license file, always named jasperserver.license. The Express evaluation license file: jasperreports-server-express_jasperserver.license.

Figure 1-3 2. 3. 4.

Active License Directory

Delete the active license file: jasperserver.license Rename the jasperreports-server-express_jasperserver.license to jasperserver.license. To activate the new license, restart the application server: a. b. c. Open Services in the Windows Control Panel. Select jasperreportsTomcat. Click Restart.
Restarting Tomcat ensures that the server uses the new license file instead of a cached version of the deleted file.

Introduction 5. Verify that the server is using the new license file: a. b. In the browser, click View > Reload (or refresh) the browser. The login page of the activated edition appears. Click the About JasperReports Server link at the bottom left side of the login page. The Express license information appears, as shown in Figure 1-2.

1.3.2

Replacing an Expired Evaluation License

Expiration begins when you start using the server. The evaluation period applies to the installed licenses as a group. Once the evaluation period starts to expire, activating another evaluation license does not reset the expiration time. For example, if your evaluation period is 30 days and you installed the server 10 days ago, you can continue evaluating the Enterprise edition for 20 days, or you can evaluate other editions for a total of 20 days. Theres no limit on the number of times you can evaluate a particular edition during the evaluation period. When the evaluation period expires, the License Failed message appears when you try to start the server.

Figure 1-4

Expired License Message

To replace the expired evaluation license with a commercial license, or for assistance with any license matters, contact eval@jaspersoft.com.

1.4

Mastering Report Design

JasperReports open source library drives the reporting engine of the server. The default server installation includes iReport and an extensive set of free JasperReports samples. To master report design or to learn about a specific aspect of it, such as charting, take advantage of these samples.

JasperReports Server Evaluation Guide

1.4.1

Locating JasperReports Samples

Figure 1-5 shows JasperReports sample files in <js-install>\ireport\demo\samples after installing the server.

Figure 1-5

JasperReports Samples Installed with JasperReports Server

The standalone version of iReport and the JasperReports installation programs install the samples, also.

1.4.2

Learning about the Samples

The samples are documented online: JasperReports Samples Overview JasperReports Samples Reference

Click the Docs link on our community website to find more documentation about iReport and JasperReports Server.

1.5

Overview of the JasperReports Server Documentation

JasperReports Server is documented by the following resources: Evaluation Guide. This guide walks you through a high-level evaluation of your product and its underlying functionality. It provides the simplest installation steps (most useful for evaluations by end users). Installation Guide. If you are installing JasperReports Server for the first time in a production environment, or upgrading an existing deployment, this document outlines the steps you must follow. User Guides. This guide is intended for end users or individuals who plan to work with the JasperReports Server or Jaspersoft OLAP user interfaces, use the Ad Hoc Editor, create and schedule reports, create Domains, and analyze data. Administrator Guide. This guide is intended for administrators of JasperReports Server or Jaspersoft OLAP (users who control access to the underlying repositories and systems). Build Guide. Intended for developers using build tools such as Maven and Ant, this guide explains how to compile JasperReports Server from its source code. Ultimate Guides (one each for JasperReports Server, Jaspersoft OLAP, JasperReports, and iReport). These guides contain detailed information about report development, API information, customization, data security, access control, and various business cases. They are intended for intermediate to advanced users of our products. For more information, see 1.5.1, Overview of the Jaspersoft Ultimate Guides, on page 11.

10

Introduction

Authentication Cookbook. This guide describes the configuration of JasperReports Server to use an external authentication mechanism in place of the built-in authentication of users. This document covers LDAP (Lightweight Directory Access Protocol) and CAS (Central Authentication Service). Web Services Guide. This guide is intended for developers who want to interact with Jaspersoft products via web services. This guide outlines our Web Services APIs and functions. Javadoc API documentation for JasperReports Server. Available from the Support Portal; you can also build the Javadoc from the JasperReports Server source code.

1.5.1

Overview of the Jaspersoft Ultimate Guides

If you want to extend your knowledge of Jaspersoft BI software, our Ultimate Guides document its advanced features and configuration. They also include best practice recommendations and numerous examples. The guides are available as downloadable PDFs. Community project users can purchase individual guides or bundled documentation packs from the Jaspersoft online store. Professional and Enterprise customers can download them from the support portal. 1.5.1.1 JasperReports Server Ultimate Guide

The JasperReports Server Ultimate Guide describes the Ad Hoc Editor (including its HTTP API), repository management, development and administrative features for users of the JasperReports Server plug-in for iReport, access control/authorization recommendations and examples, tips on working with Spring, and an example of customizing the JasperReports Server web application interface. The JasperReports Server Ultimate Guide is a comprehensive resource for many users, including technical business analysts, DBAs, system administrators, report developers, and system developers. 1.5.1.2 JasperReports Ultimate Guide

The JasperReports Ultimate Guide is perfect for Java developers who want to embed JasperReports in their own applications, and for those interested in the inner workings of the JasperReports engine. Written and updated by Teodor Danciu, JasperReports project founder and architect, and Lucian Chirita, JasperReports developer and community contributor. 1.5.1.3 iReport Ultimate Guide

With iReport Designer Ultimate Guide you'll learn how to visually edit complex reports with charts, images, and subreports. This informative guide has transformed many a newcomer into designers of pixel-perfect, complex, and highly interactive reports. Written and updated by Giulio Toffoli, iReport project founder and architect. 1.5.1.4 Jaspersoft OLAP Ultimate Guide

The Jaspersoft OLAP User Guide includes an end-to-end overview of multidimensional modeling, in depth details about analysis operations, design concepts for cubes, dimensions, and measures, performance considerations, and error messages and their meanings. It includes use cases, step-by-step instructions, screen shots, and innovative document maps for distinct user profiles, such as Technical Business Analyst, System Developer, System Administrator and Database Administrator.

1.6

Overview of this Document

To help you evaluate the core JasperReports Server and Jaspersoft OLAP functionality, this document explains these topics: Getting Started with Jaspersoft Dashboards Getting Started with the Ad Hoc Editor Getting Started with OLAP Views

11

JasperReports Server Evaluation Guide

12

Getting Started with Jaspersoft Dashboards

Chapter 2

Getting Started with Jaspersoft Dashboards

A Jaspersoft Dashboard displays several reports in a single, integrated view. A dashboard can include other dashboards, input controls for choosing the data displayed in one or more frames, and custom frames that point to URLs for other content. By combining different types of related content, you can create appealing, data-rich dashboards that quickly convey trends.

Figure 2-1

Dashboard with Ad Hoc Table, Chart, and Crosstab

This chapter contains the following sections:


Viewing a Dashboard Editing a Dashboard

13

JasperReports Server Evaluation Guide

2.1

Viewing a Dashboard

You can view a dashboard if you have the proper permissions. By default, the repository includes the /Dashboards folder where you can save dashboards.
To view a dashboard:

1.

Log in as user, demo, using the password, demo.


Passwords are case-sensitive. You must use lowercase d when you type demo.

2. 3.

In the search field, enter supermart and click The search results are displayed.

Click the name SuperMart Dashboard in the list of results. Alternatively, right-click the name and select Run from the context menu. JasperReports Server displays the dashboard, which includes three reports:

Figure 2-2 4. 5. 6. 7.

SuperMart Dashboard Example

When you hover your cursor over each report, controls appear for that individual report. Click Refresh to refresh the report content, and click Open to open the report in a new window. Select new values from the Start Month and End Month drop-downs and click Submit to change the data displayed. All three reports update to display data for the months you indicate. Click Reset to set the input controls to the last values saved and return the dashboard to its initial view. When done, click View > Repository to go back to the repository page. An input control may appear as a text field, a drop-down, a check box, a multi-select list box, or a calendar icon. If one of the frames in a dashboard does not refer to an input control, that frame does not update when you change that input controls value. Only reports that refer to the input control reflect the change.
If a dashboard includes a Print View button, click it to display the dashboard without JasperReports Server's header and footer; depending on your web browser, this also opens your browser's Print window.

Keep these points in mind when viewing a dashboard that has input controls:

14

Getting Started with Jaspersoft Dashboards

2.2

Editing a Dashboard

You can edit a dashboard if you have the proper permissions.


To edit a dashboard:

1. 2. 3.

Select View > Repository and search or browse for the Dashboard you want to modify. By default, the repository includes the /Dashboards folder where you can store dashboards. Right-click the dashboard and select Open in Designer from the context menu. The designer appears, displaying the dashboard. Edit the dashboard by adding, removing, resizing, or dragging content. Drag an item from the Available Content list and drop it on an existing frame to replace the existing content. For more information about working with dashboard content, see the JasperReports Server User Guide. When you are satisfied with the dashboard, click Save. To create a new version of the dashboard, select Save As from the Dashboard Selector context menu, and specify a new name.

4. 5.

15

JasperReports Server Evaluation Guide

16

Getting Started with the Ad Hoc Editor

CHAPTER 3

GETTING STARTED WITH THE AD HOC EDITOR

Using the Ad Hoc Editor, you can create a report without leaving JasperReports Server. The editor supports various types of reports: tables, crosstabs, and charts. You intuitively interact with the editor to create these reports by simply dragging and dropping elements. You can add and summarize fields, define groups, label the report, apply styles, and format data for each field. You can also use the editor to explore and analyze data interactively. This chapter contains the following sections:

Understanding the Ad Hoc Editor Designing an Ad Hoc Report Exploring and Analyzing Data in the Ad Hoc Editor Creating a Report from a Domain Creating a Report from an OLAP Connection

3.1

Understanding the Ad Hoc Editor

To launch the Ad Hoc Editor, click Create > Ad Hoc Report. The Data Chooser wizard appears, you select a data source and report type, and the Ad Hoc Editor opens. The Data Chooser lets you base your report on Topics, Domains, or OLAP connections.

3.1.1

Understanding Ad Hoc Sources: Topics, Domains, and OLAP Connections

Topics, Domains, and OLAP connections are repository objects that provide a prepared view of a data source for Ad Hoc report design. Available sources for Ad Hoc reports include:

Topics. Generally, an administrator or iReport user creates a Topic as a JRXML file. The JRXML Topic is then associated with a data source in the server. A Topic can also be created from a Domain in the server. Both types of Topics appear in the Data Chooser wizard when you create an Ad Hoc report. For more information about creating Topics, refer to the JasperReports Server User Guide. Domains. Administrators create Domains that typically filter the data, create input controls, and manage the list of available fields. A Domain specifies tables in the database, join clauses, calculated fields, display names, and default properties, all of which define items and sets of items for creating Ad Hoc reports. Using a Topic or OLAP connection instead of a Domain simplifies report creation. The following table compares the creation of a report using a Topic (or OLAP connection) versus a Domain. Using a Topic, which is actually an empty report, saves the report designer from choosing, pre-filtering, and changing display names of the data (steps 3-5 of Steps to Design a Domain-based Report).

17

JasperReports Server Evaluation Guide

OLAP connections. Administrators create OLAP client connections that expose transactional data and define how the data can be seen as a multidimensional cube. An OLAP connection can expose multiple cubes in a single OLAP connection. Typically, business analysts interact with these cubes through OLAP views, but the Ad Hoc Editor can also define reports based on cubes.

The steps for creating an Ad Hoc report vary depending on your source of data: Steps to Design a Topic-based Report
1. Click Create > Ad Hoc Report. 2. Select a Topic. 3. Select the type of report: table, chart, or crosstab. 4. Design the report using the Ad Hoc Editor.

Steps to Design a Domain-based Report


1. Click Create > Ad Hoc Report. 2. Select a Domain. 3. Choose fields of data that can be used in the report. 4. Pre-filter the data. 5. Change the display names of the data. 6. Save the custom view of the data as a Topic. 7. Select the type of report: table, chart, or crosstab. 8. Design the report using the Ad Hoc Editor.

If you select an OLAP connection instead, the steps are identical to those that create a report from a Topic.
When working with reports based on OLAP connections, your options are different than when the report is based on a Topic or Domain. For example, you cant create tables or charts based on OLAP connections. For details about OLAP-based report functionality, refer to 3.5, Creating a Report from an OLAP Connection, on page 38.

3.1.2

The Ad Hoc Editor

To open the Ad Hoc Editor, click Create > Ad Hoc Report, select a Topic, Domain, or OLAP connection, and click a report type: Table, Chart, or Crosstab:

Figure 3-1

List of Topics in the Ad Hoc Source Dialog

18

Getting Started with the Ad Hoc Editor The Ad Hoc Editor contains the following panels:

Fields Lists the fields of data available in the Domain, Topic, or OLAP connection. Canvas Serves as the main report design panel. Filters Defines a subset of data to retrieve from the data source.

Drag and drop data fields onto the canvas to begin building a report.

Figure 3-2

An Ad Hoc Table Report Design

The canvas includes Sample Data | Full Data options for displaying a subset of data or all the data in the report. Using the sample data can make report design quicker since you load less data. The full data set shows you a more realistic view of the report as it will appear to your users. Use the subset for initial design; use the full set fore refining layout elements such as column width.
Depending on its configuration, JasperReports Server may load a Topic, Domain, or OLAP connections entire result set into memory when you edit or run the report. If the data policies and other options that control JasperReports Servers memory are disabled, ensure that each Topic, Domain, or OLAP connection returns a manageable amount of data, given the environments load capacity. Alternately, you can change the servers configuration. For more information, refer to the JasperReports Server User Guide.

The canvas also includes Table, Chart, and Crosstab options for resetting the report type. You can change the report type in the Ad Hoc Editor during the design or when you reopen the design for editing. The tool bar at the top of the canvas provides access to many functions of the Ad Hoc Editor. Table 3-1 describes the tool bar. . Table 3-1 Icon Ad Hoc Editor Tool Bar Icons Name
Presentation Mode

Description
Click this icon to hide the editor interface and view only the report. This mode provides a subset of the editors full feature set. For example, you can change summaries and datatypes for all report types; you can change the chart type, legends, and display options in charts, and you can define sorting and the order and size of columns for tables. If the report includes filters created in the editor, those filters can be changed or removed. Place the cursor over this icon to open a menu of save options. Click Save to overwrite the current report, or click Save Report As to save it with a new name and location. Click this icon to run the report and see its HTML preview. This view opens in a new window or tab, and provides export options to formats such as XLS and PDF. When you run a report, you can change its filter and input control values but not its layout. Click this icon to undo the most recent action. For example, if you added a field to a table, clicking this icon removes the field from the canvas. Click this icon to redo the most recently undone action. Redo is only available immediately after you click the Undo icon; any other action disables the Redo icon.

Save Run

Undo Redo

19

JasperReports Server Evaluation Guide Table 3-1 Icon Ad Hoc Editor Tool Bar Icons, continued Name
Undo All Switch Group

Description
Click this icon to revert the report to its state when you last saved. After you click Undo All, you can click the redo icon to recreate the steps you took before clicking Undo All. Click this icon to change the way groups are displayed. Depending on the tab youre viewing, the behavior differs:
Crosstab: pivots the column groups with the row groups. Table: displays the alternate grouping. Chart: displays the alternate grouping.

Sort Input Controls

When working with tables, click this icon to view the current sorting and to select fields for sorting data. Click this icon to view the input controls applied to this report. In some cases, you can select new values to change the data. For example, you might change a date range displayed in the report. This icon is available only when input controls are defined for a JRXML-based Topic. Click this icon to select a style that determines the fonts and colors in the report. You cant undo a style selection. To change a style, click the Styles icon and choose a different one. Place the cursor over this icon to open a menu of page-level options. You can:
Change whether to display the title area. Change the page orientation and the page size. In tables, you can also hide or show the detail rows when the data is summarized. This

Styles Page Options

option is available only if the table includes grouped columns. For more information, refer to section the JasperReports Server User Guide.

3.1.3

Tables, Charts, and Crosstabs

The Ad Hoc Editor provides the most frequently-used report typestables, charts, and crosstabs: Table Use tables to view values in the database and to summarize the values in columns. Each row corresponds to a row in the database. Rows can be grouped by identical values in any field with intermediate summaries for each grouped value. For example, a table report of product orders might contain columns to show the dates and amounts of each order, and its rows might be grouped by city and product. Date Placed City A
Product 01 Date Date Date Date Date Product 01 totals: Product 02 Date Date Date Date Amount Amount Date Date Date Date Date Count Amount Amount Amount Amount Amount Sum

Date Filled

Payment Received

20

Getting Started with the Ad Hoc Editor Date Placed


Date Date Date Date Product 02 totals: Product 03 Date Date Date Date Product 03 totals: Date Date Date Date Count Amount Amount Amount Amount Sum

Date Filled
Date Date Date Date Count

Payment Received
Amount Amount Amount Amount Sum

City A totals: City B


Product 01 Date Date Date Date Date ...

Count

Sum

Date Date Date Date Date ...

Amount Amount Amount Amount Amount ...

Chart Use charts to compare one or more measures across multiple sets of related fields. Charts summarize data graphically. Types of charts include bar chart, line chart, and pie chart. With the exception of time series and scatter charts, each type of chart compares summarized values for a group. For example, the Chart tab might show the data in a bar chart that compared the sum of payments received for each of the products in each of the cities.

21

JasperReports Server Evaluation Guide


Total Payments Received

City A Product 01

City B Product 02

City C Product 03

Crosstab Use crosstabs to summarize data across multiple dimensions. Crosstabs are more compact representations than tables because they show only computed values, not individual database values. Columns and rows specify the dimensions for grouping; cells contain the summarized measurements. For instance, the example above could be displayed in a crosstab with columns grouped by sales manager and year.
Tom 2007 City A Product 01 Filled Payment Product 02 Filled Payment Product 03 Filled Payment Product Totals City B Product 01 Filled Payment Filled Payment ... City Totals ... Filled Payment 2008 Filled Payment Filled Payment Filled Payment Filled Payment Filled Payment ... Filled Payment Year Totals Filled Payment Filled Payment Filled Payment Filled Payment Filled Payment ... Filled Payment Harriet 2007 Filled Payment Filled Payment Filled Payment Filled Payment Filled Payment ... Filled Payment 2008 Filled Payment Filled Payment Filled Payment Filled Payment Filled Payment ... Filled Payment Year Totals Filled Payment Filled Payment Filled Payment Filled Payment Filled Payment ... Filled Payment Manager Totals Filled Payment Filled Payment Filled Payment Filled Payment Filled Payment ... Filled Payment

OLAP connection-based crosstabs behave differently. See section 3.5, Creating a Report from an OLAP Connection, on
page 38.

22

Getting Started with the Ad Hoc Editor

3.2

Designing an Ad Hoc Report

This section discusses some of the editors basic functionality, including: Selecting the Content of a Report Formatting the Appearance of a Table Viewing and Running a Report in the Editor
The editor can help you explore and analyze data; for more information, see section 3.3, Exploring and Analyzing Data in the Ad Hoc Editor, on page 28. You can also use the editor to explore data you access through OLAP connections. For more information, see 3.5, Creating a Report from an OLAP Connection, on page 38.

3.2.1

Selecting the Content of a Report

In the following example, you create a table that shows the ship date and shipping charge of orders; this table is used to analyze whether combining shipments reduces costs.
While the example in this section is based on a JRXML Topic, the concepts and procedures also apply applies to reports based on Domains. For more information on Domain-based reports, see Creating a Report from a Domain on page 34. To design a table in the Ad Hoc Editor:

1.

After logging into JasperReports Server, click Create > Ad Hoc Report. The Data Chooser lists Topics, Domains, or OLAP connections you can use as the data source for the report.

Figure 3-3 2.

Ad Hoc Sources Dialog

From the Topics list, right-click the topic for this report: demo for adhoc. Click Table.
The location of this Topic, typically in Ad Hoc Components > Topics, depends on your system configuration.

The Ad Hoc Editor appears.

23

JasperReports Server Evaluation Guide 3. In Fields, Ctrl-click the following fields and drag them to the canvas:
Date ordered Date shipped Order ID Name Postal code Shipped via Shipping charge

You can also double-click a field to put it on the canvas. The field context menu also provides the option to add fields.

The columns of data appear on the canvas in the order you choose them. Note that the Shipped Via column displays a list of numbers that seem irrelevant. 4. 5. Remove the Shipped Via column from the table: select the column, right-click, and click Remove from Table. In Fields, right-click the City field, and select Add as Group from the context menu. The canvas refreshes and displays the selected data grouped by city. 6. In Fields, select Country and drag it to the Group Control .

The canvas refreshes and displays the data grouped by both city and country.
The order in which you add fields to the report determines the order of groups. You can change the order if it doesnt make sense (as in this case).

7.

Right-click the top-most Country heading and select Move Up from the context menu. The canvas refreshes and displays the rows grouped by country and then city. With the new ordering, the editor displays rows that describe stores in Argentina.

8. 9.

Review the data in the Buenos Aires group. The rows are mixed; some show data for Cactus Comidas por llevar, and others show data for Rancho grande or Ocano Atlntico Ltda. Right-click the Name column and click Remove from Table. The canvas refreshes and displays the data grouped by country, city, and name.

10. In Fields, right-click Name and select Add as Group from the context menu. 11. On the canvas, right-click the Shipping Charge column and select Add Summary from the context menu. The Ad Hoc Editor displays the totals (sum) for each name, city, and country. Using a context menu, you can change or remove the summary function.

24

Getting Started with the Ad Hoc Editor

Figure 3-4

Unformatted Table

12. Near the top of the canvas, click Chart to view the data as a bar chart. 13. Right-click the chart and select Change Chart Type > Pie to view the data as a pie chart. The data are now displayed in a pie chart whose slices represent each country where merchandise was shipped. 14. Near the top of the canvas, click the Table tab to return to the table view. 15. Click Full Data to include the entire dataset in the table. The total for Argentina changes from $597.00 to $600.00 when the report uses the full set of data.
By default, the Sample Data option is selected in the editor: the server loads only a subset of the data from the data source into a table or crosstab. Working with the full set of data gives you a better understanding of the final report; however, working with a subset of the data may improve the performance of the Ad Hoc Editor. It is easier to work with summaries in tables using sample data because you can use a summary context menu at the bottom of the column.

16. Place the cursor over

and select Save Report.

17. In the Name field, enter Ad Hoc Demo Report. 18. In the Description field, enter This report was created with the Ad Hoc Editor. 19. Select a folder and click Save. The default location depends on the permissions granted to your user account. You have created a basic report that shows the date shipped and shipping charge recorded for orders in the sample data.

3.2.2

Formatting the Appearance of a Table

Next youll edit the table created in the example above to change its appearance.
You can use the Ad Hoc Editor to edit reports created in the Ad Hoc Editor, but not those created in iReport.

To format a table in the Ad Hoc Editor:

1.

Click View > Search Results.

25

JasperReports Server Evaluation Guide 2. 3. In the Search field, enter ad hoc demo and click .

The Search results appear, displaying objects that match the text you entered. Right-click the Ad Hoc Demo Report and select Open in Designer from the context menu.

The Open in Designer submenu opens a Ad Hoc report or a dashboard for editing in their respective editors.

The Ad Hoc Demo report appears. 4. At the top of the Fields panel, click connection. and select Change Source to select a different Topic, Domain, or OLAP

All report data and formatting are lost when you select a new Topic, Domain, or OLAP connection. Any changes to the report are also lost if you navigate to another page using the browser navigation buttons, the main menu, or the Search field. To preserve changes, accept the current Topic or click Cancel.

5. 6. 7. 8. 9.

Click Cancel to return to the editor without changing the Topic. Above the table, click the text Click to add a title. The title becomes editable. Enter Orders and Fees by Customer. Click to choose the reports style.

The Styles window appears. Select the Ocean style and click Close. The Edit Label window prompts you to change the Name label. 11. Delete Name, enter Customer for the group label, and click Submit. 12. Right-click the Date ordered column and select Edit Label from the context menu. The column label becomes editable. 13. Type Ordered on as the new label. 14. Click Submit. 15. Enter new labels for these columns as well: Date shipped Shipped on Shipping charge Fee 16. Click the Ordered on column heading and place the cursor over its right-hand side. When the cursor changes to the resize icon ( ), drag the column edge to the left until the heading is no wider than the data in the column cells. Make all columns as narrow as possible. 17. Right-click the Postal code column and select Delete Label from the context menu. Resize the column again until it is as narrow as the data. If space is at a premium, you can remove labels from the report and make the column only as wide as the data. The label isnt displayed when you run the report; it is displayed only in the editor. The last few columns are now difficult to read because they are crowded together. Adding some space might help. 10. On the canvas, right-click the first Name group (Cactus comidas por llevar) and select Edit Label from the context menu.

26

Getting Started with the Ad Hoc Editor 18. In Fields, select Spacer and drag it into the table between two columns. A spacer column, labeled Repeat this action to add space between each of the columns. 19. Spacers can also be used to create margins. Select Spacer again and drag it to left edge of the table. 20. Drag Spacer to the right edge of the table. 21. Right-click the Fee column, select Change Data Format, and click Change Data Format > ($1,234.56). The U.S. Dollars data format is applied to the Fee column. 22. Right-click the Ordered on column, click Change Data Format, and select the short date format. For example, click 5/01/11. Also apply the short date format to the Shipped on column. The dates in the columns now appear in the short date format. 23. Use Ctrl-click to select both the Order ID field and the spacer to its right. 24. Drag the field and spacer to the left-most position in the report and drop them. 25. Place the cursor over and select Hide Detail Rows to show only the summarized totals for each group. , appears in the table.

The Ad Hoc Editor applies a summary to each field depending on its datatype. 26. Display the detail rows using 27. Place the cursor over 28. Place the cursor over .

and select a page size that best fits the table. and select Save Report.

You have now created and formatted an Ad Hoc report:

Figure 3-5

Formatted Table

Any unused space at the right of the canvas is retained when you run the report.

27

JasperReports Server Evaluation Guide

3.2.3

Viewing and Running a Report in the Editor

After you create a compelling table, chart, or crosstab, save it in the repository for future use. Before leaving the editor, you can see how the report will look to users:

View the report in presentation mode by clicking

Run the report by clicking ; you can also run the report directly from the repository. When you run the report, it is displayed as a JasperReport. For more information, refer to section the JasperReports Server User Guide.

3.3

Exploring and Analyzing Data in the Ad Hoc Editor

You can use the Ad Hoc Editor to delve into the data and recognize trends and outliers by exploring and analyzing the data. The following example explores the state sales data in the Foodmart sample data that you can install with the server. This section describes:

Creating an Initial Layout Focusing on Specific Data Refining the Crosstab


This section describes the exploration of transactional data underlying the Foodmart Mondrian connection, but there are other ways to explore this data in the Ad Hoc Editor. You can also select an OLAP connection in the Data Chooser wizard to have its cube metadata automatically applied to your report. For more information, see 3.5, Creating a Report from an OLAP Connection, on page 38.

3.3.1
1. 2.

Creating an Initial Layout

To set up the crosstab and define its initial layout:

After logging into the server, click Create > Ad Hoc Report. The Data Chooser wizard appears. On the Topics tab, select this topic: foodmart data for crosstab. Click Crosstab. The location of this Topic, typically in Ad Hoc Components/Topics, depends on your system configuration. The Ad Hoc Editor appears.

3.

Create a crosstab. Drag:


Store Country into the Column Group area. Store State into the Column Group area below Store Country. Product Family into the Row Group area. Customer State into the Row Group area to the right of Product Family. Store Sales into the Data Values area.

4. 5. 6. 7.

Set the data format: right-click Store Sales in the Data Values label area and select Change Data Format > ($1234.56). Right-click the Product Family row group label and select Expand Members. Right-click the Store Country column group label and select Expand Members. Review the data in the crosstab. Use the scroll bars if necessary.

28

Getting Started with the Ad Hoc Editor The Ad Hoc Editor displays a subset of the data by default; therefore, some rows and columns may not be displayed and value totals are small.

Figure 3-6

Crosstab of Foodmart Sales Totals by State and Product Family

Even with the subset data, you can see many zero values. The non-zero values mainly appear in cells where the Store State column group intersects a Store Customer row for the same state. For example, in the BC column group, every cell shows a zero except for the first, where both the Store State column group and the Customer State row group are BC. This indicates that most customers shop in their home state (the store state recorded for their purchases is the same as the customers home address state). There are exceptions, but they are obscured by all the zero values. You can make the crosstab more readable and compact by pivoting the Customer State row group so that all geographical groups are on the same axis of the crosstab. 8. 9. Right-click Customer State and select Switch to Column Group. Right-click Store State and select Expand Members. Two column groups now show state names; one shows the store locations, the other shows the customer locations. None of the cells show a zero value, and the crosstab is more streamlined. Any case where stores recorded sales to customers from multiples states is indicated by two or more customer states under the same store state. The crosstab is easier to read:

Figure 3-7

Streamlined Crosstab of Foodmart Sales

Canada, BC is the only province that appears in either the Store State or Customer State: all the Canadian customers live in the same province as the store they frequent. The same is true in the US. But in Mexico, many customers cross state lines to shop. This seems like an important outlier. In the next procedure, you focus on the data from Mexico. First, save the crosstab.

29

JasperReports Server Evaluation Guide 10. Place the cursor over , and select Save Report As. In the Save As dialog box, specify a name (Foodmart Crosstab), expand the Organization folder, select the Reports folder, and click Save.

3.3.2

Focusing on Specific Data

In Figure 3-7, you can see that Mexico has customers that travel outside their home states to shop. First, verify this trend across the full dataset, and if it holds true, focus on the data in Mexico.
To view the full dataset and focus on specific group members:

1. 2.

If the report from the last example isnt open, locate the report in the repository, right-click the report and select Open in
Designer from the context menu.

Click Full Data. The words Full Data change formatting to indicate that you are working with all the available data. Scroll in all directions to see the full data. Mexico is indeed the only country where stores record sales from customers living in other states. Focus on this outlier.

3.

Right-click the Mexico column in the Store Country group and select Keep Only. The crosstab is redrawn without data from the US or Canada. Keeping or excluding group members is equivalent to filtering values from the data.
Because excluding columns is equivalent to filtering, the Ad Hoc Editor reloads the data with this filter. If you are viewing a subset of the data, the filtering may change the subset, and therefore change the values you see.

The Ad Hoc Editor displays the Filters panel with the filter equivalent to your selection of Store Country. However, you dont need the Filters panel and it takes up space on the page. 4. In the Filters panel, click . This hides the panel and prevents it from appearing the next time you exclude group members. Since the crosstab contains only a single country now, the two column group summaries show identical data. 5. To remove the outermost column group summary, right-click Store Country and select Delete Column Summary. Lets analyze the data appearing in the crosstab. Stores in DF (Distrito Federal) sell to customers in two states: DF and Mexico, which border each other. That seems trivial, but notice a similar issue in Guerrero: the Guerrero store is selling to customers in Sinaloa. Given that Sinaloa is hundreds of miles from Guerrero, this may be another important outlier. Several stores are much closer to Sinaloa than Guerrero. Why are customers willing to drive so far to purchase from this location? Lets take a look at the sales in stores nearer to Sinaloa: Distrito Federal, Jalisco, and Zacatecas. 6. To remove the other columns, Ctrl-right-click the header cells for Veracruz and Yucatan and select Exclude. The crosstab now shows all sales totals for Guerrero, where the Sinaloa residents are shopping, and for the three states with stores that are closer to Sinaloa. The crosstab is more compact and fits entirely on the screens (depending on your resolution):

Figure 3-8

Crosstab of Foodmart Sales in the Mexican States of Interest

Now lets add new measures that give us more insight into the data.

30

Getting Started with the Ad Hoc Editor 7. In Fields, right-click Store Sales and select Create Custom Field. Select the advanced function, % of Column Group (value), then click Create Field. A new field appears in Fields: % CGP (Store Sales). CGP means column group parent. It compares values in column groups to their parent values and expresses each measure value as a percent of the containing column group. Consider this example:

The total for CA sales is $1000. SF sold $650, or 65% of the CA sales. LA sold $350, or 35% of the CA sales.

In this example, the CGP for LA is 35%. These calculated fields can be used in crosstabs that include nested column and row groups; in this case the total for the inner group is expressed as a percent of the outer group total. % Column Group Parent can also be used in tables with more than one group. To continue the above example:

The total for all states is $3000. The total for CA is $1000, or 33% of the US sales. The total for WA is $2000, or 66% of the US sales.

RGP means row group parent; its similar to CGP but applies to row groups rather than column groups. It compares values in row groups to their parent values and expresses each measure value as a percent of the containing row group. Percent of parent fields can be used only as measures; placing them in a row or column group area has no effect. 8. 9. Right-click the new custom field and select Add as Measure. The measure appears in the crosstab. Lets change the data format of the new measure to make it more readable. Right-click the measures label, select Change Data Format and select -1235. Now you can quickly scan the crosstab and see where the out-of-state buying is the highest, as a percentage of the total store sales. In this case, it is the Sinaloa residents purchasing non-consumables in Guerrero:

Figure 3-9

Crosstab of Foodmart Sales and Percent of Column Group Parent and select Save Report.

10. Place the cursor over

With this outlier identified, lets dig a little deeper.

3.3.3
1. 2.

Refining the Crosstab

To refine the crosstab while viewing the full dataset:

If it isnt open, locate the report from the last example in the repository and click Open. Click the column group labels and select Expand Members to restore the view of the crosstab shown in Figure 3-9. Sort by % CGP (Store Sales); click the sorting icon beside the measure label to change one of the following sort orders: Alphabetical order (A to Z) of the column and row group labels; this is the default sort order. 31

JasperReports Server Evaluation Guide Numeric ascending order (smallest to greatest) of the column and row group summary values. Numeric descending order (greatest to smallest) of the column and row group summary values. Both columns groups and row groups are sorted according to the chosen order, and inner groups are sorted within their parent groups:

Figure 3-10

Crosstab of Foodmart Sales

The percent of column group measure shows that a third of the people that shop for drinks in Guerrero live in Sinaloa. The non-consumable product family has even more customers from Sinaloa. Take a closer look. 3. 4. 5. 6. Right-click Non-Consumable and select Keep Only. Click the arrow next to DF, Jalisco, and Zacatecas to collapse them. For a breakdown of non-consumables, add Product Category as a row group to the right of Product Family. Right-click Product Family and select Expand Members from the context menu. The crosstab shows two categories where more than 50% of the sales in the Guerrero store were made to residents of Sinaloa: Cold Remedies and Hygiene. 7. Click Cold Remedies, Ctrl-right-click Hygiene, and select Keep Only.
Clicking the editors scroll bars removes the focus from groups selected in the crosstab. Select a member and use the mouse scroll button to scroll to the next member.

8.

Review the data in the crosstab. Use the scroll bars if necessary. In the current view:

The measures show detail only for the Guerrero store; for the other states, the crosstab shows summarized values. For the % CGP measure, in Guerrero the detail for Sinaloa and Guerrero customers (47% and 53% respectively of all sales in Guerrero). In the Customer State total column, the % CGP is 13 - that is, $420.04 is 13% of all Mexican sales occurred in Guerrero.

At first glance, these numbers may seem incorrect; one might be expecting the % CGP values for Sinaloa and Guerrero customer state CGP values to roll up and equal the Guerrero CGP store state value. Instead, the Guerrero store state shows its percent of all of Mexico, and each of its customer states show the percent of store state. For more information, see the
JasperReports Server User Guide

You can continue to refine the crosstab to understand why the Guerrero store is selling to customers in Sinaloa. The discrepancy is slightly greater in the Cold Remedies group member; focus on it first. 9. Right-click Cold Remedies and select Keep Only. Hygiene is removed from the crosstab. 10. Add Product Name as the inner-most row group. 11. Right-click Product Category and select Expand Members from the context menu.

32

Getting Started with the Ad Hoc Editor Several cold remedy brands sold mostly to Sinaloans (above 50% CGP) are selling poorly in Jalisco.

Figure 3-11

Cold Remedy Sales in DF, Guerrero, Jalisco, and Zacatecas

12. Note the cold remedies that are selling well to Sinaloans but not selling at all in Jalisco: Faux Products Childrens Cold Remedy, Faux Products Multi-Symptom Cold Remedy, and Steady Multi-Symptom Cold Remedy. 13. Click Faux Products Childrens Cold Remedy, Ctrl-click Faux Products Multi-Symptom Cold Remedy to select them. 14. Ctrl-right-click Steady Multi-Symptom Cold Remedy and select Keep only from the context menu. Notice that Jalisco disappears; thats because these products have never been sold in Jalisco.

Figure 3-12 15. Click

Jalisco Disappears From the Crosstab

to undo the last action.


(Undo) and (Undo All) are available only when you have made a change in the editor since saving; the buttons are disabled when you save. Undo can be used to cancel your last action if the server is busy. For example, if you are working with the full dataset and you make a change that takes longer than anticipated, you can click , to undo and then try again. , you can locate the Product Name filter and reset it to include all product names.

16. Instead of clicking a. b.

If the Filters panel is hidden, click Jalisco is restored to the crosstab.

to display it.

Locate the Product Name filter and click the All check box to add all the cold remedies back into the crosstab.

33

JasperReports Server Evaluation Guide When you click the All check box, the server retrieves all the values for the specified field and adds them to the filter. When the report is run, the values the server retrieves are used to filter the report. The server does not retrieve a list of new valid values at run-time. For more information, see the JasperReports Server User Guide. To ensure that all values are included in a report at run-time, remove the filter. 17. Place the cursor over and select Save Report.

Figure 3-13

Crosstab of Cold Remedies sold in Mexico

18. To continue further analysis, click the Product Category total for Guerrero ($314.61) to open a new instance of the Ad Hoc Editor. 19. Click Crosstab to continue data exploration or Chart to create a compelling visualization of the data. In the above example, you explored the Foodmart dataset and analyzed an interesting outlier: Sinaloans are willing to bypass a closer store (in Jalisco) in order to buy a few brands of cold remedy. Further analysis might reveal an underlying cause:

Are these brands being regularly stocked in Jalisco, or is there a supply chain problem at this location? Are other factors contributing to the discrepancy, such as the age or gender of the customer? Is this an isolated incident or a growing trend? If its a trend, what common characteristics of the customers or products are involved? Are the data for hygiene products similar to the data for cold remedies? Do any of the similarities shed light on the issue?

You can use the same techniques discussed in this section to analyze and explore your own data in the Ad Hoc Editor. To further refine your data visualization, you can use simple and complex (Keep Only and Exclude) in conjunction with advanced filtering. For more information on these functions, see the JasperReports Server User Guide.

3.4

Creating a Report from a Domain

Like Topics and OLAP connections, administrators and data analysts create Domains for reuse to simplify access to data during report design. Domains give report makers more flexibility than Topics in choosing fields from the database and allow filtering of the data before it is included in a report. A report based on a Domain can prompt the user for input that determines what data is presented. For example, if a Domain includes all sales data for a company, the report can present detailed information grouped by postal code and prompt the user to select the geographic area, such as a US state. The report displays only the pertinent information. For a more complete description of how to create Domains, see the JasperReports Server User Guide. When you create an Ad Hoc report based on a Domain, the Data Chooser wizard leads you through the steps of choosing fields and filters. The following example shows how to use the Data Chooser to create a simple report from a Domain.

34

Getting Started with the Ad Hoc Editor For complete information about the options and settings available for designing reports, see the JasperReports Server User
Guide. To create a basic report from a Domain:

1. 2.

On the Home page, click Create > Ad Hoc Report. The Ad Hoc Editor opens the Data Chooser wizard. Click Domains. The list of the available Domains appears.

Figure 3-14

Simple Domain Selected in the Ad Hoc Sources Dialog

A description of the selected Domain appears at the bottom of the Domains tab. 3. 4. Select Simple Domain. Click Choose Data. The Data Chooser opens to the Select Fields page. The sets belonging to the Domain appear in Source. You can select whole sets or individual items within a set. A set appears in the Ad Hoc Editor as a set of fields that can be added together to a table.
If a Domain is configured for secure access, only the fields that you have permission to access are displayed. Other fields might not be visible to you, even though someone else might see them using the same Domain. Conversely, the fields that you can see might include ones that another user cant see.

5.

In this example, expand each set and drag the following fields from Source to Selected Fields:

Accounts set: Account Name field. Opportunities set: Drag the whole set, but then drag back the Sales Stage field. Users set: First Name and Last Name fields.

35

JasperReports Server Evaluation Guide If you move a field from Source to Selected Fields, the field name and the name of its set appear in Fields in the editor.

Figure 3-15 6. Click Pre-filters.

Select Fields Set

The Data Chooser displays the Pre-filters page; you can set limits on the data that are retrieved and displayed in the table:

Figure 3-16 7.

Pre-Filters Page

Expand the sets in Fields. For this example, double-click Amount in the Opportunities set. The item appears in Filters. If a Domain is configured for secure access, only the fields that you have permission to access are displayed. Other users may have access to different data in the Domain.

8. 9.

In the filters condition drop-down, select the operator for the comparison: is Greater than or Equal to. Enter the value to compare the data against: 10000. The complete filter condition appears in Filters. In this example, the filter selects only the rows of data where the opportunity amount has a value of 10,000 or more.

10. Click OK.

11. Click Display. The Data Chooser shows the Customize the Display page.

36

Getting Started with the Ad Hoc Editor 12. Select the Amount item and change its display label to Opportunity Amount:

Figure 3-17

Customize the Display Page

Note that the display names are shown under Display Label.
On the Customize the Display page, you can edit the table and display labels that will appear in the Ad Hoc Editor to clarify them for the reports audience. The source names are often appropriate display labels, but if not, the Display page gives you a final opportunity to change them.

If you want to create different reports with the same settings, you can save the settings as a Domain Topic, as described in the JasperReports Server User Guide. 13. If you want to create a Topic with the setting you just selected, click Save as Topic. 14. Click Browse. The Choose the destination folder dialog box appears. 15. Choose the destination folder, then click Select. 16. Click Table to save the Domain Topic and begin designing a tabular report in the Ad Hoc Editor. The Ad Hoc Editor appears, and Fields shows the items selected in step 5. 17. Design the report in the Ad Hoc Editor, as described in sections 3.2.1, Selecting the Content of a Report, on page 23 and 3.2.2, Formatting the Appearance of a Table, on page 25. In this example: a. b. c. d. Drag the Opportunities set to the canvas to add all its fields as columns. They are added (with display names) in the order you defined on the Display page in step 5. Drag Spacer from Fields to an empty spot on the canvas. The Spacer appears after the last column in the table. Expand the Users set and double-click the Last Name field. Expand the Accounts set and drag the Account Name item to the Group Control .

Notice that all amounts are greater than 10000, as determined by the filter you defined.

37

JasperReports Server Evaluation Guide

Figure 3-18

Ad Hoc Editor with Fields Configured for Report

As shown in this example, creating an Ad Hoc report based on a Domain gives you more flexibility in selecting data and can subsequently speed up the design of the report itself. In top right corner of Fields, you can click

, then click Select Fields to change the fields used in the report.

The Select Fields window appears, displaying two lists of tables: Selected Fields lists fields that you selected while creating the report. Available Fields lists the other tables in the Domain that you can use in this report. Note that you can select only the tables chosen when you created the Topic.

You can expand a set in Available Fields to see its fields; fields that are used on the canvas as filters, or for sorting, appear gray in Selected Fields to indicate that they cant be removed from the report. You can drag a table from Available Fields to Selected Fields to add it to the report, or you can drag a table from Selected Fields to Available Fields to remove it from the report. When you remove a table, all the its fields are removed except those that are in use. You can also drag individual fields to add or remove them. If you add or remove a field accidentally, return to the main editor and click to undo the change.

3.5

Creating a Report from an OLAP Connection

Like Topics and Domains, administrators and data analysts create OLAP connections to provide users with access to data during report design. In the case of OLAP connections, they define an OLAP schema and an optional security AGXML file. For a more complete description of how to create OLAP connections, refer to the Jaspersoft OLAP User Guide. A report based on an OLAP connection can prompt the user for input that determines what data is presented. For example, if an OLAP connections data includes all sales numbers for a company, the report can present detailed information grouped by postal code and prompt the user to select the geographic area, such as a US state. The report displays only the pertinent information.

3.5.1

Creating a Report based on an OLAP Connection

In this section, youll use the Ad Hoc Editor to recreate the Foodmart Sample Analysis View that is shipped with Jaspersoft OLAP. For complete information about the source of data in the Ad Hoc Editor, see section 3.1.1, Understanding Ad Hoc Sources: Topics, Domains, and OLAP Connections, on page 17.

38

Getting Started with the Ad Hoc Editor


To create a basic report from an OLAP connection:

1. 2.

On the Home page, click Create > Ad Hoc Report. The Ad Hoc Editor opens the Data Chooser wizard. Click OLAP Connections. A list of available OLAP connections appears.

Figure 3-19

Available OLAP Connections in the Ad Hoc Sources Dialog

XML/A connections arent yet supported. 3. 4. 5. In the list, navigate the repository to Analysis Components/Analysis Connections. Double-click Foodmart to expand the list of cubes in the Foodmart OLAP schema. A report can only access a single cube at a time. Click Sales to select it, and click Crosstab to open the report. The Ad Hoc Editor appears.

39

JasperReports Server Evaluation Guide

Figure 3-20 6.

New OLAP Connection-based Report in the Editor

From Fields, drag Promotion Media to the Columns field in the display manager. The Promotion Media dimension appears in the canvas. Note the message in the canvas that prompts you to add a columns and a measure to the crosstab. These are the minimum requirements of a crosstab. The measure can be added to either the columns or the rows.

7. 8. 9.

In Fields, expand the Product dimension and drag its All member to the Columns field in the display manager. In the Dimensions section of Fields, select Promotion Media and drag it to the Columns field in the display manager. The message in the canvas prompts you to add a measure to continue. In the Dimensions section of Fields, expand Product, select the All level, and drag it to the Columns field of the display manager. The crosstab appears in the canvas. It shows unit sales for all products and media types.

10. In the Measures section of Fields, drag Unit Sales to the Rows field of the display manager. 11. Drag Store Cost and Store Sales to the Rows field. Note that you can also use the context menu to add dimensions and measures by right-clicking them. 12. Click to move the dimensions to the row axis and the measures to the columns axis.

The crosstab switches the columns and rows. This is also called pivoting. 13. In the Dimensions section of Fields, expand Time, right-click Quarter, and select Create Filter. 14. In Filters, click 2006 - Q4 (in the Quarter filter). 15. In the Dimensions section of Fields, right-click the Months level under Time, and select Create Filter. 16. In Filters, click 2006 - Q4 - 12 (in the Month filter). 17. Place the cursor over and select Save Report.

18. In the Name field, enter OLAP Based Ad Hoc Report. 19. In the Description field, enter This Ad Hoc report is based on the Foodmart OLAP connection. 20. Select a folder and click Save. The default location depends on the permissions granted to your user account.

40

Getting Started with the Ad Hoc Editor You have created a basic crosstab that closely resembles the Foodmart Sample Analysis View OLAP view.

Figure 3-21

OLAP Based Ad Hoc Report

3.5.2

Refining an OLAP Connection-based Crosstab

In this section, youll explore the data in the Foodmart Sales cube.
To refine the OLAP connection-based crosstab:

1. 2. 3.

Click View > Search Results. In the Search field, enter OLAP Based and click .

The Search results appear, displaying objects that match the text you entered. Right-click the OLAP Based Ad Hoc Report and select Open in Designer from the context menu.
When you right-click an OLAP connection-based report in the repository, the context menu includes items that this type of report doesnt yet support. For example, you cant schedule an OLAP connection-based report. When you select such options, JasperReports Server returns an error message.

The OLAP Based Ad Hoc Report appears. 4. Click next to All Media to expand the dimension.
The Ad Hoc Editor cant expand a level that includes more than 1000 members.

The crosstab displays all the members of the dimensions only level. It includes empty rows for items such as Street Handout and Sunday Paper. These null values may be significant, but well assume we havent invested in those types of media. Since theyre irrelevant, we can hide them so we can focus on the more important information. 5. Place the cursor over and select Hide Empty Rows.

The empty rows disappear from the crosstab. The crosstab is more compact and easier to read. You can see that the measures vary drastically between the media types, but its not easy to see how the profit varies by comparing store cost and store sales. Fortunately, profit is one of our available measures.

41

JasperReports Server Evaluation Guide 6. In the Measures section of Fields, right-click Profit and click Add to Columns. The Profit measure appears in the crosstab.
Note that the Profit measure is masked to show the currency symbol ($) of the data, even though Store Sales and Store Cost dont show currency symbols. This is because the OLAP schema used by the Foodmart Mondrian connection specifies a currency for the Profit calculated member, but not for Store Sales or Store Cost.

You can now clearly see that the Bulk Mail media type is struggling to generate sales. Perhaps the cross-section of products advertised in this medium will reveal the issue. 7. In the Columns field of the display manager, right-click the All token representing Product (the one farthest right), and click Add Levels > Product Department. The Product Department level appears to the right of the All level. 8. In the Columns field of the display manager, right-click the All token representing Product (the one farthest right), and click Add Levels > Product Family. The Product Department level appears between the All level and the Product Department level. The editor automatically inserts the level at the correct location in the dimensions hierarchy. Note that appears next to Product Family. You can only expand a level or member whose immediate children are displayed in the crosstab. 9. Click next to Product Family to expand this levels members. The Drink, Food, and Non-consumable product family members appear. 10. Expand and collapse members and levels to explore these product families. 11. In the display manager, drag the All Media token to the left and drop it in between Product Family and Product Department. The token appears to the right of the entire Product dimension. This is because levels from different dimensions cant be intermixed. Each dimensions levels are kept together and follow the dimensions hierarchy. The editor automatically places levels from the same dimension together. 12. In the Rows field of the display manager, right-click the Product Department token, and click Remove from Crosstab. The level disappears. Note that you can remove any individual level from the crosstab; if its children are already in the crosstab, they remain.

Figure 3-22

OLAP Based Ad Hoc Report Showing Product Families

42

Getting Started with the Ad Hoc Editor 13. Place the cursor over and select Save Report.

You now have a crosstab that shows the number of items sold, the revenue by store, the cost by store, and the overall profit for sales in December of 2006. The data is categorized by the media used to promote each product and by product family.

43

JasperReports Server Evaluation Guide

44

Getting Started with OLAP Views

CHAPTER 4

GETTING STARTED WITH OLAP VIEWS

Jaspersoft OLAP is an On Line Analytical Processing (OLAP ) application. OLAP applications help users analyze and understand complex data. Jaspersoft OLAP Community Project uses JPivot for analytical processing with an improved user interface.
The procedures in this document assume that you installed JasperReports Server with its sample data. The schemas and views it describes are available only if the samples are installed.

4.1

Opening an OLAP View

An OLAP view consists of a client connection and an MDX query. A client connection is either a Mondrian connection or an XML/A connection; it provides the data that appears in the view. Jaspersoft OLAP contains a number of sample OLAP views. For simplicity, this guide assumes you installed the sample data and are logged in as a user with an administrator role (that is, that you have access to the view and its data).
To open an OLAP view:

1. 2.

Click View > Repository. The repository appears. Scroll through the repository to select an OLAP view or, type the name (or partial name) of the view you want to see in the search field at the top of the page. For example, type in Foodmart or Food. The repository reappears, displaying the objects that match your text.

45

Jaspersoft OLAP User Guide

Figure 4-1 3.

Search Results in the Repository

To display an OLAP view, right-click it and select Run. For example, right-click Foodmart Sample Analysis View and click Run to display the Foodmart sample view. Jaspersoft OLAP displays the default view.

Figure 4-2 4.

Foodmart Sample Analysis View

Click the tool bar buttons and values in the navigation table to explore the data.

46

Getting Started with OLAP Views

4.2

OLAP Tool Bar

The tool bar on left side of the view (Figure 4-2 on page 46) provides access to many OLAP operations and features described in the following sections.

4.2.1

Drill into a Dimension Member


Zoom on Drill Toggles (that is, turns on or off) the zoom in/out hyperlinks for hierarchy members. In the following navigation table, Zoom on Drill is selected; All Media and All Products are hyperlinks; click them to view the members of their hierarchies.

4.2.2

Sort Across Hierarchy


Sort Across Hierarchy Toggles between sort across and sort within hierarchy. In the following example, Sort Across Hierarchy is selected, and the Unit Sales measure is sorted in descending order across the Product hierarchy.

4.2.3

Natural Order
Natural Order Natural Order means numbers in measures columns are ordered according to the order of hierarchy members.

4.2.4

Hierarchical Ascending and Descending


Ascending The Hierarchy Ascending and Hierarchy Descending order operations arrange the rows according to their numeric value. Hierarchy Ascending sorts from smallest to largest, while Hierarchy Descending sorts from largest to smallest.

Descending

47

Jaspersoft OLAP User Guide

4.2.5

Show Empty Rows & Columns


Hide Empty Rows/ Columns Hides or reveals rows or columns that do not have relevant fact data. The following example includes empty rows for Promotion Media (Street Handout; Sunday Paper; and Sunday Paper, Radio, TV.

4.2.6

Swap Axes
Swap Axes Changes the orientation of the table by switching the columns and rows. In the following example, axes for measure columns and dimension rows are switched.

48

Getting Started with OLAP Views

4.2.7

Edit Display Option


Edit Display Options Allows users to configure the cube options, drill-through options, and sort options, as described in the following sections.

4.2.7.1

Cube Options
Displays the column headings of a given hierarchy. The following navigation table shows Product and Product Family as parent column headings.

Show all parent columns

Show individual parent cells

Displays each parent member of a given hierarchy. The following navigation table displays all parent cells for Promotion Media and Product dimensions.

Include member attributes

Displays the member properties of the displayed hierarchy members.

49

Jaspersoft OLAP User Guide 4.2.7.2 Drill-through Operations


Displays the drill-through table below the navigation table. By default, the drill-through table appears in a separate browser window. Removes the hyperlinks from the fact data in measures. Limits the display to only the selected measure in the drill-through table.

Show table below cube (on same page) Hide drill-through links Include only selected measure

4.2.7.3

Sort Option
Changes the behavior of sorting across or within dimension hierarchies. See 4.2.2, Sort Across Hierarchy, on page 47. Toggles the sort behavior between ascending and descending. Limits the number of rows displayed after sorting.

Sort across cube hierarchy Start sorting in descending order Display only the first N rows

4.2.8

Show Chart
Show Chart Displays a chart of the navigation table data. The following example shows a bar chart that represents the columns in these measures: Unit Sales, Store Cost, and Store Sales.

50

Getting Started with OLAP Views

4.2.9

Edit Chart Options


Edit Chart Operations Defines various charting options.

4.2.10

Change Data Cube


Change Data Cube Changes an OLAP view and defines dimension filters. Click Change Data Cube to display the options in the following figure.

Columns Rows Filter

Selects specific measures to display. Selects specific dimension members to display. Selects specific dimension members that dont appear in the navigation table. This selection determines the data displayed in the navigation table.

51

Jaspersoft OLAP User Guide

4.2.11

Show MDX Query


Show MDX Query Changes the navigation table by editing the MDX query that generates the view. This feature is intended for advanced users familiar with MDX and the data structures underlying the view.

4.2.12

Export to Excel
Export to Excel Prompts you to view or save the current navigation table in Microsoft Excel format.

4.2.13

Export to PDF
Export to PDF Prompts you to view or save the current navigation table in Adobe Acrobat PDF format.

52

Getting Started with OLAP Views

4.2.14

Edit Output Operations


Edit Output Options Defines various output options.

4.2.15

Save Buttons
Save View Saves this OLAP view. Changes youve made since you opened the view are saved to the repository. If you dont have permission to save the view in its current location, the Save View As dialog prompts you to select a new location. Saves this OLAP view under a new name and location. Changes youve made since opening the view are saved to the repository in the location you select. Note that you cannot use the Save View As button to overwrite an existing view (even if you have sufficient permissions).

Save View As

For more information, refer to 4.5, Saving an OLAP View, on page 56.

4.3

Navigation Table

The navigation table appears at the top of the OLAP view (Figure 4-2 on page 46). It shows the data that is retrieved by the current MDX query, which appears in both the main view and in drill-through tables.

4.3.1

Expand/Collapse Position
Expand Position Collapse Position Expands or collapses rows at a specific hierarchy member. In the following navigation table, the All Media member is collapsed: it can be expanded; the All Products member is expanded and can be collapsed.

53

Jaspersoft OLAP User Guide

4.3.2

Expand/Collapse Member
Synchronizes the expansion or contraction of rows across all hierarchy members when they are clicked. The following navigation table shows the Product member expanded for the Promotion Media hierarchy member.

Expand/Collapse Member

4.3.3

Zoom In/Out
Click hyperlinked hierarchy members to replace the current table with a sub-table that depicts the selected member. The following navigation table shows the table displayed when you zoom in on the Drink product of All Products.

Zoom In/Out

54

Getting Started with OLAP Views

4.3.4

Show Source Data (Drill-through)


Click hyperlinked fact data to display additional columns from that specific fact data. The following drill-through table shows the drill-through of Total Unit Sale for Alcoholic Beverages. For more information about the drill-through tables options, refer to 4.4, Drill-through Table, on page 56.

Show Source Data

4.3.5

Expand All/Collapse All


Expand All Expands all of the currently displayed members (all those that display the plus sign (+)) to the next level of detail in the hierarchies. This can be selected repeatedly to expand all levels of detail. This option is only available when Zoom on Drill is not active. This operation is limited by the memory available to the application server that hosts JasperReports Server. It stops expanding members when this limit is reached. Collapses the navigation table to its initial view.

Collapse All

4.3.6

Zoom Out All


Zoom Out All Restores the navigation table to its initial view after having zoomed. This option is only available when youre in Zoom on Drill mode.

55

Jaspersoft OLAP User Guide

4.4

Drill-through Table

The drill-through table displays supporting details for the selected roll-up value in the navigation table (described in Navigation Table on page 53). The following sections describe the available functionality.

4.4.1

Edit Properties
Edit Properties Displays at the top-left corner of the drill-through table. Selects the columns to display or hide in the drill-through table. The up and down arrows move the columns and specify the number of rows to display per page.

4.4.2

Output as CSV
Output as CSV Displayed at the top-left corner of the drill-through table. Prompts you to view or save the current drill-through table in comma-separated values format.

4.4.3

Page Controls
First, Previous, Next, Last Goto Page Rows/page Click the arrows to navigate the pages of data. Enter the number of the page you want to view and press return to display the page. Set the number of rows to display.

By default, the drill-through table opens in its own window. Edit the display options (by clicking ) to display the drillthrough table on the same page as the navigation table. When the drill-through table is on the same page as the navigation table, click the small red X in the drill-through tables upper-right corner to close it.

4.5

Saving an OLAP View

After making changes to the navigation table, save the OLAP view as described in 4.2.15, Save Buttons, on page 53. With sufficient permissions, you can either overwrite the existing view or save the view with a new name. When you save, you are prompted for a name, location, and an optional description. If a view with the same name exists in this location, you are prompted to overwrite the existing file. When you save a view with a new name, JasperReports Server displays the new view, rather than the view you initially edited.
Jaspersoft OLAP only saves the drill-through table if it is displayed on the same page as the navigation table. For more information, refer to 4.2.7.2, Drill-through Operations, on page 50.

56

Glossary

GLOSSARY
Ad Hoc Editor The interactive report designer in JasperReports Server Professional and Enterprise editions. Starting from a collection of fields predefined in a Topic or selected from a Domain, the Ad Hoc Editor lets you drag and drop report elements to draft, preview, and finalize reports. Like JRXML reports, Ad Hoc reports can be run, printed, and scheduled within JasperReports Server. In addition, Ad Hoc reports may be reopened in the Ad Hoc Editor, further modified, and saved. Audit Archiving To prevent audit logs from growing too large to be easily accessed, the system installer configures JasperReports Server to move current audit logs to an archive after a certain number of days, and to delete logs in the archive after a certain age. The archive is another table in the JasperReports Servers private database. Audit Domains A Domain that accesses audit data in the repository and lets administrators create Ad Hoc reports of server activity. There is one Domain for current audit logs and one for archived logs. Audit Logging When auditing is enabled, audit logging is the active recording of who used JasperReports Server to do what when. The system installer can configure what activities to log, the amount of detail gathered, and when to archive the data. Audit logs are stored in the same private database that JasperReports Server uses to store the repository, but the data is only accessible through the audit Domains. Auditing A feature of JasperReports Server Enterprise edition that records all server activity and allows administrators to view the data. Calculated Field In a Domain, a field whose value is calculated from a user-written formula that may include any number of fields, operators, and constants. A calculated field is defined in the Domain Designer, and it becomes one of the items to which the Domains security file and locale bundles can apply. CRM Customer Relationship Management. The practice of managing every facet of a companys interactions with its clientele. CRM applications help businesses track and support their customers. CrossJoin An MDX function that combines two or more dimensions into a single axis (column or row).

57

JasperReports Server Evaluation Guide Cube The basis of most OLAP applications, a cube is a data structure that contains three or more dimensions that categorize the cubes quantitative data. When you navigate the data displayed in an OLAP view, you are exploring a cube. Custom Field In the Ad Hoc Editor, a field that is created through menu items as a simple function of one or two available fields, including other custom fields. When a custom field becomes too complex or needs to be used in many reports, it is best to define it as a calculated field in a Domain. Dashboard A collection of reports, input controls, graphics, labels, and web content displayed in a single, integrated view. Dashboards often present a high level view of your data, but input controls can parameterize the data to display. For example, you can narrow down the data to a specific date range. Embedded web content, such as other web-based applications or maps, make dashboards more interactive and functional. Derived Table In a Domain, a derived table is defined by an additional query whose result becomes another set of items available in the Domain. For example, with a JDBC data source, you can write an SQL query that includes complex functions for selecting data. You can use the items in a derived table for other operations on the Domain, such as joining tables, defining a calculated field, or filtering. The items in a derived table can also be referenced in the Domains security file and locale bundles. Data Policy In JasperReports Server, a setting that determines how the server processes and caches data used by Ad Hoc reports. Select your data policies by clicking Manage > Ad Hoc Settings. Data Source Defines the connection properties that JasperReports Server needs to access data. The server transmits queries to data sources and obtains datasets in return for use in filling reports and previewing Ad Hoc reports. JasperReports Server supports JDBC, JNDI, and Bean data sources; custom data sources can be defined as well. Dataset A collection of data arranged in columns and rows. Datasets are equivalent to relational results sets and the JRDataSource type in the JasperReports Library. Datatype In JasperReports Server, a datatype is used to characterize a value entered through an input control. A datatype must be of type text, number, date, or date-time. It can include constraints on the value of the input, for example maximum and minimum values. As such, a datatype in JasperReports Server is more structured than a datatype in most programming languages. Denormalize A process for creating table joins that speeds up data retrieval at the cost of having duplicate row values between some columns. Dice An OLAP operation to select columns. Dimension A categorization of the data in a cube. For example, a cube that stores data about sales figures might include dimensions such as time, product, region, and customers industry. Domain A virtual view of a data source that presents the data in business terms, allows for localization, and provides data-level security. A Domain is not a view of the database in relational terms, but it implements the same functionality within JasperReports Server. The design of a Domain specifies tables in the database, join clauses, calculated fields, display names, and default properties, all of which define items and sets of items for creating Ad Hoc reports.

58

Glossary Domain Topic A Topic that is created from a Domain by the Data Chooser. A Domain Topic is based on the data source and items in a Domain, but it allows further filtering, user input, and selection of items. Unlike a JRXML-based Topic, a Domain Topic can be edited in JasperReports Server by users with the appropriate permissions. Drill To click on an element of an OLAP view to change the data that is displayed:

Drill down. An OLAP operation that exposes more detailed information down the hierarchy levels by delving deeper into the hierarchy and updating the contents of the navigation table. Drill through. An OLAP operation that displays detailed transactional data for a given aggregate measure. Click a fact to open a new table beneath the main navigation table; the new table displays the low-level data that constitutes the data that was clicked. Drill up. An OLAP operation for returning the parent hierarchy level to view to summary information.

Eclipse An open source Integrated Development Environment (IDE) for Java and other programming languages, such as C/C++. ETL Extract, Transform, Load. A process that retrieves data from transactional systems, and filters and aggregates the data to create a multidimensional database. Generally, ETL prepares the database that your reports will access. The Jaspersoft ETL product lets you define and schedule ETL processes. Fact The specific value or aggregate value of a measure for a particular member of a dimension. Facts are typically numeric. Field A field is equivalent to a column in the relational database model. Fields originate in the structure of the data source, but you may define calculated fields in a Domain or custom fields in the Ad Hoc Editor. Any type of field, along with its display name and default formatting properties, is called an item and may be used in the Ad Hoc Editor. Frame A dashboard element that displays reports or custom URLs. Frames can be mapped to input controls if their content can accept parameters. Group In a report, a group is a set of data rows that have an identical value in a designated field.

In a table, the value appears in a header and footer around the rows of the group, while the other fields appear as columns. In a chart, the field chosen to define the group becomes the independent variable on the X axis, while the other fields of each group are used to compute the dependent value on the Y axis.

Hierarchy Level In an OLAP cube, a member of a dimension containing a group of members. Input Control A button, check box, drop-down list, text field, or calendar icon that allows users to enter a value when running a report or viewing a dashboard that accepts input parameters. For JRXML reports, input controls and their associated datatypes must be defined as repository objects and explicitly associated with the report. For Domain-based reports that prompt for filter values, the input controls are defined internally. When either type of report is used in a dashboard, its input controls are available to be added as special content. iReport Designer An open source tool for graphically designing reports that leverage all features of the JasperReports Library. The Jaspersoft iReport Designer lets you drag and drop fields, charts, and sub-reports into a canvas, and also define parameters or expressions for each object to create pixel-perfect reports. iReport Designer outputs the JRXML of the report or uploads it directly to JasperReports Server.

59

JasperReports Server Evaluation Guide Item When designing a Domain or creating a Topic based on a Domain, an item is the representation of a database field or a calculated field along with its display name and formatting properties defined in the Domain. Items can be grouped in sets and are available for use in the creation of Ad Hoc reports. JasperReports Library An embeddable, open source, Java API for generating a report, filling it with current data, drawing charts and tables, and exporting to any standard format (HTML, PDF, Excel, CSV, and others). JasperReports processes reports defined in JRXML, an open XML format that allows the report to contain expressions and logic to control report output based on run-time data. JasperReports Server A commercial open source, server-based application that calls the JasperReports library to generate and share reports securely. JasperReports Server authenticates users and lets them upload, run, view, schedule, and send reports from a web browser. Commercial versions provide metadata layers, interactive report and dashboard creation, and enterprise features such as organizations and auditing. Jaspersoft ETL A graphical tool for designing and implementing your data extraction, transforming, and loading (ETL) tasks. It provides hundreds of data source connectors to extract data from many relational and non-relational systems. Then, it schedules and performs data aggregation and integration into data marts or data warehouses that you use for reporting. Jaspersoft OLAP A relational OLAP server integrated into JasperReports Server that performs data analysis with MDX queries. The product includes query builders and visualization clients that help users explore and make sense of multidimensional data. Jaspersoft OLAP also supports XML/A connections to remote servers. JavaBean A reusable Java component that can be dropped into an application container to provide standard functionality. JDBC Java Database Connectivity. A standard interface that Java applications use to access databases. JNDI Java Naming and Directory Interface. A standard interface that Java applications use to access naming and directory services. Join Tree In Domains, a collection of joined tables from the actual data source. A join is the relational operation that associates the rows of one table with the rows of another table based on a common value in given field of each table. Only the fields in a same join tree or calculated from the fields in a same join tree may appear together in a report. JPivot An open source graphical user interface for OLAP operations. For more information, visit http://jpivot.sourceforge.net/. JRXML An XML file format for saving and sharing reports created for the JasperReports Library and the applications that use it, such as iReport Designer and JasperReports Server. JRXML is an open format that uses the XML standard to define precisely all the structure and configuration of a report. MDX Multidimensional Expression Language. A language for querying multidimensional objects, such as OLAP (On Line Analytical Processing) cubes, and returning cube data for analytical processing. An MDX query is the query that determines the data displayed in an OLAP view.

60

Glossary Measure Depending on the context:


In a report, a formula that calculates the values displayed in a tables columns, a crosstabs data values, or a charts dependent variable (such as the slices in a pie). In an OLAP view, a formula that calculates the facts that constitute the quantitative data in a cube.

Mondrian A Java-based, open source multidimensional database application. Mondrian Connection An OLAP client connection that consists of an OLAP schema and a data source used to populate an OLAP view. Mondrian Schema Editor An open source Eclipse plug-in for creating Mondrian OLAP schemas. Mondrian XMLA Source A server-side XMLA source definition of a remote client-side XML/A connection used to populate an OLAP view using the XMLA standard. MySQL An open source relational database management system. For information, visit http://www.mysql.com/. Navigation Table The main table in an OLAP view that displays measures and dimensions as columns and rows. ODBO Connect Jaspersoft ODBO Connect enables Microsoft Excel 2003 and 2007 Pivot Tables to work with Jaspersoft OLAP and other OLAP servers that support the XML/A protocol. After setting up the Jaspersoft ODBO data source, business analysts can use Excel Pivot Tables as a front-end for OLAP analysis. OLAP On Line Analytical Processing. Provides multidimensional views of data that help users analyze current and past performance and model future scenarios. OLAP Client Connection A definition for retrieving an OLAP view. An OLAP client connection is either a direct Java connection (Mondrian connection) or an XML-based API connection (XML/A connection). OLAP Schema A metadata definition of a multidimensional database. In Jaspersoft OLAP, schemas are stored in the repository as XML file resources. OLAP View Also called an analysis view. A view of multidimensional data that is based on an OLAP client connection and an MDX query. It is the entry point to analysis operations, such as slice and dice, drill down, and drill through. Organization A set of users that share folders and resources in the repository. An organization has its own user accounts, roles, and root folder in the repository to securely isolate it from other organizations that may be hosted on the same instance of JasperReports Server. Organization Admin Also called the organization administrator. A user in an organization with the privileges to manage the organizations user accounts and roles, repository permissions, and repository content. An organization admin can also create sub-organizations and mange all of their accounts, roles, and repository objects. The default organization admin in each organization is the jasperadmin account. 61

JasperReports Server Evaluation Guide Outlier A fact that seems incongruous when compared to other members facts. For example, a very low sales figure or a very high number of helpdesk tickets. Such outliers may indicate a problem (or an important achievement) in your business. The analysis features of Jaspersoft OLAP excel at revealing outliers. Parameter Named values that are passed to the engine at report-filling time to control the data returned or the appearance and formatting of the report. A report parameter is defined by its name and type. In JasperReports Server, parameters can be mapped to input controls that users can interact with. Pivot To rotate a crosstab such that its row groups become column groups and its column groups become rows. In the Ad Hoc Editor, pivot a crosstab by clicking Pivot Table A table with two physical dimensions (for example, X and Y axis) for organizing information containing more than two logical dimensions (for example, PRODUCT, CUSTOMER, TIME, and LOCATION), such that each physical dimension is capable of representing one or more logical dimensions, where the values described by the dimensions are aggregated using a function such as SUM. Pivot tables are used in Jaspersoft OLAP. Properties Settings associated with an object. The settings determine certain features of the object, such as its color and label. Properties are normally editable. In Java, properties can be set in files listing objects and their settings. Repository The tree structure of folders that contain all saved reports, dashboards, OLAP views, and resources. Users access the repository through the JasperReports Server web interface or through iReport. Applications can access the repository through the web service API. Administrators use the import and export utilities to back up the repository contents. Resource In JasperReports Server, anything residing in the repository, such as an image, file, font, data source, Topic, Domain, report element, saved report, report output, dashboard, or OLAP view. Resources also include the folders in the repository. Administrators set user and role-based access permissions on repository resources to establish a security policy. Role A security feature of JasperReports Server. Administrators create named roles, assign them to user accounts, and then set access permissions to repository objects based on those roles. Certain roles also determine what functionality and menu options are displayed to users in the JasperReports Server interface. Schema A logical model that determines how data is stored. For example, the schema in a relational database is a description of the relationships between tables, views, and indexes. In Jaspersoft OLAP, an OLAP schema is the logical model of the data that appears in an OLAP view; they are uploaded to the repository as resources. For Domains, schemas are represented in XML design files. Schema Workbench A graphical tool for easily designing OLAP schemas, data security schemas, and MDX queries. The resulting cube and query definitions can then be used in Jaspersoft OLAP to perform simple but powerful analysis of large quantities of multidimensional data stored in standard RDBMS systems. Set In Domains and Domain Topics, a named collection of items grouped together for ease of use in the Ad Hoc Editor. A set can be based on the fields in a table or entirely defined by the Domain creator, but all items in a set must originate in the same join tree. The order of items in a set is preserved. .

62

Glossary Slice An OLAP operation for filtering data rows. SQL Structured Query Language. A standard language used to access and manipulate data and schemas in a relational database. System Admin Also called the system administrator. A user who has unlimited access to manage all organizations, users, roles, repository permissions, and repository objects across the entire JasperReports Server instance. The system admin can create root-level organizations and manage all server settings. The default system admin is the superuser account. Topic A JRXML file created externally and uploaded to JasperReports Server as a basis for Ad Hoc reports. Topics are created by business analysts to specify a data source and a list of fields with which business users can create reports in the Ad Hoc Editor. Topics are stored in the Ad Hoc Components folder of the repository and displayed when a user launches the Ad Hoc Editor. Transactional Data Data that describe measurable aspects of an event, such as a retail transaction, relevant to your business. Transactional data are often stored in relational databases, with one row for each event and a table column or field for each measure. User Depending on the context:

A person who interacts with JasperReports Server through the web interface. There are generally three categories of users: administrators who install and configure JasperReports Server, database experts or business analysts who create data sources and Domains, and business users who create and view reports and dashboards. A user account that has an ID and password to enforce authentication. Both people and API calls accessing the server must provide the ID and password of a valid user account. Roles are assigned to user accounts to determine access to objects in the repository.

WCF Web Component Framework. A low-level GUI component of JPivot. For more information, see http://jpivot.sourceforge.net/ wcf/index.html. Web Services A SOAP (Simple Object Access Protocol) API that enables applications to access certain features of JasperReports Server. The features include repository, scheduling and user administration tasks. XML eXtensible Markup language. A standard for defining, transferring, and interpreting data for use across any number of XMLenabled applications. XML/A XML for Analysis. An XML standard that uses Simple Object Access protocol (SOAP) to access remote data sources. For more information, see http://www.xmla.org/ XML/A Connection A type of OLAP client connection that consists of Simple Object Access Protocol (SOAP) definitions used to populate an OLAP view.

63

JasperReports Server Evaluation Guide

64

Index

INDEX
A access grants 35, 36 Ad Hoc Editor how to use 17, 23 not for editing iReport designs 25 page options tool bar icon 20 starting after saving Domain Topic 37 tool bar 19 Ad Hoc reports creating 17 editing 26 formatting 25 laying out 20 saving 19, 25 types 17, 20 Adobe Acrobat 52 alternate group 20 B Boolean operators in Domains 36 C canvas 19 CGP 31 change fields for Domain-based reports 38 chart reports compared with table and crosstab 21 columns column groups 24 column width 26 percent of column group parent 31 summarizing 24 crosstab reports column group parent 31 compared with table 22, 31, 32 exclude 30 expand members 28 keep only 30 row group parent 31 switch to column group 29 CSV format 56 D dashboards editing 15 SuperMart dashboard 14 viewing 14 working with 1315 Data Chooser wizard 35 data formats 27 Data page 35 Display page 36 Domains Boolean comparison operators 36 effect of access grants 35, 36 filters 36 item sets 35 pre-filtering data for a report 36 Topics and access grants 35, 36 using a Domain for a report 35, 39 downloading JasperReports Server 6 Jaspersoft OLAP 6 samples 6 drill-through table options Edit Properties 56 Output as CSV 56 Page Controls 56 E edit Ad Hoc reports 26 dashboards 15 editions of JasperReports Server 7 evaluation licenses activating 89 expiration 7, 9

65

JasperReports Server Evaluation Guide


file names 8 license failed message 9 replacing 9 types 7 Excel 52, 56 exclude 30 expand members 28 exporting OLAP views 52 F fields, changing for Domain-based reports 38 filters filtering items in Domains 36 in Domains 36 Foodmart Sample Analysis View 46 formatting reports 25 G groups, pivoting and switching 20, 29 H heartbeat 6 hiding detail rows 27 I input controls, in the Ad Hoc Editor 20 installation options 6 root directory <js-install> 8 sample data 6 item sets 35 J JasperReports 5 JasperReports samples 910 JasperReports Server 5 K keep only 30 L layouts of reports 20 licenses. See evaluation licenses. M MDX queries 52 MySQL 6 N navigation options Expand All/Collapse All 55 Expand/Collapse Member 54 Expand/Collapse Position 53 Show Source Data 55 Zoom In/Out 54 Zoom Out All 55 O OLAP 45 OLAP tool bar Change Data Cube 51 Cube Options 49 Drill into a Dimension Member 47 Drill-through Operations 50 Edit Chart Options 51 Edit Display Option 49 Edit Output Operations 53 Export to Excel 52 Export to PDF 52 Hierarchical Ascending and Descending 47 Natural Order 47 overview 47 Show Chart 50 Show Empty Rows & Columns 48 Sort Across Hierarchy 47 Sort Option 50 Swap Axes 48 OLAP views folder 45 samples 45 output of OLAP views 53, 56 P pages Data 35 Display 36 Filters 36 Topics and Domains 35, 39 parametrized queries in the Ad Hoc Editor 20 PDF 52 pivoting 20, 29 pre-filtering items in Domains 36 Pre-filters page 36 presentation mode 19, 28 R redo 19 report output 19 reports Ad Hoc 17 adding fields 24 adjusting column width 26 canvas 19 crosstab vs. table and chart 20 designing in the Ad Hoc Editor 17 designing layouts 20 editing names of 25 editing reports created in the Ad Hoc Editor 25 effect of access grants 35, 36 formatting 25 row and column groups 24 running 19, 28 sample Table report 23 saving in the Ad Hoc Editor 19, 25 selecting styles 26 setting data formats 27 summarizing rows and columns 24 table vs. crosstab and chart 20, 25

66

Index
RGP 31 rows percent of row group parent 31 row groups 24 summarizing 24 running reports in the Ad Hoc Editor 19, 28 S sample Topic demo for adhoc 23 samples Foodmart 46 for JasperReports 910 install option 6 OLAP views 45 saving OLAP views 56 security files 36 security files, access grants 35 select fields for Domain-based reports 38 server starting from a browser 6 starting from a file manager 6 showing detail rows 27 slice 30 sorting reports 20 spacer 27 starting the server from a file manager 6 using a URL 6 styles 26 SuperMart 14 switch to column group 29 switching groups 20 T table reports adding fields 24 adjusting column width 26 column groups 24 compared with crosstab and chart 20 designing layouts 20 formatting 25 hiding detail rows 27 sample 23 selecting styles 26 setting data formats 27 showing detail rows 27 sorting 20 spacer 27 summarizing rows and columns 24 Tomcat 6 tool bar 19 Topics and Domains page 35, 39 U undo 19, 33 undo all 20, 33 V version information 7 viewing dashboards 14 fields and data in a Domain 35, 36 views. See OLAP views. W wizard 35

67

JasperReports Server Evaluation Guide

68

Das könnte Ihnen auch gefallen