JASPERSERVER USER GUIDE

RELEASE 3.7

http://www.jaspersoft.com

JasperServer User Guide © 2010 Jaspersoft Corporation. All rights reserved. Printed in the U.S.A. Jaspersoft, the Jaspersoft logo, JasperAnalysis, JasperServer, JasperETL, JasperReports, iReport and Jasper4 products 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 0110-JSP37-10 of the JasperServer User Guide.

2

Table of Contents

TABLE OF CONTENTS
1 Introduction to JasperServer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1 1.2 1.3 Logging In . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 The Home Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Searching the Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 Searching by Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Navigating the Folder Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Refining With Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Changing the Search Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Interacting With the List of Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2

Working with Dashboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.1 2.2 Viewing a Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Creating a Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.3 2.4 Dashboard Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Creating a Simple Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Adding Controls to a Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Adding a Custom URL to a Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Refining a Dashboard’s Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Tips for Designing Dashboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 About Screen Sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Editing a Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Designing Reports for Dashboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3

Running Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.1 3.2 3.3 Running a Simple Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Running a Flash Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Running a Report with Input Controls or Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.3.1 3.3.2 3.4 Simple Input Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Cascading Input Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Scheduling Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

3

. . . . 41 4. . . 80 5. . . 50 Creating an Initial Layout . . . . . . . . . . .1 4. . . . . . . .3 5. . . . . . . . . . . . . . . . . . . . . . . . .4. . . . . 73 Designing an Ad Hoc Report . . . . . . . . . . . . .4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . .5 Simple Report Example . . . . .7 Topics and Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Sorting Tables .4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 4. . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2. .3 4. . . . . . . . . . . . . . . . . . . . . . . . . 62 Working with Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Tables. . .2. . . . . . . . . . . . . . . . . . . . . 78 5 Adding Reports Directly to the Repository . . . . . .6 3. . . 45 Exploring and Analyzing Data in the Ad Hoc Editor . . . 80 Uploading the Main JRXML . . . . . . . . . .1 4. . .7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 5. . . . .1 4. . . . . . . . . . . . . . . . . . . . . . . . . . .4. . . . . . . . . . . . . . . . . . . . .6 4. . . . . . . . . . . . . . . . . . . . 52 Refining the Crosstab . . . . . . . . . . . . . . . . . . . . . . 78 Data Policies . . . . . . . . . . . . . . . . . . . . . . . . .3 3. . . . . . . .1 4. . . . 54 Creating Custom Fields . . . . . . . . . . .4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Uploading a Topic . . . . . . . . . . . . . . . . . . . .4 4. . . . . . . . . . . . . .2 5. . . . . . . . . . . . . .3 4. . . . . . . 38 Running a Job in the Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7. . . .5 4. . . . . . . . . . .1 Understanding the Ad Hoc Editor . . . . . . . . . . . . . . . 41 4. . . . . . . . . . . .3. . . . . . . .1. . . . . . . . . . . . . . . . 35 Changing Job Schedules . . . . . . . .1 4. . . . . . . . . . . . . . . . .2 Overview of a Report Unit . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 The Ad Hoc Editor Tool Bar . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . 38 Specifying Job Recurrence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 4. . . .3 4. . .4 4. . . . . . . . . . . . . . .7 Viewing Scheduled Jobs . . . . . . . .4. . . .3 4. . . . . . 48 Viewing and Running a Report in the Editor . . . .4. . . . . 80 Adding Report Units from JRXML Files . . .2 Limits on Queries . . . . . . . 57 Creating a Report from a Domain . . . . . . . . . . . . . . . . . . . . . . . . . .JasperServer User Guide 3. . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . . 67 Using the Choose Ad Hoc Data Wizard . . .1. . . . . . . . . .5. . . .2 4. . . . . . . . . . . . . . . . . . . . . . . 79 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4 Working with the Ad Hoc Editor . . . . . 50 Additional Features of the Ad Hoc Editor . 45 Formatting the Appearance of a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 4 . . . . . . . . . 63 Working with Crosstabs . . . . 80 Uploading Suggested File Resources . . 38 Stopping a Job from Running . . . . . . . . . . . . . . . . . . . . . . . . . . .2 3. . . . . . . . . . . . . . . . . . . . . . . . . . .5. . . . .6 4. . . . . . . . . . . 51 Focusing on Specific Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Creating Topics from Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Charts. . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3. . . . . . . . . . .4. . . . . . . . . . . . . . . . . . . . . .1. . . . . . . . . . . . . . . . . . . . . . . . . .1 5. . 57 Using Input Controls and Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 4. . . . . . . . 34 Scheduling a Report . . . . . . . .4. . 39 Other Report Parameters . . . . . . . .3 4. . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Defining the Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 4. . . . . . . . . . . . . . . . . . . . 59 Switching Groups . 76 Configuring System-level Ad Hoc Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 5. . . . . . . . . . . . . .4. . . and Crosstabs . . . . . . . . . . . . . . 78 4. . . . . . . . . .3. . . . . . . . . . . . . . . .1 3. . . . . .2 4. . . .4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5 3. . . . 43 Selecting the Content of a Report . . . 65 Choosing Ad Hoc Data From a Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Defining the Data Source . . . . . .4 3. . . . .4. . . . . . .

. . . .4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 6. . .4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Creating Reports in iReport Based on a Domain in JasperServer . . . . . . . .3 The Data and Design Page . 125 6. . . . . . . 117 Example of Creating a Domain . . .1. . . . . . . . . . . . . . . . . . . . . . . . . .4 6. . . . . . . . . . . . .3. . . . . . . . .11 5. . . . . . . . . . . . . . . . . . . . . . . . . .7 6. . . . . . . . . . . . . . . . . . . . . . . . .2 5 . . . . . . . .1. . . . . . . . . . . . . . . 127 Tables Tab . . . . . . . . . . . . . . . . . . . . . . . . 134 Maintaining Referential Integrity . . . . . . . . . . . . . 128 Derived Tables Tab . . . .5 6. . . . . . . . 115 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Managing Resources in the Repository from iReport .1. . . . . . . . . . . . . . .2 6. . . .1 5. . . . . . . . . . . . . . 107 Running a Report from iReport . . . . . . . . . . . . . . . . . . . . . . . . . .10 6. . . . . .9 5. . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . .7 5. . . . . . . . . . . . . 115 6. . . . . . . . . .3 5. . . . . .4. . . . . . . . . . . . . . . . . . . . . . . . . . 126 Designer Tool Bar . 127 Manage Data Source . . . . . . . . . . . . . . . . . . . . . . . 130 Filters Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Adding Input Controls . . . . . . . . . . . . . . .4. . .4. . . . . . . . . .4. . .5 6. . . . . . . . . . . . . . 101 Editing JRXML Report Units . . . . . . . . . . . . . . . . . .1. . . . .12 5. . . . . . . . . . . . . . . 101 Default Fonts in JasperServer . . . . . . . . . . . . . . . . . . . . . . . 136 Fixing Referential Integrity . . . . 116 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 6. . . . . . . . . . . .8 5. . . . . .1 6. . . .5 5. . . . . 108 Creating Chart Themes in iReport . . . . . . . . . 117 Using the Add New Domain Dialog . . . . . . . . . . . . . . . . . . . . . 103 5. . . . . . . . . . . . . . . . . .5. . . . . . . . . . . . . . . 117 Overview of Creating a Domain . . . . . . 90 Completing the Complex Report Example . . . . . . . .8 6. 116 Sample Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 5. . .2. . . . . . . . . . . . . . . . . . . 99 More about Datatypes . . . . . . . . . . . . . . . . . . . . . . . . .4. . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . .4. . . . . . . . . . 127 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Table of Contents 5. . . . . . 102 Using the JasperServer Plug-in for iReport . . . . . . .4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 6. . . .1 6. . . . . . . . .4 Validating the New Report Unit . . . . . . . . . . . .3. . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . .3 5. . . . . . . . . . . . . . . 87 Uploading Undetected File Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 The Resources Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Complex Report Example . . . . . . . . . . 106 Editing a Report in the Repository from iReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5 Editing a Domain . . . . . 103 Creating a Report Unit in the Repository from iReport . . . . . . . . . . . . . . . . . . . . .5. . . . . .3 Domain Use Cases . . . . 131 Display Tab . . . . . . . . . . . . . . . . . . .1 6. .7 Connecting to JasperServer from iReport . . . . . . . . . . . . . . . . . . .4. . . . .4. . .4. . . . . . . 126 Domain Validation . . . . . . . . . . . .1. . . . . . . . . . . . . . . . . . . . . . . . . . .4 Using the Domain Designer . . . . . . . . . . . . . . . . . 136 6.3.2 6. . .2. . . . . . 132 The Properties Table . . . . . .6 5. .4 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Domain Design Validation . .1 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6 6. .10 5. . . . . . .3 6. . . . . . . . . . .4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 6. . . . . . . . . . . . . . . . . . . . . . . . 100 Localizing JRXML Reports . . . .4. . . . . . .4. . . . . . .2. .2.2 5. . 129 Calculated Fields Tab . . . . . . 116 Components of a Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 Introduction to Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 5. . . . 129 Joins Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 6 Creating Domains . . . . . . . . 135 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . 161 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 7. . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 Datatypes . . . . . . . . . . . . . . . . . . . . .5 Locale Bundles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 7. . . . . . . . . . . . . . . .1. . . . . . . . . . . 139 7. . . . . . . . . . . . . . . . 153 The DomEL Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4. . . . . . . . . . . . . . . . .3 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Working With a Design File . . . . . . . . . . . . . . . . . . . . . . . . . . 166 Glossary . . . . .1 8. . . . . . . . .1. . . . . . . . . . . . . . . . . . . . . . . . . .3 7. . 151 Operators and Functions . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Column-Level Security . . . . . . . . . . . . . . . .2. . . . . .2 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .JasperServer User Guide 7 Advanced Domain Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 The Domain Design File . 167 Index . . . .2 Messages . . . 140 Structure of the Design File . . . . . . . . . . 173 6 . . . . . . . . .4. . . . .2. . . . . . . . . . . . . . . . . . . . 150 Resources of a Domain . . . . . . . .1 7. . . . 165 8. . . . . . . . . . . . .1. . . . . . . .5. . . . . . . . . . 141 Uploading a Design File to a Domain . . . . . . .2 8 Utilities . . . . . . 155 7. . . .1 8. . . . . . . . . . . . . . . . 165 8. . .2 7. . . .1. 153 The Domain Security File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 Exporting the Design File from a Domain . . . . . 162 7. . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Defining the Internationalization Keys .2 Row-Level Security . . . . . . . . . . . . . . . . 139 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 Message List . . .5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Field References . . . . . . . . . . . . . . . . 166 iReport Plug-ins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 7. . . . . 162 Creating Locale Bundle Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 JasperServer Plug-in . . . . . . . . .1 8. . . . . . . . . . . . . . . 152 Return Value . . . . . . . . . . . . . . . 166 Domain Plug-in . . . . . . . . .1 7. . . . . . . . . . . . . . . . . . . . . . .

Introduction to JasperServer

1

INTRODUCTION TO JASPERSERVER

JasperServer builds on JasperReports as a comprehensive family of Business Intelligence (BI) 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. JasperServer 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 JasperServer, 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 dashboards that quickly convey business trends. For business intelligence users, Jaspersoft offers JasperAnalysis, which runs on JasperServer. This optional component is described in its own user guide. While the Ad Hoc Editor lets users create simple reports, more complex reports can be created outside of JasperServer. You can either use iReport (or iReport) or manually write JRXML code to create a report that can be run in JasperServer. Jaspersoft recommends that you use iReport unless you have a thorough understanding of the JasperReports file structure. See 5, “Adding Reports Directly to the Repository,” on page 79 and 8.2, “iReport Plug-ins,” on page 166. If you want to extend your knowledge of Jaspersoft BI software, 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. Professional and Enterprise customers can download them freely from the support portal. This chapter contains the following sections: Logging In The Home Page Searching the Repository

7

JasperServer User Guide

1.1

Logging In

To protect the data that you can access through JasperServer, all users are required to log in with a password.
To login to JasperServer:

1.

Enter http://hostname:8080/jasperserver-pro in your web browser (where hostname is the name of the computer where JasperServer is installed). The Login page appears:

Figure 1-1

JasperServer Login Page

2. 3.

Before logging in, you may want to review the links on the login page, such as the link to the Online Help. To login, enter your user ID and password. If you installed the sample data, you can use any of the user names and passwords shown, as well as your own. The default administrator user is jasperadmin and the password is the same; you should change it after installation.

4. 5. 6. 7.

If the Organization field appears, enter the ID or alias of your organization. If you don’t know it, contact your administrator. Click Show locale & timezone. The Locale controls appear in the Login pane. Select your locale and time zone from the drop-downs. Click Login.
If the Change Password feature has been implemented on your system, you can change your password by clicking Change password. For more information about this configuration option, refer to the JasperServer Administrator Guide.

If all information is valid, you are logged in, and JasperServer displays the home page.

1.2

The Home Page

The Home page lets you quickly access the most-used features of JasperServer:

8

Introduction to JasperServer

Figure 1-2

JasperServer Home Page

The Home page for standard users has three icons that are linked to the basic functions of JasperServer:
view your reports – Displays a list of the reports that you can view and run. create a report – Launches the Ad Hoc Editor in which you can design reports interactively. analyze your results – Displays a list of analysis views. Available only if you implement JasperAnalysis.

The three menus in the menu bar and the links to the Online Help and Log Out link in the upper right appear on all JasperServer pages. The search field is described in section 1.3.1, “Searching by Name,” on page 11. The menus offer these options: Menu
Home View

Description
Returns to this Home page. Repository – Displays the repository’s folders and the resources they contain, including reports, report output, data sources, images, and other files used in reports. Access to repository folders and objects is always subject to permissions set by administrators. Reports – Displays all the reports in the repository that you can view, run, and edit, depending on permissions. Same as clicking view your reports. Analysis – Displays all the analysis views in the repository that you can view, run, and edit, depending on permissions. Same as analyze your results. Available only with JasperAnalysis. Messages – Displays system messages, such as an error in a scheduled report.

Create

Ad Hoc Report – Launches the Ad Hoc Editor in which you can design reports interactively. Same as clicking create a report. Dashboard – Launches the Dashboard Designer in which you can lay out multiple reports and their supporting input controls, labels and images.

For administrators, the Home page has additional options and menu items for managing user, roles, organizations, and settings. Administrator functions are documented in the JasperServer Administrator Guide.

9

As shown in Figure 1-3.3 Searching the Repository The repository is JasperServer’s internal storage for all reports. but once you are familiar with the search interface. The repository is organized as a tree structure of folders containing resources. filters. you can often find resources with fewer clicks. JasperServer stores all objects and files in a private database that is otherwise inaccessible. However. Filters for refining results – Provide a quick way to find resources based on other criteria such as type or access time. folders. 10 . By clearing the check box to Include subfolders. Search expression and sorting – An interactive status bar showing the search criteria. Click or right-click a resource in the list to view it or see what actions are available. the repository page has the following features: Search controls – Let you find resources by searching for text in their names or descriptions. Folder tree – Lets you restrict search results to branches of the tree. grouped by resource type when appropriate. you can still browse folder by folder. This release of JasperServer introduces a search interface for the repository. or if Include subfolders is cleared. dashboards. cutting (moving). All of the controls on the repository page make it easy to refine or enlarge your set of results. To access the repository. The new repository interface is designed to help you find resources faster by using intuitive search criteria. In addition. lets you browse individual folder contents. or deleting multiple resources at once. analysis views and related files. and sorting criteria. List of resources – The resources in the repository that meet the search criteria. the repository now provides many other filters such as who modified the resource and when. The following sections explain how to use the search features of the repository page. select View > Repository from any page of JasperServer. Instead of viewing resources by folder alone. Figure 1-3 Repository Page The repository page is also where search results are displayed. as well as lists of reports and analysis views. Bulk operation controls – For selecting and copying. except to administrators. much like a file system. JasperServer remembers your settings so that your most commonly needed resources stay visible when you return to the repository page.JasperServer User Guide 1.

Figure 1-4 Search Field and Search Results JasperServer matches the search term. This mode works best when you clear the search term and select All types so that the results are exactly the contents of the selected folder. Search terms are not case-sensitive. Click a folder name to select it.1 Searching by Name Use the search field at the top of every JasperServer page to begin a search at any time.Introduction to JasperServer 1.3. To cancel search by name. There are two ways to navigate the folder tree: Search – When Include subfolders is checked. allowing you to search by name or by resource type across the entire repository or a specific branch of it. but not necessarily in order. click the icon in the search field to clear the search term and update the search results according to the remaining settings. even word fragments. When you click Search. JasperServer does not match folder names or display folders in the results. By default. Browse – Clear the box next to Include subfolders to restrict the scope of any search to the resources directly contained in the selected folder. Use the icons to expand the tree and view all nested folders. This mode is most useful in combination with other search settings.2 Navigating the Folder Tree The folder tree shows the folders in the repository that your user has permission to view.3. Do not enter quotes around terms or any symbols between terms. 11 . If you enter multiple words. select a folder or filter as explained in the following sections. selecting a folder searches the entire branch of the tree starting at that folder. anywhere it appears in the display name or description string of a resource. it opens the repository page with the same search term and displays the results. This mode mimics a file system browser. the search uses the default settings: Include subfolders Start at the top-most folder visible to your user Filter for visualization types only Sort alphabetically by name To refine the search. letting you explore folder by folder. If you enter a search term and click Search on the repository page. Include subfolders is checked. Figure 1-4 shows the results of a search for the term “account” in the sample data. the search uses the current settings on the page. JasperServer searches for resources that match all words. If you enter a search term and click Search at the top of any other page. 1.

Displays only Domains. but also to resources that are included in reports such as images. Selects only resources that have been last modified by the currently logged in user. This filter not only applies to visualization types. images.3. Only reports that have scheduled jobs. etc). as a result. 12 . and analysis views. For example. these filters can help you find your most recently viewed reports. Domains. This includes input controls. including today. Displays only data sources. data types. and data sources. including today. Displays only reports. both JRXML reports and Ad Hoc reports. All times are relative the user’s effective timezone: Filter Setting Any time (default) Today Yesterday Past week Past month Description Does not take into account the last modification time of a resource. PDF. dashboards. The default filter that includes reports. Displays only the output from reports that were scheduled or run in the background. You can set each filter independently of the others. Selects only resources that have been run and viewed by the currently logged in user. The user filter has the following settings: Filter Setting Changed by anyone (default) Changed by me Viewed by me Description Does not take into account user access to the resource.3 Refining With Filters The filters below the folder tree let you refine your search using several other resource attributes. The access time filter has the following settings. Resources viewed or modified since the previous midnight. These are the resources that can be viewed by anyone who has read access. Displays only dashboards. The resource type filter has the following settings: Filter Setting All types Visualization types (default) Reports Report outputs Dashboards Analysis views Domains Data sources Other types Description Does not take into account the resource type. dashboards. Displays all types except reports. The scheduled report filter has the following settings: Filter Setting Any schedule (default) Scheduled Description Does not take into account the existence of scheduled jobs. views. Report output can be any of the supported export types (HTML. Displays only analysis views (if you implement JasperAnalysis). Resources viewed or modified during the past 30 days.JasperServer User Guide 1. and other files that only administrators may add to the repository. report output. Resources viewed or modified during the previous day ending at midnight. Resources viewed or modified during the past 7 days. every type is displayed.

Introduction to JasperServer Filter Setting
Scheduled by me Not scheduled

Description
Only reports that have jobs scheduled by the currently logged in user. Only reports that do not have scheduled jobs, and all other resource types.

1.3.4

Changing the Search Expression

Above the list of resources, the search expression shows you all of the criteria that contribute to the search. It contains the following elements, always in this order from left to right: The search term, if any, or the word All. The folder selected, if any. Any and all filter settings. The search expression provides a quick visual summary of the search criteria for the list of results that appear right below it. The search expression is also interactive, allowing you to easily remove some of the filters. It supports the following actions: If there is more than one filter, clicking any one of them removes all those to the right of it. If there is a folder selected that is nested more than one level, you can click any parent folder to select it instead. You can click the search term or the word All to remove any and all folders and filters to the right of it.
To remove the search term, click the icon in the search field. The search expression then displays All.

After any one of these actions, the search controls displayed on the left are refreshed, and the results are updated. To the right of the search expression, the sort criteria let change the order of the results. The following sorting is supported: Click Name to sort alphabetically (A at the top). This is the default sort order. Click Modified Date to sort by the latest modified time and date (most recent at the top).

1.3.5

Interacting With the List of Resources

The list of resources is always the set of results determined by the current search criteria. Because search results can be quite large, the list of resources has two modes: Multiple Types Condensed – When there are more than two types of resources listed, the number of resources of each type is limited to a certain number, by default 5. When there are more resources of that type, there is a link to see all of that type. You can quickly scroll through the condensed results and find the type of resource you want. Click the See all... link to display the results of that type. Single Type Expanded – When there is a single type of resource in the results, either by circumstance, by clicking a See all... link, or because a single-type filter is selected, all resources are listed, with a scroll bar if necessary. If the list of results is still too long, enter or refine the search term, or select additional filters.
When you click See all... for a type that has a single-type filter, for example Domains, that filter is automatically applied. The filter display and the search expression refresh to reflect this. Use the search expression to remove the filter if necessary. When no filter exists for that type, for example input controls, the filter display and search expression are not updated. Use the type filter drop-down to change the types displayed.

Once the resource or resources you want are displayed, there are several ways to interact with them: Click the name of a report or dashboard to run and view it. Right-click the name of a resource to access other operations on the context menu, for example Open in Designer... Items appear on the context menu according to the permissions granted to your user. Check the box beside the resource name or click anywhere in the row to select it. Check several boxes or Control-click anywhere in the rows to select multiple resources. You can drag and drop selected items to move them or press Control while you drag and drop items to copy them. When you have multiple resources selected, you can also used the bulk operation buttons above the results list: Copy, Cut (move), or Delete. You must have the appropriate permissions on the selected items and the target folder to move, copy, or delete resources. For more information about permissions and repository operations, see the JasperServer Administrator Guide. 13

JasperServer User Guide There are two icons that may appear between a report name and its check box: + indicates that the report has saved options for its input controls. Click the + icon to list the saved options below the report. For more information, see section 3.3, “Running a Report with Input Controls or Filters,” on page 30. indicates that the report has been scheduled to run or that it is currently running in the background. Click this icon to view the list of jobs scheduled for the report. For more information, see section 3.4, “Scheduling Reports,” on page 34.

14

Working with Dashboards

2

WORKING WITH DASHBOARDS

A dashboard displays several reports in a single, integrated view. A dashboard can also include input controls (that determine the data displayed in one or more frames), other dashboards, and custom frames that point to URLs to any 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 Creating a Dashboard Editing a Dashboard Designing Reports for Dashboards 15

Click the name SuperMart Dashboard in the list of results. If a dashboard includes a Print View button. depending on your web browser. To view a dashboard: 1. the changes take effect immediately when you change the input control’s value. the repository includes the /Dashboards folder where dashboards might be saved. The search results are displayed in the repository. click it to display the dashboard without JasperServer’s header and footer.JasperServer User Guide 2. If one of the frames in a dashboard does not refer to an input control. controls appear for that individual report. 3. Only reports that refer to the input control reflect the change. When you mouseover each report.1 Viewing a Dashboard You can view an existing dashboard if you have the proper permissions. When done. An input control may appear as a text field. Alternatively. or a calendar icon. this also opens your browser’s Print window. Keep these points in mind when viewing a dashboard that has input controls: Figure 2-2 SuperMart Dashboard Example 16 . that frame does not update when you change that input control’s value. Click Reset to set the input controls to the last values saved and return the dashboard to its initial view. enter supermart and click Search. 2. In the Search field. Click to refresh the report’s content. Select new values from the Start Month and End Month drop-downs and click Submit to change the data displayed. JasperServer displays the dashboard. 6. 5. If the dashboard does not include a Submit button. a drop-down. which includes three reports. click View > Repository to go back to the repository page. multi-select list box. and click to open the report in a new window. right-click the name and select View from the context menu. 4. a check box. By default. All three reports update to display data for the months you indicate.

1 Dashboard Overview A dashboard can include any of the following: Reports in the repository. the font size in the label is fixed. your dashboard will automatically update to reflect the branding change. Print View. JasperServer automatically adds a text label for it. When you add an input control to the dashboard. the corresponding control is automatically mapped to each of those reports when you add the input control to the dashboard. For example. Use free text items to add titles and instructional text to your dashboard. Standard controls: Submit. if multiple reports include the same parameter. Displays the dashboard without buttons or JasperServer’s header and footer. If the dashboard doesn’t include a Submit button. Resizing this type of item changes the size of the font in the label. Controls can also be manually mapped to custom URL frames. Controls (Single or Multiple). though a user’s permissions in the repository may limit the content they can add and the location where they can save it. JasperServer dashboards can point to any web content. When you add a control. JasperServer refreshes these reports to display the new set of data. and (depending on your browser) opens your browser’s Print window. Reset. Special content: Custom URL. JasperServer automatically adds a label for it as well. A free-form text entry field.2. Single controls are those that correspond to parameters included in a single report. Resets the values of the input controls to the last value selected when the dashboard was saved. changes to input control values are reflected immediately.Working with Dashboards 2. The input control can be mapped to one or more frames. Text Label. you might include a frame that points to the logo on your corporate website. For example. Applies the values in the dashboard’s input controls to the reports that refer to each input control. so this feature has nearly-limitless possibilities. Any URL-addressable web content. you can add them to the dashboard. 17 . This section includes: Dashboard Overview Creating a Simple Dashboard Adding Controls to a Dashboard Adding a Custom URL to a Dashboard Refining a Dashboard’s Layout Tips for Designing Dashboards About Screen Sizes 2. If a report on the dashboard refers to input controls or filters. A label for an input control. A more complex example is described in “Creating a Dashboard” on page 17. Free Text. when that logo changes. Multiple controls are those used by more than one report. Resizing this type of item only changes the size of the label itself.2 Creating a Dashboard Any user can create a dashboard.

7. the user may have to scroll across or down to see the entire dashboard. 2. Hover your cursor over the bottom of right-hand edge of the frame containing the Freight report. Click Preview. 4. click the arrow to the left of the Accounts report to move the report to the dashboard area. The report appears in a frame in the upper left corner of the dashboard area. Adjust the width and height of the frame to display the default data returned by the Freight report. To create a simple dashboard: 1. To add a report to a dashboard.JasperServer User Guide Figure 2-3 List of Available Content in the Dashboard Designer 2. the dashboard is wider than the specified screen size. and click the arrow to the left of the Freight report to move the report to the dashboard area. In the Available Content list. you must have permission to view the report. The end user view of the dashboard appears. JasperServer indicates this by displaying a red guide line that appears over the Accounts report. navigate to the /Reports/Samples folder.2. see 2. 6. For more information. In fixed sizing mode. “About Screen Sizes. JasperServer allows you to save the dashboard even when its contents hang over the edge of the dashboard area. 5. With both frames sized for their reports.2. This is because the dashboard area is meant as a guide: if the content fits in the dashboard area without showing the red guideline.” on page 24. depending on your browser.2 Creating a Simple Dashboard This section walks you through the creation of a dashboard. Resize the frame containing the Accounts report to fit its width. it may appear in a new tab or a new window. you can be sure that a user with the selected resolution will be able to view the entire dashboard without using the browser’s scroll bars. displaying the list of available content and the dashboard area. In the Available Content list. Next to it. 18 . JasperServer shows an outline that indicates where the next frame will be added if you click a field’s arrow. if your content hangs over the edge.7. 3. when your cursor changes to a resizing icon ( ) click and drag the edge of the frame to resize it. The dashboard designer appears. Click Create > Dashboard.

Working with Dashboards 8. Return to the designer and click Save. You are prompted for the name and location where the dashboard should be saved. By default, the dashboard is saved in the /Dashboards folder with the name New Dashboard. 9. Accept the default location, and specify the name Freight Dashboard. 10. Click Save. The dashboard is saved to the repository.

Figure 2-4

Creating a Simple Dashboard with Sample Reports

2.2.3

Adding Controls to a Dashboard

Since the Freight report refers to input controls that determine the data it returns, those controls can be added to the dashboard.
To add controls to the dashboard:

1. 2. 3. 4.

If it isn’t open, locate the Freight Dashboard created in section 2.2.2, typically in the /Dashboards folder. Right-click the dashboard name and select Open in Designer... from the context menu. The Freight Dashboard appears in the designer, as shown in Figure 2-4. In the Available Content list, open the Special Content > Single Report Controls folder. The three input controls associated with the Freight report appear. Click the arrow to the left of the Country input control to move the control to the dashboard. The Country input control and its label appear in the upper-left corner of the dashboard area, nudging the Freight report down to accommodate the new control. If you wanted to place the input control in another location, you could drag it from the Available Content list to the desired location. Note that the input control and label are independent; you can delete one or the other and resize them individually.

5. 6. 7. 8. 9.

Select a new value from the Country input control, and notice that the data displayed in the Freight report changes; the Account report does not update because it does not refer to an input control named Country. Use the arrows to add the OrderID and RequestDate controls, as well. Click just above and to the left of the Country label, and drag the mouse to draw a selection rectangle. Draw the rectangle across the three input controls and their labels to select them. Click one of the selected input controls, and drag down to move them below the Freight report’s frame. Draw a selection rectangle to select the OrderID input control and its label, and drag them directly beneath the Country input control.

19

JasperServer User Guide 10. Draw a selection rectangle to select the RequestDate input control and its label, and drag them directly beneath the OrderID input control. 11. Click the OrderID label, and select Edit Label form the context menu. The label becomes editable and its text is selected. 12. Type Order and press Return. 13. Change the RequestDate label to Date. 14. In the Available Content list, navigate to Special Content > Standard Controls, and drag the Submit and Reset buttons so they are underneath the input controls in the dashboard area. By default, a dashboard automatically updates when you change the values in its input controls. When the dashboard includes the Submit button, JasperServer doesn’t update the dashboard until you click the Submit button. 15. Click Save. The dashboard is saved to the repository.

2.2.4

Adding a Custom URL to a Dashboard

You can create a frame that displays any URL-addressable content. Such mashups can help you leverage data from many sources in a single, integrated view.
To add a custom URL:

1. 2. 3.

If it isn’t open, locate the Freight Dashboard saved in section 2.2.3, typically in the /Dashboards folder. Right-click the dashboard name and select Open in Designer... from the context menu. The Freight Dashboard appears in the designer, as shown in Figure 2-4. In the Available Content list, select Custom URL (in the Special Content folder), and drag it to the lower-left corner of the dashboard. You are prompted to enter the URL of the web page you want the frame to display. In the URL field, enter news.google.com. Click the check box next to Country to select that input control, and in the URL Parameter Name field, replace the default text (Country) with the letter q. Note that this field is case-sensitive. This tells JasperServer to map the dashboard’s Country input control to Google’s q (query) parameter. Now, when you select a value in the Country input control, JasperServer passes that value to news.google.com, so that the news displayed in the frame relates to the selected country. Note that the other two input controls also appear in the URL definition window; if news.google.com accepted a parameter that was compatible with these input controls, you could check their check boxes to associate the URL with these input controls, as well.

4. 5.

Figure 2-5

Defining a Custom URL Frame

6.

Click OK to close the custom URL dialog.

20

Working with Dashboards 7. 8. 9. Select a new value from the Country input control, click Submit, and notice that the news displayed in the custom URL frame changes. Resize the custom URL frame so that only the first article’s synopsis appears. Drag the custom URL frame to the left so that its left edge is aligned with the right edge of the input controls. The menu expands to display options for how frequently JasperServer should refresh the frame’s content. Smaller values make JasperServer update the frame more often. By default, a frame is never automatically refreshed (that is, its Autorefresh Interval is set to Manual Only). 11. Click 5 Minutes beneath the Auto-refresh Interval on the context menu. Auto-refresh only affects the end user view of the dashboard. In the designer, the frame is never auto-refreshed. 12. Click Save. The dashboard is saved to the repository.

10. Click the custom URL frame, and click Auto-refresh Interval on the context menu.

2.2.5

Refining a Dashboard’s Layout

Once your overall layout is complete, you can refine the look and feel of your dashboard.
To refine the dashboard’s layout:

1. 2.

If it isn’t open, locate the Freight Dashboard saved in section 2.2.4, typically in the /Dashboards folder. Right-click the dashboard name and select Open in Designer... from the context menu. The Freight Dashboard appears in the designer, as shown in Figure 2-4. Note the gap at the top left when you moved the input controls to a new location, as described in 2.2.4, “Adding a Custom URL to a Dashboard,” on page 20.

3. 4.

Click in the upper-left corner and draw a selection rectangle around all the frames, click one of the selected frames, and drag up to reduce the unused space at the top of the dashboard. Click Preview. The end user’s view of the dashboard appears; if the dashboard is already open in your browser, JasperServer updates that page rather than opening a new window or tab.

5. 6. 7. 8. 9.

In the Country field, select a new value. Note that the Freight report and custom URL frames do not update; this is because the dashboard includes the Submit button. Return to the dashboard designer and, in the dashboard area, hover your cursor over the Submit button, and when the hover border appears, click it. From the context menu, click Delete Item. The Submit button disappears. Reposition the Reset button to so it’s centered in the available space. Click in the Dashboard Selector, and select Add Title Text in the context menu. The title becomes editable.

10. Enter Orders and Current Events by Country. 11. Click Preview. The end user view of the dashboard appears. 12. Change the value in the Country input control, and note that the dashboard reflects the change immediately. 13. Return to the dashboard designer and click Save. The dashboard is saved to the repository.

21

open it in the designer and click Save As on the Dashboard Selector context menu. the context menu only includes options that apply to all the selected items. To create a new version of a dashboard. depending on whether you selected a button or a frame.6 Tips for Designing Dashboards When you are creating or editing a dashboard. so long as this doesn’t create a circular dependency. For example. display the list again by clicking . Put another way. Click to hide the Available Content list. keep these tips in mind: You can drag items from the Available Content list and drop them to add them to the dashboard. the controls are also deleted. Drag an item from the Available Content list and drop it on an existing frame to replace the existing content.JasperServer User Guide Figure 2-6 Dashboard with Sample Reports and Special Content 2. When you delete a report with input controls from the dashboard. it might include the Delete Item or Delete Frame option. when you select multiple frames. such as Hide All Scroll Bars and Auto-refresh Interval. if you select a frame and a button. JasperServer shows the default URL without passing the parameter. You can’t resize buttons or input controls.2. This disables the default snap-to-grid behavior. 22 . Press the Ctrl key to move the selected content a single pixel at a time. the context menu includes several options that can apply to frames. Delete them manually. The context menu changes depending on your selection. Use Ctrl-click to select multiple frames and items in the dashboard area. you can’t add a dashboard to itself. You can use the arrow keys to move selected content one grid space at a time. For example. If a custom URL frame is mapped to one of the input controls that was deleted. Press the Ctrl key while dragging or resizing items and frames for smoother cursor movement. but their labels remain. or use the Available Content context menu Add to Dashboard option. A dashboard can include other dashboards. Use the Hide Scroll Bars option on the frame context menu when you can size the frame to exactly match its content. This is especially helpful for charts and small crosstabs. the context menu only includes the Delete Items option. If you select multiple items or frames.

The dashboard designer may seem unwieldy if you design for a screen size as big as or larger than your own.7. Adding the same dashboard twice to a parent dashboard can create a compelling comparison. horizontal scrolling can be awkward. When you drag the edge of one frame. see 2. Now. then create a dashboard that includes those dashboards. However. in particular. JasperServer assumes that you want to use the HTTP protocol for custom URL frames. and then select Use Proportional Sizing from the Dashboard Selector context menu. JasperServer uses the FILE protocol. If you have multiple reports that refer to the same input control. users can set the input controls separately for each set of reports. it is deleted from the dashboard.2. the other frames change size as well. You can also design the dashboard for your resolution.Working with Dashboards If a report displayed in a dashboard is moved to a new location in the repository or if it is deleted entirely. In this case.” on page 24. Figure 2-7 A Dashboard Comparing Data from Two Countries 23 . Select multiple frames to change their sizes all at once. This is helpful for including images. but you do not want them to be controlled by a single input control. “About Screen Sizes. you can specify that it use the FILE protocol by entering file:// at the beginning of the value in the URL. create two dashboards that each refer to the input control. Not all web pages support the technology underlying JasperServer’s dashboards (IFrame). In such cases. or using a larger monitor. the URL frame’s behavior may be inconsistent. and looks for the file you specify in the JasperServer’s WEB-INF directory. Try hiding the content pane. By default. For more information.

4 Designing Reports for Dashboards When defining reports for a dashboard. The designer appears. since dashboards typically contain multiple reports. Select View > Repository and search or browse for the Dashboard you want to modify. dashboards support proportional sizing. 24 .7 About Screen Sizes When you create a dashboard. “Creating a Dashboard.JasperServer User Guide 2. By default. Note that frames do not resize automatically in the designer. its frames resize relative to the size of the browser window.2. By default. To edit a dashboard: 1. removing. its margins are stripped. When a dashboard uses fixed sizing.” on page 17. When you are satisfied with the dashboard. Put another way. In particular. When an Ad Hoc report is displayed on a dashboard. or dragging content. 2. 4. you can set the screen size to change the dashboard area to match a particular screen resolution. from the context menu. Edit the dashboard by adding. However. you can design table reports that work well in the dashboard. resizing. Right-click the dashboard and select Open in Designer. your reports shouldn’t be too wide. If a dashboard that uses proportional sizing is bigger than the specified screen size. The reports should be small.3 Editing a Dashboard You can edit a dashboard if you have the proper permissions. its frames do not resize automatically when the window size changes. 5. which are available under the Screen Size option in the Dashboard Selector context menu. For more information about working with dashboard content. proportional sizing is only evident in the end user’s view of the dashboard. This may result in a change to the shape of the frames. the repository includes the /Dashboards folder where you can store your dashboards. you can set the dashboard area to 800 by 600 pixels to emulate your end users’ screen size. if you are designing a report for end users who use laptops that only display a screen resolution of 800 by 600 pixels. To create a new version of the dashboard. the dashboard designer supports five standard screen resolutions. see section 2. click Save. and specify a new name. switch to proportional sizing before you save. select Save As from the Dashboard Selector context menu. In addition to fixed screen resolutions. Jaspersoft resizes the frames so that they all appear in the window without requiring the user to use the browser’s scroll bars. rather than using fixed values.2. keep these hints in mind: Charts and small crosstabs are best suited to dashboards. For example. 2. but you can’t make them bigger. 2. In proportional sizing. when the dashboard is viewed. The grid turns red when any content hangs over the edge of the dashboard area. note that: You can resize free text items to a smaller size. which calculates frame sizes using percentages of the total window size. then. or when you select a new screen size in the designer. displaying the dashboard.. as horizontal room is always at a premium in a dashboard.. when a dashboard uses proportional sizing. you don’t need to strip the margins manually when designing the report. Jaspersoft recommends that you design dashboards using fixed sizing mode. 3. Such reports tend to be very narrow and typically refer to input controls to limit the number of rows they return.

you might have a query-based list of employee names that can be used in both sales reports and human resources report.4. the value of the input control must also be a value the URL can accept. give it a meaningful name that can be reused in other reports. For example. in this case. their input controls appear as Special Content in the Available Content list. If you want to pass a value to an external URL. Storing such input controls in the repository encourages their reuse when reports are designed and added to the repository. the name of the parameter may be case-sensitive. It is essential that the input control pass data that the URL can accept. Beyond these requirements. the value you enter in the URL Parameter Name field is also casesensitive. when two reports that include this parameter are added to the dashboard. JasperServer may be unable to retrieve the correct data from the external URL.Working with Dashboards If you want a single input control on the dashboard to control the data displayed in multiple reports.2. the URL Parameter Name you specify for the input control must match the name of a parameter that URL can accept. Otherwise. Note that this is the case for Google’s q parameter that is referenced in 2. 25 . When defining a parameter in a report. the target URL is likely to have requirements and limitations.” on page 20. “Adding a Custom URL to a Dashboard. For example. the reports themselves need parameters with the same name as the input control. If a report’s input control is set to display as a radio button set. Then. In addition. it is instead displayed as drop-down.

JasperServer User Guide 26 .

If you know the name of the report you want to run. you can enter its name in the Search field and click Search to locate it in the repository. You can also search on partial names or for words in the report’s description. “Searching the Repository. refer to section 1. This means you can view other users’ reports. To run a report: 1. 27 . as in this report that simply lists accounts. The Repository page appears with a filter showing all reports that your user account has permission to view. so long as you have proper permissions.” on page 10.1 Running a Simple Report Some reports are simple tables with rows and columns of data. On the Home page. The tutorials in this section and throughout the user guide assume that you have installed the sample data that is provided with JasperServer.3.Running Reports 3 RUNNING REPORTS JasperServer makes it easy to run reports that help you understand and present your data to their best effect. For more information. click view your reports. This chapter contains the following sections: Running a Simple Report Running a Flash Chart Running a Report with Input Controls or Filters Scheduling Reports 3.

Click the name Accounts Report to run the report. JasperServer displays a message indicating that it is retrieving the data. Alternatively. The report appears. To view and save the report in other formats. or CSV). right-click anywhere in the report row and select View from the context menu. click the Back icon . click an export icon: . 2. XSLX. You can view the file in its application and save it. Use the arrows at the top of the page to view the whole report. 4. Microsoft Excel (XLS. OpenDocument Text (ODT).JasperServer User Guide Figure 3-1 Viewing All Reports in the Repository Use the scroll bar at the right of the page to view the entire list of reports. containing accounts and contact information. Figure 3-2 Output of the Accounts Report 3. If necessary. Adobe Flash (SWF). you can click Cancel to stop the report from running. and OpenDocument Spreadsheet (ODS). Microsoft Word (DOCX or RTF). To return to the reports listing. The output can be exported to a file in these formats: Adobe Acrobat (PDF). 28 .

These components are based on Fusion libraries and generate Flash output that is embedded in the HTML and PDF output. and interactive reports: Maps Pro – Color-coded maps covering all countries and regions of the globe. The reports launch in the same manner as any other reports. JasperServer Professional and Enterprise editions include the Maps Pro. see chapter 5. and Gantt charts. Widgets Pro – Non-standard charts such as gauges. and Widgets Pro elements in JasperServer. To upload JRXML reports. spark lines. Charts Pro. When a report containing a Maps. However.” on page 79. funnels.2 Running a Flash Chart This release of JasperServer supports Flash charting. mouseover any of the states on the map to see the full state name and. “Adding Reports Directly to the Repository. Flash charts are JRXML reports that are created in iReport Pro and uploaded to the repository as a report unit. the value for that state. For information about creating flash charts. The sample data installed with JasperServer includes a very simple example of each Flash chart: 1. Charts. Make sure Flash is enabled in your browser. To view Maps. Flash must be installed and enabled on your browser. The repository displays the search results.Running Reports 3. or Widgets Pro element is exported in a format other than HTML or PDF. To interact with the map in JasperServer. Flash charts can be animated as they are drawn. then click any of these report names. and press Enter or click Search. you must use a Flash-enabled PDF viewer such as Adobe Reader 9. From any page in JasperServer. Charts. JasperServer cannot create Flash charts. the space used by the element remains blank. including Flash Chart Report. To view these elements in PDF output. see the iReport Ultimate Guide. 29 . Flash Map Report. animated. type flash into the search field. Charts Pro – Standard and stacked charts with animation and interactivity. giving them greater visual appeal. 2. Flash charts are also interactive. a new feature implemented in JasperReports Pro. as explained in the following examples: Figure 3-3 Output of the Sample Flash Map Report The color-shaded states correspond to value ranges given by the legend. when data exists. and Flash Widget Report. and Widgets Pro component libraries that create visually appealing.

The report appears. You can then display the controls and run the report with new values. they are rendered as input controls when running the reports based on the Domain Topics. text appearing in the report can be localized. Request Date. When filters are defined in Domain Topics to be prompted. or Widgets Pro components can present several layers of information in compelling ways. 2. In the Search field. 3. enter freight and click Search. Chart elements. Charts. The search results are displayed in the repository. and widget segments are clickable and can be linked to more detailed reports. Flash charts have many features that are not illustrated in these sample reports. The Open Flash Charts Report listed in the search results is an experimental report that uses a different Flash library. When you view the report at first. you may need to enable links in order for them to work.3. Click the name Freight Report in the list of results. 3. even map labels. the report runs with default values. and Widgets Pro components are fully supported by Jaspersoft. and Order ID. see the iReport Ultimate Guide. map regions. but they show how Maps. For more information about uploading resource bundles for Maps.JasperServer User Guide Figure 3-4 Output of the Sample Flash Widget Report To interact with the pyramid widget in JasperServer. or Widgets Pro components. Charts Pro. These are simple examples with unrealistic data. click a segment to separate it from the others.1 Simple Input Controls The Freight Report example has three input controls: Country. Depending on the security settings in your Flash player.3 Running a Report with Input Controls or Filters Input controls and enable you to select the data returned when you run the report. 30 . The Maps Pro. To run a report with simple input controls: 1. Charts. among them: As with any JRXML report.

Figure 3-6 Setting Country = USA in the Report Options Dialog The report appears with USA as the country instead of Mexico. This allows you to interact with the report and easily find the data you need. and the postal codes and customer IDs are for the US. the country is Mexico. All order IDs are above 10600 and all order dates are after June 1. 1997. 31 . Figure 3-7 Shipping Report With Country = USA You can also click Apply in the Report Options dialog to refresh the report but keep the dialog open. . click the Report Options icon The Report Options dialog appears. and so the postal codes and customer IDs are for Mexico. and click OK. To run the report with other values. 3.Running Reports Figure 3-5 Shipping Report with Country = Mexico by Default In the report as it was saved. 4. Select USA in the Country field.

. then click Save Values. enter USA as the new name. and click OK. You can add a description to the saved version of the report. Click the + icon next to the Freight Report to display all saved versions of the report. To make USA the default country. in this case Mexico. 32 . You are prompted to name the new set of default values. click to display the Report Options page again.JasperServer User Guide 5. 8. from the context menu.. the values of the report options revert back to the original values stored in the report. You can open the report directly with the saved values for the input controls by clicking on the name of the saved version. 7. Figure 3-8 Naming the Saved Values The Report Options dialog now has a drop-down list showing USA as a set of saved values. Click the Back icon to display the search page. Right-click the saved version and select Properties. Figure 3-10 Report With Saved Values in the List of Reports 9. Figure 3-9 Report Options With a List of Saved Values If you click Reset. In the window. 6. 10. The new USA version of the sample report is listed beneath the report’s original version.

To run a report with cascading input controls: 1.3. Select a different state. Mexico. The other fields are automatically updated to reflect the state and names associated with Mexico in your data. Click the name Cascading multi select example report in the list of results.9. Instead of running the report. see 5. where the choice for one input determines the choices for the other input. The following example also demonstrates required inputs. Enter a description and click OK. Reports can also be designed with cascading input controls. In the Search field. Cascading input controls are implemented as queries that access your database to retrieve the new values.2. 33 . For more information. you can click Cancel and select different values. Figure 3-12 Adding a Description to a Saved Version of a Report 3. For example. for example Guerrero. 4. in which case you must enter values before running the report. 3. Select a different country in the first field.Running Reports The Resource Properties dialog appears. “About Cascading Input Controls. Figure 3-11 Adding a Description to a Saved Version of a Report 11.7. The search results are displayed in the repository. every value chosen is independent of the others.2 Cascading Input Controls With simple input controls. in this example. JasperServer displays an activity monitor while the query is running. enter cascading and click Search. The new description will appear in the repository. and in the case of long queries. 2. you are prompted to enter new values for them. the choice of a country determines which states or regions are available to choose from.” on page 98.

34 . Only the user who created the schedule or a user with the administrator role can change or delete it. locate the report in the repository. Owner – The user who created the job. The chosen name is listed at the top of the report. For example. Scheduled reports run as the user who defines the job (see 3. Permission to edit a schedule is simpler.4.4. as well as data sources authenticated by security frameworks other than the Acegi framework used by JasperServer (see the JasperServer Administrator Guide).1 Viewing Scheduled Jobs To view the jobs that are currently scheduled for a report. and any user that receives the report can view all the data regardless of the user’s access restrictions. right-click it and select Schedule. It is up to the user to configure whatever is passed to JasperServer. 3. 5. If a report does not have the schedule icon. “Scheduling a Report. Figure 3-13 Jobs Scheduled Page for a Sample Report Standard users see only the jobs that they have defined themselves. Joe User has scheduled three jobs for the Freight Report. Gloria has access only to inventory data from the Southeast US region. reports with scheduled jobs have a small icon beside the report name. use controlclick to select multiple values in each lists. some cannot. The country and state inputs are defined as multi-select. If the report’s data source is subject to access permissions. “The Domain Security File. You can also have the output sent to you and others as email attachments. the other users need to schedule the report themselves. Reports that she schedules only show data from that region even when the report is viewed by users in other regions. In the figure above. Be careful when you schedule a job as an administrative user with no data restrictions. Click OK to run the report with your chosen values. Standard data sources in the repository are not subject to access permissions.2. The scheduled jobs page appears for the chosen report. In these latter cases. You can view the output there. The list shows the following information for each job: ID – The internal ID number of the job. from the context menu. To see the data for their own regions. Some data sources can pass access grants along with their data.4. the report contains the data that the user has permission to see. The report creates a list of all account names in the chosen states of the chosen countries. administrators see the jobs defined by all users. Any number of jobs can be scheduled for the same report. Click the icon to see the jobs scheduled for the report. your options vary depending on whether the report has scheduled jobs: In the repository. but Domains are (see 7.4 Scheduling Reports The report scheduler enables you to run reports at prescribed times.. External data sources might be subject. The other values are updated to reflect your choices. Jobs that you define in the scheduler run the reports in the background and save the output in the repository.” on page 35).JasperServer User Guide The names field updates to reflect the choice of state. JasperServer returns whatever data is passed to it from the data source.. Label – A short description provided when creating the job. 3. The report will contain all requested data in the data source.” on page 155). accompanied by a link to edit the job details.

4. allowing you to continue working in JasperServer. JasperServer deletes completed jobs automatically. for example to see if a job has finished running. Complete – The job is complete. or from any page. 3. click view your reports. “Running a Job in the Background. Buttons on the page include: Button Back Schedule Job Run Now Refresh Remove Description Returns the user to the repository manager or the list of reports. Scheduling a Report To schedule a report: On the Home page. Next run time – The next time the report will run.. Figure 3-14 Job Page for Scheduling a Report 5. Deletes all the jobs selected with a check mark. but an error occurs while it runs.Running Reports State: Normal – The job is scheduled. Refreshes the list of jobs. Last ran at – The last time the report was run. The Scheduled Jobs page appears. 6. The description is optional. This does not include cases where the job is successfully triggered. See section 3.4. or delete. 2. Checkbox – Select for removal.” on page 39. click the small icon beside the report name.2 1. from the context menu. Click Next. When a job is deleted while it runs. Error – The scheduler encountered an error while scheduling or triggering the job. the report is completed before the job is deleted. Opens the Job Details page to define a new job.4.6. click View > Reports. enter a name for the job. as shown in Figure 3-13 on page 34. In the Label field. The Job Details page appears. Runs the report in the background. 35 . Use the search field or browse the list of reports to find the report you want to schedule.. modify. If the report already has a schedule that you want to add. Right-click the report and select Schedule. 3. Running – The job is currently running. Click Schedule Job.

Click Next.” on page 38.JasperServer User Guide The Schedule page appears. the time zone you entered at log in. Set the following schedule attributes: Time Zone – Specify the time zone in which you wish to define the schedule. The fields that appear are the input controls defined for the report you are scheduling. additional controls appear on the page. the Parameter page appears. or if specified. the start date and time define when the report will run. 10. If you specify recurrence. they appear in a drop-down list at the top. If you have saved values. or set the input controls as desired. or weekly interval. If you select Simple or Calendar Recurrence. set this field accordingly so that the report is scheduled at the exact time you intend. Calendar Recurrence – Schedule the job to recur on days of the week or days of the month. Click Next. see section 3. In this example.4. daily. You can always set the input values directly. In this example. Figure 3-16 Parameters Page for Scheduling a Report This dialog is identical to the Report Options dialog. Choose a set of saved values. 36 . If the report you are scheduling has input controls that prompt for user input. you may still want to delay the first report date. Start – Immediately or in the future. For details. Figure 3-15 Schedule Page for a New Job 7. for example a weekday report that you want to start next week. we used the saved values for USA. as well as save them as a named set of values. If you do not specify recurrence below. Click the calendar icon to select a future start date and time. The default time zone is the that of the server.5. 9. 8. “Specifying Job Recurrence. Simple Recurrence – Schedule the job to recur at an hourly. the new job will start on a fixed date and run only once. If you are in a different time zone. Recurrence – Choose one of the following: No Recurrence – Run the report once.

valid patterns for report output files can only contain letters. no mail server is configured in a JasperServer installation.SimpleDateFormat. Output formats – Select at least one. based on the java.4. The report must support locales. “Resources of a Domain. dashes. When you select more than one. Subject – Subject line of the notification email. Sequential file names – Appends a timestamp to the names of files created by the job. The timestamp pattern can be added to the base name.text. refer to: http://java. each format will be stored as a separate file in the repository and attached as a separate file to the email notification.com/j2se/1.sun. However. underscores and periods. enter one or more email addresses separated by commas. select this option to avoid attaching the empty files. Skip Empty Reports – In case of an error and the report is empty. numbers. and this is the optional description for the object.2/docs/api/java/text/SimpleDateFormat. On the Output Details page.html Overwrite files – If you do not have sequential filenames or if you specify a timestamp pattern that may lead to identical filenames.” on page 153). for example 200906150601. Locale – Locale for generating the report. By default. choose whether newer files overwrite the older ones. not including the file extension. Output description – The output file is stored in a repository object. The default pattern is yyyyMMddHHmm. specify the Temp folder.Running Reports The Output page appears. Figure 3-17 Output Page for Scheduling a Report 11. specify these attributes as needed: Base output file name – The name of the file as it appears in the repository. Folder – Select the folder where the report output will be saved.3. When the timestamp is used. the output filename is <basename>-<timstamp>. for example a report based on a Domain with language bundles (see section 7. Useful for the output of recurring jobs or for time-sensitive reports where the output must be dated. your administrator must configure one. Timestamp pattern – Specify an optional pattern for the timestamp. To – For email notification. Message Text – Content of the notification email. This field is required and you must have write permission to the folder. as described in the JasperServer Administrator Guide. To send notifications. Be careful when sending reports containing sensitive data via email. For more information on the valid patterns for this field. Attach Files – Select this option to send the output of the report with the email. 37 . and the format extension is added automatically.<extension>. If you email the report and do not wish to save it.

Click the calendar to select the date.4. Click Save. Open the Jobs List page for the report. For each.1. Select the check box in the row of the job you want to delete and click Remove. days.5 Specifying Job Recurrence Simple recurrence and calendar recurrence allow you run reports automatically on a regular basis. as described in section 3. 3. The job appears in the list of scheduled jobs (see 3. Click Save. the start date and time determines the date and time of all occurrences. 2. 13.4 Stopping a Job from Running To stop a job from running. Every – The interval between jobs.4. Occur – Determines how many times or for how long the job will repeat. Click edit in the row of the job you want to change.1. daily.3 Changing Job Schedules When the start date for a job is in the past. and when it ends. 5. For example.4. verify that the next run time for the job is the new date and time you want. as described in section 3. Figure 3-18 Schedule Page With Simple Recurrence Simple recurrence supports these options: Start – With simple recurrence.4. or weeks. Indefinitely – Runs until you delete the job. Until – Runs until a calendar date is reached.JasperServer User Guide 12. To delete a scheduled job: 1. Make your changes on the Job Details. verify that the next run time for the new job is the date and time you want.4. according to the chosen interval. hours. Parameters. “Viewing Scheduled Jobs. In the list of jobs. 3. “Viewing Scheduled Jobs. Schedule. if you want to run the job every Monday. In the list of jobs. how often it repeats. set the start date to the first Monday. Simple recurrence makes the job repeat at an hourly. X times – Runs the specified number of times. you should create a new job rather than changing the past one. 3.” on page 34. or weekly interval that is quick to set up.1. in minutes. 4. “Viewing Scheduled Jobs. you specify when the job starts. 2. 3. Your update applies immediately. Open the Jobs List page for the report.” on page 34.4.” on page 34). delete it. To edit a scheduled job: 1. and Output pages of the dialog. 38 .

Running Reports Calendar recurrence enables you to define a job’s recurrence at a higher level of detail. Running a job in the background is equivalent to scheduling the report to run immediately without recurrence. Week Days – Choose the days of the week. The hours use 24-hour format. from the context menu. Days – Choose the days when the report should run: Every Day. days of the week or days of the month. to 5:45 p. Use the search field or browse the list of reports to find the report you want to run. Click the calendar to select the date. If your servers recognize Daylight Savings Time (DST). click View > Reports. Enter an asterisk (*) to run the job every minute or every hour.. You can also enter multiple minutes or hours. use calendar recurrence. separated by commas. It also has the option to export the report directly to any format and save it in the repository. 2. for example: 1. as well as ranges. jobs scheduled using simple recurrence may seem to occur one our later (when DST ends) or one hour earlier (when DST begins). For example. To run a job in the background: 1. 15 Months – Choose the months during which the report will run.. potentially a long-running one. 45 for the minutes and 9-17 for the hours will run the report every 15 minutes from 9:00 a.m. Right-click the report and select Run in Background.6 Running a Job in the Background Running a job in the background lets you generate a report. 15. 3. 3. Figure 3-19 Schedule Page With Calendar Recurrence Calendar recurrence supports these options: End date – Calendar recurrence runs until a calendar date is reached. You can also send the generated report by email. If you want your jobs to recur at the same time of day and respect DST adjustments. which is quick way to share a report with others. On the Home page. Minute and Hour – Set the time of day when the job should run. 39 . including the time of day.4. 0. Month Days – Enter dates or date ranges separated by commas. 30. or from any page. click view your reports.m. and months of the year. and keep working in JasperServer.

you can continue working in JasperServer. or set the fields one at a time. In the meantime. Choose a set of saved values.util.4. Enter the information as described in step 11 in 3.” on page 37.2.JasperServer User Guide 4. stores or sends the output as directed on the Output page.7 Other Report Parameters When the report scheduler runs a report. 40 . 3. when finished. You can use this parameter in a report by declaring it in the JRXML using this syntax: <parameter name="_ScheduledTime" class="java. the Parameter page appears. If the report you are running has input controls or filters that prompt for user input.4.” on page 36. The Output page appears as in Figure 3-17. 6. The report begins to run immediately and. as in Figure 3-16. “Scheduling a Report.Date"/> Use the _ScheduledTime value to display the date the report was run. “Parameters Page for Scheduling a Report. Click Next. “Output Page for Scheduling a Report.” on page 35. 5. Click Save. a built-in parameter named _ScheduledTime can pass the date and time the report was scheduled to the report.

define groups. and select summaries and data formats for each field. refer to 4.2. You can edit reports in the Ad Hoc Editor if they were created there originally. If the data policies are disabled. crosstabs. Depending on your configuration.7.” on page 74. select labels and styles. “Uploading a Topic. For more information. 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 Additional Features of the Ad Hoc Editor Creating a Report from a Domain Uploading a Topic Configuring System-level Ad Hoc Options 4. but you can’t edit reports in the editor if they originated in iReport. A Topic can also be created from a Domain.6. JasperServer may load a Topic or Domain’s entire result set into memory when you edit or run the report.” on page 76 and 4. administrators and iReport users create Topics as JRXML files.1 Understanding the Ad Hoc Editor Topics and Domains Generally.1 4. refer to section 4. 41 . While Topics contain the fields used directly in a report. and charts as you drag and drop elements. ensure that each Topic or Domain’s query returns a manageable amount of data.Working with the Ad Hoc Editor 4 WORKING WITH THE AD HOC EDITOR The Ad Hoc Editor creates tables. You can select report types. add fields. you can change the data loading policy. which are repository objects defined by data analysts or server administrators to provide a prepared view of a data source. The Ad Hoc Editor loads data from Topics or Domains. given your environment’s load capacity. You can also use the editor to explore and analyze your data interactively.” on page 78. “Data Policies. “Saving Domain Settings as a Topic.2. Domains give JasperServer administrators and business analysts flexibility to filter the data and create input controls and control the list of available fields. For more information.5.1. Alternately.3.

you can click the redo icon to recreate the steps you took before you clicked the Undo All icon. For more information. This mode provides a subset of the Ad Hoc Editor’s full feature set. Description Click this icon to hide the editor interface and view the report by itself. This icon is only available immediately after you have clicked the Undo icon. This view opens in a new window or tab. Click this icon to undo the most recent action. “Sorting Tables.1. This icon is only available when input controls are defined for a JRXML-based Topic. for example. Save Run Undo Redo Undo All Sample Mode Pivot or Switch Group Click this icon to change the way groups are displayed. For example. “Using Input Controls.2. For more information.” on page 61. Note that you can’t undo a style selection. Input Controls Styles 42 . if you added a field to a table. For more information. and provides export options to formats such as XLS and PDF. click this icon to load the full set of data. The words Sample Data appear to the right of the Crosstab tab when you are working with a subset of the data. you can change summaries and datatypes for all report types.4.4.2 Table 4-1 Icon The Ad Hoc Editor Tool Bar Ad Hoc Editor Tool Bar Icons Name Presentation Mode The tool bar at the top of the editor provides access to many of the Ad Hoc Editor’s functions:. the behavior differs: Crosstab: pivots the column groups with the row groups. Click this icon to run the report and view its HTML preview. By default. “Switching Groups. Save the report with the current name and location or save it with a new name and location using the Save Report As option. legends. To work with the complete data set. refer to 4. Click this icon to redo the most recently undone action. and display options in charts. In tables. and other changes that require JasperServer to process your data. clicking this icon removes the field from the report area.” on page 62. Click this button to revert the report to its state when you last saved. Click this icon to select a style that determines the fonts and colors in your report. Table: displays the alternate grouping. refer to 4. In some cases. click this icon to view the current sorting (if any) and to select fields by which to sort your data. If the report includes filters created in the editor. the subset is helpful in visualizing how your groups will look and for setting summaries. click the Styles icon and choose a different style. When you run a report.JasperServer User Guide 4. Place your cursor over this icon to open a menu of save options. Click this icon to view the input controls applied to this report. Instead. those filters can be changed or removed.” on page 59. since the summary context menu appears at the bottom of the column. changing grouping. Sort When working with tables. JasperServer only loads a subset of the data in your data source. Depending on the tab you’re viewing.4.4. click this icon. When working with a table or crosstab. you can select new values to change the data displayed in the report. refer to 4. you can change the chart type. which improves performance when adding fields. taking any other access disables the Redo icon. The full data set gives you an accurate view of the your report and is helpful for exploring the data itself.1.3. For example. you can change its filter and input control values but you can’t change its layout. you can define sorting and the order and size of columns for tables. you could change the dates the report includes. After you click Undo All. Chart: displays the alternate grouping.

Rows can be grouped by their properties.. in a report on orders.3 Tables. you can also hide or show the detail rows when the data is summarized.1. 4. Count Sum Date Date Date Date Date . and the rows could be grouped by city and product... 43 . each column might contain one measurement of the orders. Change whether to display the title. Charts. Amount Amount Amount Amount Amount . In tables. This option is only available if the table includes grouped columns. and crosstabs: Table – Use tables to view all the data in the report or to summarize the data across one set of related fields. Date Placed City A Product 01 Date Date Date Date Date Product 01 totals: Product 02 Date Date Date Date Date Date Count Date Date Date Date Product 03 totals: Date Date Date Date Date Count Date Date Date Date Date Date Count Date Date Date Date Count Amount Amount Amount Amount Amount Sum Amount Amount Amount Amount Amount Amount Sum Amount Amount Amount Amount Sum Date Filled Payment Received Product 02 totals: Product 03 City A totals: City B Product 01 Date Date Date Date Date . For instance. Change the page size. Columns can include both properties and measures. Change the page orientation.Working with the Ad Hoc Editor Table 4-1 Icon Ad Hoc Editor Tool Bar Icons Name Page Properties Description Place your cursor over this icon to open a menu of page-level options. each row represents a something being measured.. and Crosstabs The Ad Hoc Editor provides three modes for working with your data—tables... charts. You can: Change whether to display the filter pane.

... and two data measurements in each cell. Filled Payment Year Totals Filled Payment Filled Payment Filled Payment Filled Payment Filled Payment . cells contain the summarized measurements. Charts summarize data in a graphical representation that can highlight your successes and challenges...JasperServer User Guide Chart – Use charts to compare one or more measures across multiple sets of related fields. Filled Payment Year Totals Filled Payment Filled Payment Filled Payment Filled Payment Filled Payment . Columns and rows specify properties that are used as dimensions for grouping. Total Payments Received City A Product 01 City B Product 02 Product 03 City C Depending on your needs.. Filled Payment 2008 Filled Payment Filled Payment Filled Payment Filled Payment Filled Payment . For instance. Tom 2007 City A Product 01 Product 02 Product 03 Product Totals City B Product 01 .. each type of chart compares summarized values for a group.. For example.. the example above could be displayed in a crosstab with columns grouped by sales managers and year. City Totals Filled Payment Filled Payment Filled Payment Filled Payment Filled Payment . or use a completely different chart type... Filled Payment Harriet 2007 Filled Payment Filled Payment Filled Payment Filled Payment Filled Payment . you could click the Chart tab to view the data in a bar chart that showed the sum of payment received for each of the products in each of the cities. Filled Payment Manager Totals Filled Payment Filled Payment Filled Payment Filled Payment Filled Payment . Filled Payment 44 . With the exception of time series and scatter charts. Crosstabs are more compact representations than tables. Crosstab – Use crosstabs to summarize data across multiple sets of related fields... such as a pie chart in which each slice depicts the payment received grouped by product or city. rows grouped by city and product.. Filled Payment 2008 Filled Payment Filled Payment Filled Payment Filled Payment Filled Payment ... you could configure the chart in a number of ways: you could group the bars by region or city.

the concepts and procedures apply more broadly to Domains and Domain Topics when used as the basis of Ad Hoc reports. To design a table in the Ad Hoc Editor: 1. Table.3. select the demo for adhoc Topic. After logging into JasperServer.Working with the Ad Hoc Editor 4. click Table.1 Selecting the Content of a Report In the following example. click Create > Ad Hoc Report. It is typically in Ad Hoc Components/Topics. including: Selecting the Content of a Report Formatting the Appearance of a Table Viewing and Running a Report in the Editor The Ad hoc Editor is also helpful in exploring and analyzing your data. and click Open Report. this table might be used to analyze whether shipments could be combined to save on costs. On the Topics tab. 45 . 4.” on page 50. The Ad Hoc Editor appears. see 4. “Exploring and Analyzing Data in the Ad Hoc Editor. The Domain or Topic and its list of available fields. The location of this Topic may depend on your system configuration. The report type tabs (Chart. While the example in this section is based on a JRXML Topic.2 Designing an Ad Hoc Report While many users think of the Ad hoc Editor as a report designer. Figure 4-1 Topics and Domains Window 2. you’ll create a table that shows the ship date and shipping charge of orders. The fundamental areas in the editor are: The tool bar. and Crosstab). This section discusses some of the editor’s basic functionality. for more information.2. The Topics and Domains window appears.

When you create a new report. The field context menu also provides this option. In the list of fields. right-click Name and select Add as Group from the context menu.JasperServer User Guide The report area. click Country and drag it to the Group Control icon . the editor displays rows that describe stores in Argentina. 6. 4. 5. some show data for Cactus Comidas por llevar. you can change the order to correct it if it doesn’t make sense. 9. In the list of available fields. However. Drag the top-most Country heading upwards above the City group and drop it. Remove the column from the table by dragging the column heading out of the report area. The field context menu also provides the option to add fields. and select Add as Group from the context menu. 7. while others show data for Rancho grande or Océano Atlántico Ltda. Review the data in the Buenos Aires group. 8. In the list of fields. With the new ordering. and the report area is empty. The report area refreshes and displays your selected data grouped by city. Drag the Name column out of the report area to remove it from the table. The report area refreshes and displays the rows grouped by country and then city. The order of the groups is determined by the order in which you added them to the report. You can also drag to add fields from the list of fields and to rearrange columns in the table. click Date ordered Date shipped Order ID next to the following fields to add them to the report: Name Postal code Shipped via Shipping charge Data for each field appear as you add the columns to the table. and notice that the rows are mixed. The report area refreshes and displays the data grouped by both city and country. Figure 4-2 New Report in the Ad Hoc Editor 3. right-click the City field. In the list of fields. Notice that the Shipped via column displays a list of numbers that seem irrelevant. the available fields appear. 46 .

In the Report Name field. click the Table tab to return to the table view. to the right of the Crosstab tab.Working with the Ad Hoc Editor The report area refreshes and displays the data grouped by country. 13. 10. Above the report area. 17. click Chart to view this same data as a chart. Above the report area. Right-click the chart and select Chart Type > Pie to view a pie chart of the data. You have created a basic report that shows the ship date and shipping charge recorded for orders in the sample data. 12. Click to include the entire data set in your table. 16. the editor only displays a subset of your data when working with a table. 14. or click Browse to select a new location. 15. The default location depends on the permissions granted to your user account. enter Ad Hoc Demo Report. working with a subset of the data may improve the performance of the Ad Hoc Editor. and name. The Ad Hoc Editor displays the totals (sum) for each name. and country. Note that. Right-click the Shipping Charge column heading and select Add Summary from the context menu. Figure 4-3 Unformatted Table 11.00 when the full set of data is displayed. by default. city. the words Sample Data disappear and the total for Argentina changes from $597. Place your cursor over and select Save the Report. Also note that it is easier to work with summaries in tables when only the subset is shown. city. Accept the default value for Location Folder. This is because. and displays a context menu where you can change or remove the summary function if necessary. 47 . In the Description field.00 to $600. enter This report was created with the Ad Hoc Editor. Working with the full set of data gives you a clearer understanding of the final report. this is because the summary context menu appears at the bottom of the column. 18.

Note that you can select a different Topic or Domain for your report. right-click the Ad Hoc Demo Report and select Open in Designer from the context menu. Click change to the right of Topic to select a different Topic or Domain. The Search page appears. Select the Ocean style and click Close. Your changes are lost when you use the browser navigation buttons. 3. Right-click the Date ordered column and select Edit Label from the context menu: 48 . 4. In the Repository pane. You can edit reports in the Ad Hoc Editor if they were created there originally. Click to choose the report’s style. The Styles window appears: 8. The title becomes editable. Click Cancel to return to the editor without changing the Topic. Above the table. 9. This option is only available for reports that were created in the Ad Hoc Editor. Note that your changes are preserved if you select the current Topic or report once again. 5. All data and formatting are lost when you select a new Topic or Domain and click Open Report. 6.2 Formatting the Appearance of a Table Next you’ll change the appearance of the table. Right-click the first Name group (Cactus comidas por llevar) and select Edit Label from the context menu. Enter Orders and Fees by Customer. displaying objects that match the text you entered. In the Search field.JasperServer User Guide 4. The Ad Hoc Demo Report appears. The group label becomes editable. To format a table in the Ad Hoc Editor: 1. 7. Your changes are also lost if you navigate to another page. the main menu. or the Search field. 10. enter ad hoc demo and click Search. 2. 11. click the text Click to Add a Title. but you can’t edit reports in the editor if they originated as JRXML files.2. Enter Customer for the group label.

24. The label isn’t used in the report itself. Place your cursor over and select Hide Detail Rows to show only the summarized totals for each group. you can remove labels from the report and make the column only as wide as the data. Dollars data format is applied to the Fee column. Place your cursor over menu. You could also add the spacer to the farthest right position by clicking its arrow icon . Accept the existing values in the dialog by clicking Save. 21. Right-click the Postal code column heading and click Delete Label from the context menu. 17. 5/01/08. it is only displayed in the Ad Hoc Editor. The dates in the columns now appear in the short date format. The last few columns are now difficult to read because they are crowded together. and click Change Data Format > ($1. and select the short date format. Spacer to left edge of the table.Working with the Ad Hoc Editor The column label becomes editable. Click the Ordered on column heading and place the cursor over its right-hand side. 13. Drag a Spacer to the right edge of the table. Use Ctrl-click to select both the Order ID field and the spacer to its right. When your cursor changes to the resize icon ( ).234. If space is at a premium. 15. Right-click the Ordered on column. Display the detail rows again from the 23. Apply the short date format to the Shipped on column. Spacers can also be used to create margins. Type Ordered on as the new label. select Change Data Format. and select Save the Report. 19. The U. for example. as well. 49 . Resize the column again until it is as narrow as the data. The Save Report As option creates a new copy of the report. drag the column edge to the left until the heading is no wider than the data in the column cells. The name of the column in the database is displayed with a different font and background color. Make all columns as narrow as possible. 22. drag the Spacer into the table between each of the columns.56). Adding some space might help. Right-click the Fee column. The Ad Hoc Editor applies a summary to each field depending on its datatype and inserts a spacer in the leftmost position to improve the table’s formatting.S. click Change Data Format. In the list of fields. Enter new labels for these columns as well: Date shipped – Shipped on Shipping charge – Fee 12. Drag the field and spacer to the left-most position in the report and drop them. Drag the 16. as well. 14. You have now created and formatted an Ad Hoc report. 20. 18.

you can: View the report in presentation mode by clicking .JasperServer User Guide Figure 4-4 Formatted Table Any unused space at the right of the report area is retained when you run the report. Run the report by clicking . 4. The following example explores the state sales data in the Foodmart sample data that can be installed with JasperServer.1. A4. “Running a Simple Report. 4.” on page 27. or crosstab. This section describes: Creating an Initial Layout Focusing on Specific Data Refining the Crosstab 50 . you can save it in the repository for future use.2. chart. you can also run the report directly from the repository. or Actual Size) if your table fits one of these formats better. Click and select a page size (Letter. as described in 3.3 Viewing and Running a Report in the Editor When you have created a compelling table.3 Exploring and Analyzing Data in the Ad Hoc Editor You can use the Ad Hoc Editor to delve into your data and recognize trends and outliers by exploring and analyzing your data. it is displayed as a Jasper Report. In the Ad Hoc Editor. When you run the report.

2. Use the scroll bars if necessary. where both the Store State column group and the Customer State row group are BC. Creating an Initial Layout To set up the crosstab and define its initial layout: After logging into JasperServer. 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. The Ad Hoc Editor appears. Customer State into the Row Group area. 5. Store State into the Column Group area. Create a crosstab. click Create > Ad Hoc Report. Drag: Store Country into the Column Group area. Click Save > Report enter a name. click Crosstab. On the Topics tab. The location of this Topic may depend on your system configuration.3. Figure 4-5 Crosstab of Foodmart sales totals by state and product family Note that zeroes appear in many of the cells. 3. Store Sales as Measure. Right-click Customer State and select Switch to Column Group. Product Family into the Row Group area. select the foodmart data for crosstab Topic. It is typically in Ad Hoc Components/Topics. Review the data in the crosstab. 7. 6. but they are obscured by all the zero values. every cell shows a zero except for the first.56).1 1.Working with the Ad Hoc Editor 4. This indicates that most customers shop in their home state (the store state recorded for their purchases is the same as the customer’s home address state). For example. Right-click the Product Family row group label and select Expand Members. 51 . The non-zero values mainly appear in cells where the Store State column group intersects a Store Customer row for the same state. There are a exceptions. 4. 8. and specify a location. and click Open Report. The Topics and Domains window appears. in the BC column group. Set the data format: right-click Store Sales in the measure label area and click Change Data Format > ($1234. Right-click the Store Country column group label and select Expand Members.

exclude the others. This seems like an important outlier. Several stores are much closer to Sinaloa than Guerrero. Why are customers willing to drive hundreds of miles to visit this location? Since the crosstab only includes a single country now. The same is true in the US. Right-click Store Country and select Delete Column Summary. Right-click Store State and select Expand Members. the two column group summaries show identical data. but notice a similar issue in Guerrero: the Guerrero store is selling to customers in Sinaloa.2 1. If the filter pane is displayed. Figure 4-6 Streamlined crosstab of Foodmart sales Two column groups now show state names. That seems trivial. Ctrl-right-click Yucatan. take a look at the sales in stores nearer to Sinaloa: Distrito Federal. Select Veracruz. focus on the data from Mexico. and specify a name (Foodmart Crosstab) and location (/reports). Figure 4-7 Crosstab of Foodmart in Mexico 4. 52 . Given that Sinaloa is 1000 miles from Guerrero. 5. 2.JasperServer User Guide 9.3. and Zacatecas. place your cursor over and select Toggle Filter Pane to hide it. The crosstab is getting easier to read. this may be another important outlier. If the filter pane is displayed. Note that in Canada. which border each other. Any cases where a customer made a purchase in another state is more evident. The crosstab is redrawn without data regarding the US or Canada. save the crosstab. In the next procedure. 7.select Save the Report. 11. But in Mexico. one shows the stores’ locations. Note that fewer cells show zero values. Hide the Store Country column group summary. 3. Right-click Customer State and select Expand Members Right-click Mexico and click Keep Only. Place your cursor over . and the crosstab is more streamlined. Jalisco. 6. place your cursor over and select Toggle Filter Pane to hide it. many customers cross state lines to shop. the other shows the customers’ locations. First. 10. Focusing on Specific Data To focus on specific group members and measures: If it isn’t open. Stores in DF (Distrito Federal) sell to customers in two states: DF and Mexico. Next. and select Exclude. locate and edit the Foodmart Crosstab report created in the last example. 4. BC is the only province that appears in either the Store State or Customer State: all the Canadian customers live in the the same province as the store they frequent.

It compares values in row groups to their parent values and expresses each measure value as a percent of the containing row group. You can automatically compare them against each other and against the total for each store state. or 35% of the CA sales These calculated fields can be used in crosstabs that include nested column and row groups. You can change the data format of the new measure to make it more readable. SF sold $650. Right-click the measure’s label. Consider this example: The total for CA sales is $1000. 9. right-click Store Sales > Create Custom Field > Special Functions > % of Column Group Parent (value). and select -1234. If the store also sold $2000 in another department (for example. or 80% of the Snack sales. Jalisco. the crosstab shows a sales total for all products in the Food product family. note its abbreviated name: % CGP (Store Sales): CGP means column group parent. Figure 4-9 Crosstab of Foodmart sales and Percent of Column Group Parent 53 . or 33% of the US sales The total for WA is $2000. The measure appears in the crosstab. In available fields. Batteries). in this case the total for the inner group is expressed as a percent of the outer group total. A new field appears. or 20% of the Snack sales. Note that dropping such percent of parent calculated fields in the row or column group area has no affect. the percent of row group parent for snacks is 61% and is 29% for Batteries. or 65% of the CA sales LA sold $350. Chips sold $1000. It compares values in column groups to their parent values and expresses each measure value as a percent of the containing column group.Working with the Ad Hoc Editor The crosstab now shows sales values for Sinaloa and the four nearest states. RGP means row group parent. To continue the above example: The total for all states is $3000 The total for CA is $1000. Sodas sold $4000. click Change Data Format. Consider this example: The total for the Snack Department sales is $5000. or 66% of the US sales. and Zacatecas For each customer state. % Column Group Parent can also be used in tables with more than one group. 10. it’s similar to CGP but applies to row groups rather than column groups. Right-click the new custom field and click Add as Measure. 8. Figure 4-8 Crosstab of Foodmart sales in DF.

Note that clicking the editor’s scroll bars causes JasperServer to remove focus from groups selected in the crosstab. and Zacatecas to collapse them. In the Customer State total column.JasperServer User Guide 11. Click . $420. Right-click Non-consumable and select Keep Only. The data in the crosstab is now filtered to a narrow view of the foodmart data. 4. the crosstab shows summarized values. The percent of column group measure shows that a third of the people that shop in Guerrero live in Sinaloa. Review the data in the crosstab. 2. the % CGP is 13 . 4. the Guerrero store state shows 54 . so you can start working with the full data set. 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 and Hygiene.04 is 13% of all Mexican sales occurred in Guerrero. your options are Alphabetical Ascending (the default) and Numeric Ascending and Descending. put another way. At first glance. and click Keep Only. these numbers may seem incorrect. 3.3 1. Sort by % CGP (Store Sales). the crosstab is sorted by both columns groups and row groups. click to change the sorting to Numeric Figure 4-10 Crosstab of Foodmart sales When you sort a crosstab. Add Product Category as a row group for more detail. Select a member and use the mouse scroll button to scroll to the next member. Click the Ascending to change the sorting to Numeric Ascending ( ). the non-consumable product family seems to have many customers from Sinaloa. for the other states. Note that the words Sample Data disappear to indicate that you are working with all the available data. Jalisco. Take a closer look. Click Cold Remedies. Place your cursor over and select Save the Report. 8. locate and edit the Foodmart Crosstab report. 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.that is. the measures are sorted across both axis. 7. Click the arrow next to DF. in Guerrero the detail for Sinaloa and Guerrero customers (47% and 53% respectively of all sales in Guerrero). 9. For the % CGP measure. right-click Hygiene. 5. Right-click Product Family and select Expand Members from the context menu.3. 6. In the current view: The measures show detail only for the Guerrero store. Instead. Use the scroll bars if necessary. In particular. Click the column group labels and select Expand Members to restore the view of the crosstab shown in Figure 4-9 on page 53. Refining the Crosstab To refine the crosstab while viewing the full data set: If it isn’t open.

Jalisco. shift-click Faux Products Multi-Symptom Cold Remedy and Steady MultiSymptom Cold Remedy.4.” on page 57. and Steady Multi-Symptom Cold Remedy. You can continue to refine the crosstab to understand why the Guerrero store is selling to customers in Sinaloa. 11. Several cold remedy brands sold mostly to Sinaloans (above 50% CGP) are selling poorly in Jalisco. 55 . Right-click Cold Remedies and select Keep Only. Hygiene is removed from the crosstab. Click to undo the last action. The discrepancy is slightly greater in the Cold Remedies group member. and Zacatecas 13. focus on it first. 10. Figure 4-11 Cold Remedy sales in DF. Add Product Name as the inner-most row group. Figure 4-12 Jalisco disappears from the crosstab 15. and each of its customer states show the percent of store state. Notice that Jalisco disappears. Click Faux Products Childrens Cold Remedy. Guerrero.Working with the Ad Hoc Editor its percent of all of Mexico. 14. For more info see 4. that’s because these products have never been sold in Jalisco. right-click Product Category and select Expand Members from the context menu. 12. Note the cold remedies that are selling well to Sinaloans but not selling at all in Jalisco: Faux Products Childrens Cold Remedy. “Creating Custom Fields. and click Keep only.1. Faux Products Multi-Symptom Cold Remedy.

For more information. the buttons are disabled when you save.4. If you are working with the full data set. Further analysis might reveal an underlying cause: Are these brands being regularly stocked in Jalisco. To continue further analysis. shift-click Faux Products Multi-Symptom Cold Remedy and Steady Multi-Symptom Cold Remedy). For example. . Instead of clicking a. “Using Input Controls and Filters.” on page 59. such as the age or gender of the customer? 56 . If the filter pane is hidden. Click Crosstab to continue data exploration or Chart to create a compelling visualization of your data. see 4. Place your cursor over and select Save the Report. switch to 16. JasperServer retrieves all the values for the specified field and adds them to the filter. you can click the sample data. Jalisco is restored to the crosstab. you explored the Foodmart data set 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 (Faux Products Childrens Cold Remedy. To ensure that all values are included in a report at run-time.61) to open a new instance of the Ad Hoc Editor. remove the filter. place your cursor over and select Toggle Filter Pane to hide it. In the above example. Undo can be used to cancel your last action if it JasperServer takes a long time to return. When you click the All check box.2. and a change takes too long. Locate the Product Name filter and click the All check box to add all the cold remedies back into the crosstab. you can locate the Product Name filter and reset it to include all product names. Figure 4-13 Crosstab of Cold Remedies sold in Mexico 18.JasperServer User Guide and (Undo All) are only available when you have made a change in the editor since saving. b. and make your edit again. click the Product Category total for Guerrero ($314. Note that JasperServer does not retrieve a list of new valid values at run-time. the values JasperServer retrieved are used to filter the report. 17. or is there a supply chain problem at this location? Are other factors contributing to the discrepancy. 19. When the report is run. .

rounding then multiplying yields different results than multiplying then rounding. or you can use them with multiple fields. Date functions can calculate the difference between two dates in a number of intervals. You could calculate the profit for each record by creating a custom field that subtracts the Cost field from the Revenue field. To use more than one function to create the field you need. and division. right-click to open the context menu and create a custom field. When a custom field is the basis of another field. multiplication. For example. you can create complex calculations. To create a custom field based on one field: 1. the Ad Hoc Editor assumes you are subtracting the Cost field from the Revenue field. The Ad Hoc Editor supports three types of functions: Basic functions include addition. with one building on the other. and rank. to calculate profit in the example above. You can always change the order of fields using the context menu’s Swap Fields option. create two custom fields. A custom field can only include a single function. the order in which you select fields matters. For ordered operations. days. pay special attention to the order in which you create the custom fields. Create a custom field by selecting an existing field in the list of fields or in the report area of a table report. When working with multiple fields: You can only select basic functions and date differences. Special functions include round. the Create Custom Field option appears on the context menu when you right-click a numeric field. you could divide the Profit custom field in the previous example by the Revenue field to express each record’s margin as a percent. Select multiple fields using Ctrl-click. right-click a numeric field and select Create Custom Field from the context menu. For example. You can multiply or add any number of fields. In this case. You can use these functions with a constant (such as multiplying the cost by two to calculate a standard 50% markup). the columns’ borders change color to indicate that multiple fields are selected. as this may affect the results. For example. you can’t delete it until you delete the one that builds on it.Working with the Ad Hoc Editor Is this an isolated incident or a growing trend? If it’s a trend. 57 . These functions don’t take constants.4.1 Creating Custom Fields You can create new fields in a report by applying mathematical formulas to an Ad Hoc report’s existing numeric fields. Because custom fields can build upon one another.4 Additional Features of the Ad Hoc Editor Creating Custom Fields Using Input Controls and Filters Switching Groups Sorting Tables Working with Charts Working with Crosstabs The Ad Hoc Editor offers many features that are described in the following sections: 4. In the list of fields. 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. and seconds. weeks. When you right-click and select Create Custom Field > Subtract #. but ordered functions (subtract and divide) and date functions can only be used with two fields at a time. subtraction. 4. such as years. then Ctrl-click Cost. click Revenue first. for example. percent of total. nor do they support multiple fields. percent of group. consider a report that includes both a Cost and a Revenue field.

4. Bear the following in mind when creating custom fields: To edit an existing custom field. You can only subtract dates when exactly two date fields are selected. Note that you can toggle the order of the field and function from the context menu (Edit Formula > Swap Number and Field). The summary functions for Custom fields using the percent of group functions can't be edited. for example. 4. and functions it includes. This limitation also applies to the Percent of Total function. Custom fields using the percent of group functions can’t be used as filters. in which decimal values greater than 0. 3. The custom field appears in the list of fields. or Divide #. right-click. 58 . right-click it and select Edit Formula from the context menu. Thus. refer to the JasperServer Administrator Guide. For more information. Multiply. or enter a different value (if you are editing a basic function). and click Create Custom Field from the context menu. click Basic Functions. click Basic Functions or Special Functions. Ctrl-click two date fields. you can add new masking options by editing configuration files. If you selected a basic function. 3. In these contexts. it appears at the bottom of the list. The custom field appears in the list of fields. You can then choose a different function. To create a custom field based on multiple numeric fields: 5. this is only useful in conjunction with ordered functions. If it is not expanded. A custom field’s label is determined by the fields. You can only subtract or divide when exactly two fields are selected. Click Swap Fields from the context menu to change the order of the fields in the formula. Subtract #. Click Create Field. 1. The percent of group functions can’t be used as a group. Custom fields using the percent of group functions can’t be the basis of other custom fields. right-click one of the selected fields. the following limitations apply: The percent of column group function aren’t meaningful in charts and tables. In the list of fields. By default. In the list of fields.Store Cost. Ctrl-click two or more numeric fields. The percent of column group parent is meaningless in table. If it is not expanded. click Swap Field and Number to put the constant before the field in the formula. The percent of group functions are unique among the custom functions in that they calculate values based on the grouping defined in the report. When you create a custom field based on a field in the table. Right-click the column and select Edit Label to enter a more compelling name. 2. and click Create Custom Field from the context menu. it always returns the value 100. Click Create Field. Depending on the type of function you want to create. when added to a table. the new field appears in the report area. 2. the Ad Hoc Editor supports only two decimal places. Subtract. and then enter a number in the field that appears. The custom field appears in the list of fields. the function always returns 100. If your custom fields return data that are significant to the third decimal place. click Date Difference.JasperServer User Guide 2.5 are rounded to the next largest whole number. The Round function uses the standard method of rounding (arithmetic rounding). Click Create Field. Multiply #. when you create it from a field in the list of fields. or Divide. 3. the default label for the Profit field in the example above is Store Sales . This limitation also applies to the Percent of Total function. this number is the constant to use in the formula. and select a interval. If you selected a basic function. To create a custom field based on two date fields: 1. this is only useful in conjunction with ordered functions. constants. and select Add. select Add #.

you can also define filters regardless of whether you are working with a Domain or Topic. The parameters can be mapped to input controls that allow users to select the data they want to include. For more information about: JRXML Topics and input controls.” on page 67. Click . JasperServer refreshes the editor against both the filters and the input controls.4. “Choosing Ad Hoc Data From a Domain. First remove the custom field from the report area and then delete it from the list of available fields. Domain Topic filters. some combinations of filters and input controls may result in no data being returned. click > Toggle Filter Pane (if it is hidden) and click You may find a combination that explains an empty result set.2. if you have both a standard filter (set against a Country field) and a complex filter (set against both Country and State). To edit the values for a report’s input controls: as active.5.2 Using Input Controls and Filters JRXML Topics and Domains use different mechanisms for narrowing down the data they return: JRXML Topics can contain parametrized queries.9. 4. For more information about: JRXML Topics and input controls. see 4. you can display the input controls defined in the Topic as visible to users. For example. see 4.2. Within the Domain design.5. the Ad Hoc report has both input controls (displayed by clicking ) and filters (displayed in the filters pane). If your results are empty but don’t understand why. Nevertheless. Domain Topic filters.” on page 67. “Adding Input Controls. see 5. The Ad Hoc Editor indicates that the report has input controls by displaying values or to save values as the new defaults for this report. for example.2. 59 .1.9. The filters can be configured to allow users to select the data to include. when a JRXML Topic includes input controls that prompt users. Input controls and filters interact seamlessly. and you also create filters.Working with the Ad Hoc Editor You can’t delete a custom field that is used in the report area. In the Ad Hoc Editor.1. “Choosing Ad Hoc Data From a Domain. Click this icon to select new 1. . see 5. Since this can result in a combination of input controls and filters that don’t return data.” on page 90. they're never displayed in the editor or when the report is run. 4. “Adding Input Controls. You can accept the queries’ default values or enter other values. filters can also be defined. Domains (and Domain Topics) can be filtered by selecting fields in the Domain and specifying comparison values.4.” on page 90.1 Using Input Controls In the Ad Hoc Editor.

it appears when you create a new filter. or text input. You can also create a filter from groups in tables and crosstabs. 3. If appropriate. To ensure that all values appear in the report whenever it is edited or run. For more information. If the filter pane was hidden. the selected values are made the default values when you save the report. On the Chart tab. 7. Depending on the datatype of the filed you selected. Note that the All check box doesn’t guarantee that all values will be selected every time the report is run. to hide the filter’s details. To create a filter: 1.2 Using Filters Filters can be defined at three levels: In the Domain Design. “Using Input Controls and Filters. or from columns in tables. 3. 60 . Click Click Click to expand the filter and change the filter’s operator. Right-click a field in the list of available fields and click Create Filter. to remove the filter. Select new values.2. remove the filter entirely. Click to display them once more.2. Use the fields in the filter to change its value. If you do not select the option.JasperServer User Guide A window listing the current values for the input controls appears. Instead. the check box is a shortcut to help you quickly select all the values currently available in the data set. Click OK. 6. When this option is selected. In the Ad Hoc Editor (even when the report is based on a JRXML Topic). see 4. 4. Click the All check box to select all values currently available in the data set. Figure 4-14 Input Controls in the Ad Hoc Editor 2. 4. select the Set these values as defaults when saving report option. the previous default values are used. 5. The report appears. When creating a report from a Domain (in the Choose Ad Hoc Data wizard).4. A new filter appears in the filter pane.4. the filter maybe multi-select. 4. 2. The data that appears is determined by the new values. single-select. you must rightclick the field in the list of those available.” on page 59.

2. on the Controls and Resources page. Filters created in the Choose Data Wizard can be set to be hidden or displayed: Filters set to prompt are always displayed in the editor and when the report is run.9.4. press Enter or Tab to apply the new values. Note that they can still remove the filter. 2. For more information. the behavior varies: 61 . To the right of the new filter. JasperServer uses the new value to determine the data to display.2. Depending on the type of report you are In the Ad Hoc Editor. click to view them. To determine whether an input control is displayed: 1. user data-level security instead. and click the Visible check box to change whether the input control appears. and on the Filters tab. When a report is run. For more information. “Exploring and Analyzing Data in the Ad Hoc Editor.2.3. You can also click the current value to force the editor to update your view Filters are also created when you right-click a group member in a crosstab and select Keep Only or Exclude. see 4. Note that if you only change the the operator in a single-select filter. However. “Adding Input Controls.” on page 90. If you don’t provide a default value for the input control. see 4. 4. Filters defined in a Domain design are always hidden in the editor and when the report is run. You can learn more about how filters and input controls interact in the editor by walking through the data exploration tutorial with the filter pane open.3 Switching Groups icon lets you change how the groups are displayed.3 Input Controls and Filters Availability Input controls and filters can appear in both the editor and when the report is run: Input controls can be set to be hidden or displayed: Input controls set to prompt are always displayed in the editor and when the report is run. Edit the Topic and.2.” on page 50. as they can be hidden from end users.3. create a filter and click OK. click the input control. Note that similar complex filters also appear in the Ad Hoc Editor if a Choose Ad Hoc Data wizard filter was created and set to not prompt for values. click the Prompt? box to remove the check if you don’t want users to edit this filter’s value in the editor. Click Next. To determine whether a filter defined in the Choose Ad Hoc Data wizard is editable: 1. users are prompted to select a value when they create a report against the Topic. the viewing. Filters created in the editor are always available in the editor and when the report is run.” on page 52.3.Working with the Ad Hoc Editor When you change a filter. Such filters can be helpful in improving the report's initial performance by reducing the amount of data the report returns by default. a complex filter can’t be edited but it can be removed. 2. if they aren't displayed directly on the report page. For more information. allowing them to see all the data unfiltered. You can’t change whether a Choose Ad Hoc Data wizard filter is displayed once the report is created. any input controls or filters that are set to prompt are available. 4. Create a new report against a Domain. Filters that aren't set to prompt are displayed in the editor but hidden when the report is run. When you create a filter against an inner group. Filters defined in the domain design are always hidden in the editor and when the report is run.4. Note that users can still remove the filter while in the editor. “Input Controls and Filters Availability. Input controls in a JRXML Topic or filters defined in the Domain design can also be used. allowing them to run the unfiltered report. see 5. Input controls that aren't set to prompt are always hidden in the editor and when the report is run. and skip step 6 in section 4. if your aim is to disallow users from seeing the full data set.4. “Focusing on Specific Data. the filter that appears may be created as a complex filter. JasperServer doesn't apply the filter automatically.” on page 61. The filter pane does not automatically open in this case.

for more information see Figure 4-14 on page 65. Down. or Bottom icon. . the field you select is now available as an alternate group in the table and chart. In charts. you only have a row group defined. and click OK. To sort a crosstab. It only lists fields that are not already used. JasperServer moves the row groups to column groups and vice versa. The Sorting window appears. Drag a field into the column group to complete the crosstab. the table is sorted by a field that isn’t in the table. click the icon next to a measure’s label. Put another way. You can also sort crosstabs. 62 . then click Crosstab to add another compelling field as the column group. and then click to display the alternate group. switch the groups to display the sales data grouped by Client Industry. By default. Select one or more fields to sort by.4. select each field in the Sorting window and click the Up. When you design a table or chart and then view the Crosstab tab. the Table tab displays the first group in the set (the outermost group). see 4. Click Table or Chart to return to your initial view.JasperServer User Guide In crosstabs. To sort a table: 1. In either case. click to group it by the row group. you could add Client Industry as the column group.4 Sorting Tables In the Ad Hoc Editor. When multiple row or column groups are defined. To remove a field. 2. “Working with Crosstabs. JasperServer displays the alternate group. right-click the column and select Change Sorting from the context menu. For example. The Fields window appears with a list of available fields. Press Ctrl and click to select multiple fields. This comparison can help you identify trends and outliers in your data. When sorting a table: You can click a field in the list of fields and select Use for Sorting from the context menu. the report must have been edited on the Crosstab tab to add a column group. Back in the Chart tab. there is no alternate group to switch to. For more information. The table updates to display the rows sorted by your selected fields. the Chart tab displays the outermost group. This option is only available for tables that have a column group.6. To arrange the sorting precedence of the fields.4. 4. the window shows the fields that are used. you can sort the rows of a table by one or more fields. By switching to the Crosstab tab. Click . 4. In this case. To add a field. Top. click Add Fields. If the table is already sorted. you could create a bar chart that showed your sales by region.” on page 65. This option is only available for charts that have a column group. select it and click Click OK. JasperServer displays the alternate group. the Sorting window appears and you can define the sorting as above. 3. for this feature to be available for tables and charts. Otherwise. When multiple row or column groups are defined. 6. you may want to note the sorting fields in the title. If a column is already being used and you want to stop using it or change the sorting. This option is only available for crosstabs that have both a column group and a row group. In tables. Create the table or chart with the most important grouping field. This action is also referred to as pivoting. a table or chart is grouped by the column group. 5. The Sorting window reappears with your selected fields.

63 . Compares values displayed as shaded areas. and height of areas. the context menu provides these display options: Type All Chart Types Description Regardless of the type of report. The Ad Hoc Editor can create both summarized and unsummarized charts: Summarized charts show data grouped and summarized: Bar. Horizontal Bars or Vertical Bars. For each type of chart. in a bar chart. Remove Background or Fill Background. Compares values expressed as pairs of values that determine the position of a point on the chart. 4. you can indicate whether to display markers at each data point and lines that join them. Time Series. size of pie slices. and don’t support grouping: Scatter.4. two dimensional appearance or a three dimensional (3D) appearance. location of points (in line charts). When the gradient is removed. Unsummarized charts show each data point individually. Whether the bars are parallel to the width or height of the chart. you can: Remove Gradient or Apply Gradient. Pie. Compares values displayed as slices of a circular graph. which is three dimensional (3D Pie). Whether the background color should graded or solid. or the default. Keep these points in mind: By default. you generally indicate how to arrange the data by specifying: A group field. Measures are the other data in your chart. Area.4.5 4. in a pie chart it determines what each slice represents. For example. you can indicate whether to use a Flat Pie (which is two dimensional). Note that time series and scatter charts don't support grouping. Note that the gradient doesn’t appear when you run the report. Compares values displayed as points connected by lines. Bar Chart When creating a bar chart. When you create a chart. Note: A series chart displays multiple measures for each group value. instead. each data point is mapped individually. When creating a line chart. a chart’s group field determines how data are categorized. Pie Chart Line Chart When creating a pie chart.2 Designing Charts Charts have different layout and format options than table or crosstabs. Stacked or Simple Series. Whether the background should be filled.4. They determine the length of bars.Working with the Ad Hoc Editor 4.5. You can select a different type of chart at any time. Whether multiple measures of each group are depicted as individual bars or as portions of a single bar. Line. Compares values displayed as bars. the background is filled with a solid color. The data aren’t summarized. the context menu provides these options: Flat Bars or 3D Bars. Measure fields. the category field determines how the bars are grouped.5.1 Working with Charts Chart Types Charts are graphical representations of your data. since pie charts can only show a single measure. Whether to use a flat. Similar to the table's grouping option. Select Hide Lines or Hide Points to remove the indicators from the chart. The Ad Hoc Editor automatically hides all but the first measure if you change to a pie chart. Compares values based on times or dates associated with the data. the Ad Hoc Editor creates a bar chart.

place the cursor over and click Strip Margins. the change isn’t reflected in the Ad Hoc Editor. or forecast future results. the pie displays the correct number of pie slices. By default. the label updates to reflect the change. It plots paired values against one another. the horizontal axis must represent a date or time field.JasperServer User Guide Type Area Chart Description When creating an area chart. the Ad Hoc Editor snaps the chart back to the maximum allowable size in either dimension (height or width). the Ad Hoc Editor displays a simple placeholder with the legend displaying a single entry: No Data. and you can save or run the report. When you place your cursor over and click A4 Size or Letter Size from the menu. Scatter When creating a scatter chart. refer to the JasperServer Administrator Guide. and you can add fields more than once. Click Show Lines to add lines that join the data points. one field must be a date or date/time. One variable determines the horizontal position and the other determines the vertical position. Select Stacked Series to display the groups as solid areas arranged vertically. identify trends. you can indicate whether the groups should be displayed as transparent overlays or as solid areas. Click Hide Points to remove the marker at each data point. when you add a group to a pie chart. If you add a field to the horizontal axis that has a datatype other than a date/time. When you place your cursor over the right-hand or bottom edge of the chart. the resize arrow appears. both fields must be numeric. click and drag the edge of the chart to increase or decrease its size. Fields can be added as groups or measures. In a time series chart. for example. and the other must be numeric. The Ad Hoc Editor removes the margins. They can help you understand the nature and underlying context of your data. giving your chart more horizontal and vertical room. such as Liferay. one on top of another. area charts emphasize quantities rather than trends. the last name entered for that measure with that summary function appears. Click Show Points to add a marker at each data point. the page is set to Actual Size. If you change the measure’s summary function. you can indicate whether to display markers at each data point and lines that join them. or if you want to use it in a portal. the Ad Hoc Editor limits the size of the chart to the selected page size. As you add groups and measures. Note that there is no for adding fields. If you change the summary function back. The text you enter replaces the field’s name. but the result is likely to be meaningless. Time Series Before any fields are added to the chart. you can indicate whether to display markers at each data point and lines that join them. A scatter chart uses Cartesian coordinates to display values as points whose locations are determined by two variables you select. Once you have added at least one group and one measure. the Y-axis units and values show the range of values in the measure you selected. drag it into the report area or right-click it in the list of fields and select an option from the context menu. When creating a time series chart. Time series charts plot your data against the passage of time. Click Hide Lines to remove the lines that join the data points. To add a field as a measure. For example. drag it to the group target to the left of the report area. the Ad Hoc Editor renders the chart as best it can. Note that when you strip the margins of a chart set to the Actual Size page size. such as Purchase Date. You can see the change by setting the page size to Letter or A4. As compared to line charts. you can add a field as both a measure and a group. which resizes the page to fit your chart’s dimensions. select Simple Series to display groups as transparent overlays. You can increase a chart’s size to improve its legibility or you can decrease its size if it’s intended for use in a JasperServer dashboard or JSR-168 compliant portal. For more information about portal integration. when you add a measure to a bar chart. This option is also available on the chart context menu. You can rename the measures displayed in your chart by right-clicking the measure’s label in the legend and selecting Change Legend Label from the menu that appears. For time series charts. the mock-up is replaced by the chart. If space is at a premium in your chart. Unsummarized charts (scatter and time series) can only be run or saved if the fields selected for the X and Y axis are appropriate: For scatter charts. If you resize the chart to be larger. To add a field as a group. 64 . the mock-up changes to reflect the data in the chart.

for pie. Right-click a measure in the legend to change its label. You can pivot a crosstab in two ways: Pivot the entire crosstab. 4. The Measures menu also allows you to change the summary function and data format. Click the arrow again to collapse the inner group once more. right-click its label. Rearranging the groups may change the preview data in the editor. This reorders the measures in each group. for example. Keep these points in mind: Fields can be added as row groups. Consider the case where you are comparing the number of items sold (values ranging from 0-50) and the total sales revenue for each product (values ranging from 0-50. In bar. and you can add fields more than once. click the arrow in each heading cell to expand the inner group. and area charts that display multiple measures. click Legends and Labels. line. To edit a measure. its summary is automatically displayed. For more information. On the chart context menu. and click Replace Group. 65 . Note that there is no for adding fields. this prevents invalid crosstab layouts in which there is nothing to display for some totals if the the summary has been deleted previously. To pivot a single row group. or measure titles (which identifies the measures). the measures change color as they are reordered. you can also right-click a heading and select a Move option from the context menu or press the cursor keys.” on page 61. and specify whether to display the legend (generally.4. Adding this measure in place of the actual revenue measure yields a chart in which the two measures are depicted in closer scale. Drag the group headings to rearrange the hierarchy. Row and column groups are arranged in hierarchies. To add a field in a specific position in a chart. and measures. Pivot a single group: To pivot a single row group. right-click it and select Switch To Row Group. “Switching Groups. Measure labels are displayed to the left of the first column group. The new chart is both easier to read and more appealing. When you collapse a group. the chart may be difficult to read or understand. Remove a chart’s group by right-clicking the chart and selecting Remove Group from the context menu. To add a field.6 Working with Crosstabs Crosstabs have different data. you could create a custom field that divided the revenue measure by 1000.4. When working with a chart that displays two measures with very different ranges of values. you can add a field as both a measure and row group. drag it into the crosstab or right-click it in the list of fields and select an option from the context menu. It is available from the chart context menu as well as from the legend. refer to 4. If the chart displays multiple measures. While the order of measures is changed. click Measures > [Measure Name] > Remove Measure (where [Measure Name] is the name of the measure you want to remove). you can change the order of measures by dragging the legend entry right or left. the list of measures in the chart.Working with the Ad Hoc Editor You can hide legends and labels to allow the chart more space. or simply drag the new group field and drop it on the group control. the context menu lists them under the Measures menu option. Remove measures from the chart using the legend or chart context menu. or you can show them to make the chart easier to understand. column groups. you can drop it in the legend in the desired location. right-click it and select Switch To Column Group. The row and column groups switch places. create a custom field that multiplies or divides one of the measures. the order of colors is not. When the crosstab includes more than one row group or more than one column group. the group title (which identifies the name of the group field). layout. The measures are listed in the order they appear within your groups. To make the ranges of values more similar.3. The new measure appears in the correct location in the chart. click . You can also right-click a different field in the list of fields. Thus. Jaspersoft recommends that you note such changes in the legend label or title. it is the list of groups). This can be helpful improving a chart’s legibility and visual appeal. and format options than tables or charts.000). In the chart context menu. If the chart only displays a single measure. rightclick the chart and select Remove Measure.

You can add any number of measures.2. the entire crosstab is reordered: both columns and rows reflect are re-sorted within each group. by default. drill to details. Use Ctrl-click and Shift-click to select multiple groups to keep or exclude. see 4. row and column sizes are fixed and no spacer is available. Exclude to remove this group from the crosstab. Hover your cursor over a measure value or total and notice the underline that indicates a hyperlink. To see measures for a group’s members. The summary functions for numeric fields are Maximum. Average. Distinct Count is the number of different items in the row or column. drag them in the measure label area. or press the up and down arrow keys on your keyboard. Compare slice to drill-through.” on page 59. Measures are arranged in cells. To rearrange the measures. and the crosstab is sorted in ascending and the crosstab’s sort Click to switch the numeric order from ascending to descending. Percent of Column Group Parent. Distinct Count is 2 and Count All is 6. right-click the measure label and select from the context menu. All the measures appear together in every cell. On the Crosstab tab. Note that you can select multiple row groups or multiple column groups. but not the measures for its individual members. The icon changes to numeric order by its measure values. 66 .” on page 50. This new table is filtered to only show rows that were rolled up to create the hyperlinked value you selected. either the outermost row group or the outermost column group). Many of the layout and formatting options set manually in tables are set automatically in crosstabs. the editor displays each row and column group in a collapsed state. right-click any heading in the group and select Delete Row Summary or Delete Column Summary from the context menu. sample set of the data in your crosstab. and the crosstab is once again alphabetically sorted When you sort by a measure. and Percent of Row Group Parent). select Collapse Members from the same menu to hide the measures. see 4. Note that you can’t change the summary function on custom fields that calculate percents (Percent of Total. This new instance of the editor is completely independent of the original crosstab: you can change it and save it without changing the crosstab. In particular. Click to view the full set of data. a crosstab is sorted in alphabetical ascending order according to its group member names.3. To select the summary function and data format for a measure. Click to return to the default sort order. When the crosstab includes more than one row group or more than one column group. Count All is the total number of items. and filtering. Note that this option is only available for the outermost group on either axis (that is. For more information on drill-through. By default. the editor only displays a smaller. This means that you can see the totals for the group. the inner groups are also sorted according to your selection. right-click the group label and select Expand Members. For more information on working with crosstabs. The icon changes to order is reversed. On the Crosstab tab. Collapsing an outer group also collapses its inner groups. Only one measure can be used for sorting at any one time. Sum. see the JasperAnalysis User Guide. if there are 3 widgets of type A and 3 widgets of type B. The Expand Members and Collapse Members options are only available for outer-most groups or inner groups nested in an expanded outer group. for more information on filtering. “Exploring and Analyzing Data in the Ad Hoc Editor. All row and column groups are summarized automatically: To turn off a group summary. you can also right-click a measure label and select a Move option from the context menu. The icon changes to by its group names.4. you can't slice by both row groups and column groups at once. For instance. Minimum. You can sort it by any of its measures: Click to change the sort order from the default. When a group’s members are expanded. by default. Its columns are created from the fields used as measures in the crosstab. and Count All. To slice. Click the hyperlink to open the Table tab of the Ad Hoc Editor in a new window or tab (depending on your browser and its settings). right-click a group member and select: Keep Only to remove all groups except the selected one from the crosstab. “Using Input Controls and Filters. Distinct Count.JasperServer User Guide You can use the slice menu to keep or exclude group members in a crosstab.

see 4. Figure 4-15 Topics and Domains Window With the Simple Domain Selected 3.Working with the Ad Hoc Editor 4.2. The tab opens with a list of the available Domains. see section 6. click Table. Domains differ in that they give more flexibility in choosing fields from the database and allow some filtering of the data before it is included in a report. 4. For example. “Example of Creating a Domain. Select the Simple Domain for your report.” on page 117. Domains also allow you create reports that prompt the reader for input that determines what data is presented.2.5. The Ad Hoc Editor opens to the Topics and Domains window. 67 .1 Choosing Ad Hoc Data From a Domain When you create an Ad Hoc report based on a Domain. The Choose Ad Hoc Data wizard opens to the Data page. For a more complete description of how to create Domains. On the Home page. Domains are created by data analysts and JasperServer administrators for use by others to access data more conveniently.” on page 71. Click the Domains tab. The frame at the bottom shows you the description of the Domain currently selected in the list. click Create > Ad Hoc Report. if a Domain includes all sales data for a company. 2. and click Choose Data. For complete information on all of the options and settings available for designing reports. a report based on that Domain could present detailed information grouped by postal code and have an input control to let the reader select the geographic area. such as a US state.5. To create a basic report from a Domain: 1. The following example shows how to use the wizard to create a simple report from a Domain. “Using the Choose Ad Hoc Data Wizard. the Choose Ad Hoc Data wizard leads you through the steps of choosing fields and filters.5 Creating a Report from a Domain Like Topics. For report makers.

you can set limits on the data that are retrieved and displayed in your table. even though another user can see them if he used the same Domain. you see only sets and items for which you have permission. If a Domain is configured for secure access. 4. A set appears in the Ad Hoc Editor as a set of fields that can be added together to a table. the fields that you can see might include ones that other users can’t see. Figure 4-17 Selecting Item Sets 5.JasperServer User Guide Figure 4-16 Choose Ad Hoc Data Wizard: Data Page On the Data page. select the fields that appear in the Ad Hoc Editor. 68 . You can select whole sets or individual items within a set. In this example. so a set is duplicated in the list of selected list if any of its fields are moved. The Choose Ad Hoc Data wizard shows the Filters page. expand each set and drag the following fields into the Selected items list: Accounts set: Account Name field Opportunities set: Drag the whole set. Click Next. but then drag back the Sales Stage field Users set: First Name and Last Name fields Fields always appear within their set. Other items might not be visible to you. Conversely.

The Choose Ad Hoc Data wizard shows to the Display page. 10. 11. select Amount by clicking its arrow icon The item appears in the Condition Editor. In the Condition Editor’s Comparison drop-down. 7. even though other users see them if he used the same Domain. Click Next. the values displayed in the condition editor are the ones for which you have permission. 69 . . 8. On the Display page. double-click the Amount item and change its display name to Opportunity Amount. but this Display page gives you a final opportunity to change them.Working with the Ad Hoc Editor Figure 4-18 Defining a Filter on an Item 6. the filter selects only the rows of data where the opportunity amount has a value of 10. 9. Other values might not be visible to you. In the Values field. For this example. If a Domain is configured for secure access. For this example. In this example.000 or more. the values that you can see might include ones that another user can’t see. Conversely. The names in the Domain are often appropriate as is. Click OK. you can edit the table and field names that will appear in the Ad Hoc Editor so that they are more appropriate for the report’s audience. 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 the Current Conditions list.

Expand the Users set and click the arrow next to the Last Name field. To confirm all the selections made in the Choose Ad Hoc Data wizard and begin creating a report. Figure 4-20 Ad Hoc Editor with Fields Configured for Report As shown in this example. you can save them as a Domain Topic. and the list of fields shows the item sets selected in step 4. Notice that all amounts are greater than 10000.” on page 48.2.3. Click the arrow next to the Spacer item. as determined by the filter you defined. Expand the Accounts set and drag the Account Name item to the grouping icon.” on page 45 and 4. as described in section 4. In this example: c. click Open Report. f. Design your report in the Ad Hoc Editor.” on page 73. 14.JasperServer User Guide Figure 4-19 Changing the Display Name of an Item Note that the display names are shown on the left side of the page. “Creating Topics from Domains.1.5. 13. They are added (with the display name) in the order you defined on the Display page in step 4.2. If you want to create different reports with the same settings.2. 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. 70 . as described in section 4. Drag the Opportunities set to the report area to add all its fields as columns. d. “Selecting the Content of a Report. “Formatting the Appearance of a Table. e. The Ad Hoc Editor appears. 12.

5. you can filter data to select a single country. Drag a table from the Selected list to the Available list to remove it from the report. with the option of prompting for user input. as filters. When you select a field from one set. displaying two lists of tables. They are similar to input controls. use the settings on the Display page. but the other three pages are optional and can be completed in any order. You must first select some fields on the Data page. If you add or remove a field accidentally. as shown in Figure 4-17 on page 68. all the its fields are removed except those that are in use. For example. you can click the arrow next to the field name or double-click the field name. If you do not want sets. The tables on the right are those that were selected when the report was created. The Display Page – Change the order and names of fields that will appear in the Ad Hoc Editor. Some Domains define sets that are not joined.2 Using the Choose Ad Hoc Data Wizard This section gives more detail about the four pages of the Choose Ad Hoc Data wizard: The Data Page – Choose the fields to make available in the Ad Hoc Editor. fields that are used in the report area. or for sorting appear gray to indicate that they can’t be removed from the report. You can define a filter on a field that you do not plan to use in the report. Select a field in the left-hand list and click Create Condition to begin defining a filter on that field. You can define filters to limit data that appears in a report and to define whether a report should prompt users for input on a given filter. click select to change the fields used in the report. The Change Field Selection window appears. Click Done at any time to begin designing your report.1 The Data Page Use this page to choose fields and sets of fields to use in your report or make available in your Domain Topic. You can move a field or set back and forth between the lists by dragging the item. it appears in a set of the same name. Doing so removes all settings and updates the list of fields. the comparison operator and value operand depend on the datatype of the field and on the actual data that exist for the field. in which case it doesn’t make sense for the Country field to appear as a row. The list on the right-hand side shows you the items you have selected. In the Condition Editor.2 The Filters Page The Filters page provides powerful functionality for designing reports within JasperServer. The Topic Page – Save your settings as a Domain Topic. 18.Working with the Ad Hoc Editor 15.2. Alternately. The left-hand list displays the sets of fields in the Domain. or group. then click OK to define your filter. 4.5. the unjoined sets aren’t available. You can change Domains on the drop-down list above. Expand a table to see its fields. 16. In top right corner of the list of available fields. 17. double clicking it. click to undo the change.5. column. Use the controls in the tree to close or expand each set. the ones on the left are the other tables available in the Domain. or selecting it and clicking an arrow button. When you remove a table. The filter is still applied and only data that satisfies all defined filters will appear in the final report.2. You can also drag individual fields to add or remove them. The Filters Page – Define a filter on any field. 4. Drag a table from the Available list to the Selected list to add it to the report. 71 . 4. Choose the operator and operand for comparison. Note that you can only select tables in the join tree chosen when you created the report originally. or to compare fields. If you move an individual field out of a set.

The condition is available as a prompt even if the filtered field does not appear in the report. then click Create Condition. but sets as a whole may be also be moved. but users can only remove it. On the report page. thereby speeding up report creation. After selecting a row. use the search controls to the left and click to narrow your list of available values. After you click OK. or measure that you create from the given field.5. For example. the selected filter is available to end users when they run the report.2. users can click to enter a comparison value for this condition. column. the dialog displays a list of all existing values for the chosen field retrieved in real-time from your database. 72 .4.JasperServer User Guide Figure 4-21 Condition Editor on the Filters Page Text fields have both substring comparison operators such as “starts with” or “contains” and whole string matching such as “equals” or “is one of. Click a row in the list of Current Conditions to make it editable again in the Condition Editor. In other words. see the JasperServer Administrator Guide. click once anywhere in a row and use the arrow buttons to move it up. as explained in 4. “Changing the Display Name of an Item. Fields may be moved only within their set. filter prompts can be modified in the Ad Hoc Editor. Once defined. Not that such filters can’t be presented to your users when they run the report. the overall filter applied to your data is the logical AND of all conditions you have defined. such a filter is hidden when the report is run. The list of Current Conditions shows all the filters you have defined. Sets are not used in reports but can be used to add all their fields at once. The maximum number of items that can be displayed in the list of values in the Condition Editor is configurable.” on page 59. the final report might present data for a single country. To change the order of fields. See Figure 4-19. 4. to the top or bottom. Note that when the is Prompt? check box isn’t checked. you can edit and delete it as with other conditions. This button is only enabled when two compatible fields are selected. they can’t edit it. down. select the second field using Ctrl-click.” on page 70. double-click anywhere in the row and type the new name in the text box. double-click the available values to select them. the condition is still available in the Ad Hoc Editor. To change the display name of a field or set. The note at the bottom of the current conditions reminds you that data rows much match all conditions. the report preview refreshes with data that match the condition. For details. You can always change the field labels and ordering in the Ad Hoc Editor. You can perform multiple searches and select values from each list of results.1. you can also click Delete Condition to remove it from the list. A field name becomes the label for the row.3 The Display Page Use the Display page to change the default name and order of the fields as they should appear in the list of fields in the Ad Hoc Editor. but setting them here will make them available for reuse in a Domain Topic. Sets and the fields they contain appears in the list of fields in the Ad Hoc Editor.” When you select a whole string matching operator. “Using Input Controls. but the country is chosen by the user. when the user clicks Apply or OK. When the Prompt? check box is checked. To define a filter that compares two fields of the same datatype. If there are more than 50 values to display.2. Click OK to save your changes. For multiple value matching. The value defined here is the default.

see section 6. They appear on the Topics tab when you start a report.5. Explanation When you click Done. then format and save the report in the Ad Hoc Editor. Once you save a report. “Formatting the Appearance of a Table.Working with the Ad Hoc Editor If you don’t want to use sets in the Ad Hoc Editor. See section 4. JRXML Topics and Domain Topics in this folder appear on the Topics tab when you start a report. Enter an informative description that helps users identify this Domain Topic. Run a report repeatedly as is or with prompting for new input. such as derived fields and different joins to make new fields available in a report. 4. then format and run your report. your field selections appear in the Ad Hoc Editor and you can create reports from them. you can give your settings a name and a description to be saved as a Domain Topic. “Editing a Domain Topic. The description text is associated with the Domain Topic in the repository.5. It is displayed at the bottom of the Topics tab and when browsing the repository. Run reports from the same repository data source but with different Domain settings.” on page 48. Click Open Report after defining your settings in the Choose Ad Hoc Data wizard. By default. Users with permissions may also open it again in the Ad Hoc Editor. Domain Topics are saved in the standard Topics folder.2. 4. and display settings on this Domain to create new reports with different formatting. filters. 73 .3. “Saving Domain Settings as a Topic.2.3 Creating Topics from Domains In some circumstances.” on page 135. See section 4. Domain Topics can be edited as described in section 4.5.3. If you want to … Create a single-use report from the Domain with your settings. For more information. The main consideration is how reports based on the Domain will be used. Then start a new report and choose your data from the new Domain. or make very similar reports in the Ad Hoc Editor. save your settings as a Domain Topic. Find your Domain Topic in the repository and open it in the Edit Domain Topic dialog. In other circumstances. After you enter a name for your Domain Topic. You can now rename the fields and move them in any order. Domain Topics are saved in JRXML format in the repository. and display names you have defined.2. save your settings as a Domain Topic on the Topic page of the Choose Ad Hoc Data wizard. Start a new report and choose your Domain Topic from the Topics tab. users can run it repeatedly and be prompted for input each time if you defined filters with prompts.4 The Topic Page On the Topic page. Be able to modify one or more of the settings you made in the Choose Ad Hoc Data wizard. After you save your changes. it is important to create a Topic based on the Domain and data settings you chose. filter.” on page 75. Domains usually require administrator permissions to create and modify. Then do this Click Open Report after defining your settings in the Choose Ad Hoc Data wizard. Thereafter. Edit the Domain and save it with a new name.5. Before you click Open Report. Domains provide advanced functionality such as table joins and derived fields based directly on a data source. Reuse your field. The following table explains your choices. This corresponds to the Ad Hoc Components > Topics location in the repository. you can create reports based on the modified Domain Topic. You can also edit the Domain Topic to change any of the settings you made in the Choose Ad Hoc Data wizard. it is saved when you click Create Report from any page in the wizard.2.3. Do not modify this folder name. creating a Topic isn’t necessary. “Editing a Domain. Before you click Open Report. select the check box Show items as simple list in designer above the table of display names.5. you can create different reports from this Domain Topic. using all the same fields. but the settings themselves are not saved.” on page 74.

Tomas uses the Choose Ad Hoc Data wizard and saves a Domain Topic based on the Domain. they see those of your fields to which they have access and the data in those fields that they can access. When others run reports from the Topic. Do not change the location folder. navigate to the Topic page. When you save your Domain as a Topic.” on page 135 about the impact of editing a Domain or Domain Topic. so when she opens or runs the report.3. When Tomas and Anita run reports. When you run a report from the Topic. “Editing a Domain.” on page 155 for a technical explanation of data security for Domains. There may be fields that can be seen only by other users.3. For example. 2. Anita does have permission to see more data than Tomas. the field she does see has more rows than when Tomas views the report. user Tomas can access fields B-C and data rows 1-3. See the note in section 6. You might not have access to all of the fields in the Domain nor to all the data in those fields. 4. 74 . Even though Anita has permission to see more fields. it is important to consider everyone’s access permissions. only the fields that you selected appear in the Domain Topic.4. “The Domain Security File. there may be data that is hidden from you. Enter a Topic name and description.1 Access Permissions in Domain Topics If other users run reports from your Domain Topic and the Domain is configured for security.2 Saving Domain Settings as a Topic To save your settings in the Choose Ad Hoc Data wizard as a Domain Topic: 1.5. Fields Tomas’s report from his Domain Topic Anita’s reports from the same Domain Topic BC C Data 123 2345 See section 7.5. While making selections in the Choose Ad Hoc Data wizard. Anita can access fields C-E and data rows 25. The default /adhoc/topics folder makes the saved Domain Topic available on the Topics tab when you select Create > Ad Hoc Report. only the data that you can access in those fields appears. in a Domain. and in the fields that you can see.JasperServer User Guide 4. they see different combinations of fields and the data in them. they are not available to her because Tomas did not have access to them when he created the Domain Topic. However.5.

navigate to the other pages to finish making your settings. filter definitions. 75 . While its repository type is Domain Topic. click Done. and display settings are complete as well.Working with the Ad Hoc Editor Figure 4-22 Entering Information Needed for Saving a Domain Topic 3. it appears when the Search page is filtered to show reports: Figure 4-23 Choose Ad Hoc Data Settings Saved as a Domain Topic 4. If your data selections. The new Topic appears in the Ad Hoc Components > Topics folder. Your Domain Topic name and description are preserved.5. You can also change the name and description by returning to this Topic page anytime before clicking Done in the wizard.3 Editing a Domain Topic Editing a Domain Topic modifies the settings that were defined in the Choose Ad Hoc Data wizard when creating it.3. Otherwise. and the Domain Topic is created when you subsequently click Done anywhere in the Choose Ad Hoc Data wizard.

It is safer to save your changes as a new Domain Topic. When a user clicks Create > Ad Hoc Report on the Home page. Domain Topics are a type of Topic created in JasperServer from a Domain. a Topic is an empty report. In the Select a Domain drop-down menu on the Data page. Topics are in the Ad Hoc Components > Topics folder. by default. Regular Topics are created by administrators using iReport. To save your changes to the selected Domain Topic. 4.JasperServer User Guide To edit the settings in a Domain Topic: 1.5. 3. click Save on any page.6 Uploading a Topic Topics can be created by uploading JRXML files to the proper location in the repository. Typically. To upload a Topic: 1. Follow the guidelines in section 4.2. “Using the Choose Ad Hoc Data Wizard.. 2. when associated with a data source in JasperServer. Use caution when editing Domain Topics that may have been used to create reports. Select View > Repository and search or browse for the Domain Topic you want to modify. Log in to JasperServer as an administrator and select View > Repository. Domain Topics are usually kept in the Ad Hoc Components > Topics folder. The location of the Topics folder depends on your system configuration. Locate the folder where Topics are stored. 2. then click Done. Right-click the Topics folder and select Add Resource > JasperServer Report from the context menu. 76 . “Creating Topics from Domains.” on page 73. To save your changes as a new Domain Topic. all the selections that you made with the current Domain are lost when you click Choose Data. Right-click the Domain Topic and select Open in Designer. If you select a different Domain..” on page 71 to edit the Domain Topic as needed. the list of Topics on the Topics tab is populated from that location. Users who relied on the Domain Topic might receive unexpected data or errors. from the context menu. can be used as a Topic in the Ad Hoc Editor. The Domain Topic opens in the Edit Domain Topic wizard. for more information see section 4. Figure 4-24 Modifying the Sample Domain Topic in the Edit Domain Topic Wizard 3. you can choose a different Domain for the Topic. that.5. which has the same features as the Choose Ad Hoc Data wizard. 4.3. navigate to the Topic page and enter identifying information for the new Topic.

2. The adhoc. such as Topic uploaded for User Guide example. “Completing the Complex Report Example. and an optional description. then select the data source named datasources/JServerJdbcDS from the drop-down list. To do so. When you select Create > Ad Hoc Report. such as Example Topic.12. 77 . you can specify the name to display for each field that the Topic returns. this JRXML code declares a StoreState field that will be displayed in reports as Store State: <field name="StoreState" class="java. When the upload is finished. starting with the Naming page.” on page 101.String"> <property name="adhoc. select the radio button next to From the Repository. see 5.10. 6. Because this is a simple Topic without parameters.” on page 99. If you select it. you can create input controls for it. On the Validate page. 4. you can create a report based on the database columns it contains and the data source selected in step 7. the Example Topic appears on the Topics tab. Topics must be associated with the data source that they were designed for. Such input controls can appear in the Ad Hoc Editor and when the report is run. click Next. The Label field is the visible name of the file in the repository. for more information. The Description field helps users know what the file is. Give the Topic a name. but it is possible to define them. See 5.Working with the Ad Hoc Editor Figure 4-25 Topics Folder on the Search page The Report Wizard appears. click Browse to upload the topic from the file system. 9.2. Click Finish. The Name field is the internal ID of the object. such as example_topic. then click Next. If your Topic has a parametrized query. 8. “Localizing JRXML Reports. On the Main JRXML page. define a field property named adhoc.jrxml. 5.display" value="Store State"/> </field> Topics also support the $R expressions for field names.lang. When you create a JRXML file that will be used as a Topic. a label. In this example.display" value="Any Name"/> For example.display for each field declared in the JRXML. click Save to create the Topic in the repository. click Next again. On the Locate Data Source page. Topics usually do not need a query or customization. The Topic appears in the repository. On the Resources List page.display field property should have the following syntax: <property name="adhoc. 7. there are no resources associated with this Topic. the file is <js-install>/samples/adhoc/topics/adhoc_sample.

7. see the JasperServer Administrator Guide. It also limits the data it retrieves to the fields that appear in the report. Your system administrator can configure JasperServer to handle Domain-based and JDBC-based Ad Hoc reports differently: For Domain-based reports. If any one query reaches the time limit before returning data. You can redefine the report so that it fetches fewer rows. and for nonDomain. 4. the report stops and a message about the row limit appears. If a filter is in effect. JasperServer limits the number of rows that it fetches: If the row limit is reached when starting the Ad Hoc Editor. For JDBC data sources. as is done by default for Ad Hoc reports based on Domains. you can also ask the system administrator to raise the limits. it sends a query to the current data source to fetch data. When the Ad Hoc Editor starts. it may take a long time to start returning data.2 Data Policies Data policies control whether certain processing occurs in JasperServer or in the application storing your data source. JasperServer can be configured to process the data in memory. If the limit is reached when running an Ad Hoc report.7 Configuring System-level Ad Hoc Options System administrators (users with ROLE_SUPERUSER) can control how JasperServer handles the data for Ad Hoc reports. instead. Row Limit. and aggregate data returned by queries based on Domains when this is feasible. the editor starts but it displays a warning message about the number of rows being returned.1 Limits on Queries There is a limit on the number of rows that a report run from the Ad Hoc Editor can contain. JasperServer relies on the database to group. refer to the JasperServer Administrator Guide. JasperServer can be configured to push the processing down to the database. You can redefine the report so that the query completes more quickly. JasperServer processes the data in memory by default. When an Ad Hoc report with complicated queries runs.JasperServer User Guide 4. By default. These settings apply to reports created or re-saved in the Ad Hoc Editor (that is. For more information. change the limit. For details. Time Limit. Consider factors such as the number of users and report complexity when deciding how JasperServer should process data for Ad Hoc reports based on Domains data sources. 4. In all cases. changing the settings does not retroactively affect existing reports). 78 .7. These data policies are controlled on the Ad Hoc Options page. the query and the report are cancelled. For JDBC-based reports. sort. There is also a limit on the length of time that a report can take to complete. non-JDBC data sources. you might be able to reduce the number of rows by changing the filter values. The limits are defined in configuration parameters set by the system administrator.

a wizard guides you through each step. as well as a discussion of using the using iReport plug-in for JasperServer. This chapter contains the following sections: Overview of a Report Unit Adding Report Units from JRXML Files Editing JRXML Report Units Using the JasperServer Plug-in for iReport 79 . You can add these reports in two ways: From within JasperServer. define the report and use the iReport JasperServer plug-in to upload it. upload a JRXML file to the repository. From iReport.Adding Reports Directly to the Repository 5 ADDING REPORTS DIRECTLY TO THE REPOSITORY While the Ad Hoc Editor allows end-users to create reports from pre-defined Topics and Domains. When you upload the report. along with any other resources the report needs. This section gives both a simple and a complex example of uploading a report using JasperServer’s wizard. you can create reports outside of JasperServer and add them to the repository.

you need access to the <js-install>/samples/reports/AllAccounts.JasperServer User Guide 5. The simple example also includes a custom query to demonstrate how a report unit can modify the JRXML report it is based upon. one simple and one more complex. In this case.1 Simple Report Example To create the simple report in this example. fonts. The main JRXML file is the core of the report unit. 5. and scriptlets The data source and query retrieve data for the report. Each sub-section can be referenced individually when adding your own reports with different combinations of elements. This simple report has file resources but no input controls.jpg files on the JasperServer host.2. Each example is split into several sub-sections. and input controls and various resources contribute to the output as needed. a report unit is the collection of elements required to retrieve data and format output. You also need the sample data installed with JasperServer. 5. It can either define the other elements internally or refer to existing ones elsewhere in the repository. resource bundles.jrxml and the <js-install>/samples/image/logo. The following figure shows how the various elements contribute to the report output. 80 .1 Overview of a Report Unit In JasperServer. the main JRXML uses the repo: syntax to refer to the other elements. one for each of the different kind of element in the report unit. that illustrate many aspects of uploading JRXML files to create a report unit. 5.2. Report Data Data Source Query Input Controls Main JRXML Resources * References Data Flow Figure 5-1 Elements of a Report Unit Report Output * Images. the main JRXML determines the layout.2 Adding Report Units from JRXML Files This section presents two examples.2 Uploading the Main JRXML The first tasks when creating a report unit is to give it a name in the repository and then upload the main JRXML file that references all other elements.

81 . in this example new_simple_report. 5. 2. “Defining the Data Source. The Report Wizard displays the list of suggested resources on the Resources List page so you can add them to the report unit. select From File System and click Browse to locate the file <js-install>samples/reports/AllAccounts. 3. Enter the following properties for the new report: Name – ID of the report object in the repository. go to Organization > Reports > Samples. Locate the folder where you want to add the report.jrxml.4. The Report Wizard continues to the Main JRXML page: Figure 5-3 Locating the Report on the Main JRXML Page of the Report Wizard 6. The description is displayed in the repository and on the View > Reports page to help users determine the contents of the report. 5.” on page 83.2. Click Next to begin specifying the components of the report. Label – Display name of the report in the repository. in this example New Simple Report. 7.2. If your report does not reference any file resources. The main JRXML file is the report you have created in another editor such as iReport.Adding Reports Directly to the Repository To upload the main JRXML for the simple report example: 1. you can skip to section 5. Right-click the Samples folder and select Add Resource > JasperServer Report from the context menu. In this example. On the Main JRXML page. The Report Wizard opens to the Naming page: Figure 5-2 Entering the Report Properties on the Naming Page of the Report Wizard 4. JasperServer uploads the main JRXML file. Description – Optional description.3 Uploading Suggested File Resources When JasperServer uploads the main JRXML file. and the Report Wizard displays the list of suggested resources. in this example This is a simple example. Click Next. Log in to JasperServer as an administrator and select View > Repository. it processes the file to create a list of the resources that are referenced in the JRXML. You can either upload a new JRXML file or create a new report based on a JRXML file you have previously uploaded.

The file resource within the report unit has name. 82 . there are two images needed in the report. 10. Click From the Repository and select images/JRLogo from the drop-down.JasperServer User Guide To upload the suggested file resources for the simple report example: 8. you can associate any image file you choose with the resource ID in the main JRXML. click Add Now. The first image in this example is found in the sample data that was created in the repository. Click Next. The Resources List page appears again and shows that the LogoLink resource was added. The Name field must match the resource name referenced in the main JRXML. 11. The resources list shows their name and has a link to add them to the report unit. In this example. Figure 5-4 Suggested Resources on the Resources List Page of the Report Wizard 9. which it does by default. For LogoLink. label. In either case. and description properties. The File Resource page appears. Figure 5-6 Properties of a Resource From the Repository on the File Resource Page 12. Figure 5-5 Selecting a Resource From the Repository on the File Resource Page File resources referenced in the main JRXML can either be chosen among existing images in the repository or be uploaded from a file. These are visible only within the report unit. Accept the default property values for the image resource by clicking Next. they do not redefine the properties on the repository object that was referenced. Review the resource names on the Resources List page of the Report Wizard.

The Report Wizard returns to the Resources List page where it shows that all resources referenced in the main JRXML have been added: Figure 5-9 Suggested Resources Added to the Simple Report on the Resources List Page 17. Click Next.Adding Reports Directly to the Repository 13. Therefore. 15. Click Next to proceed to the Data Source page. click Upload From File System and browse to the file <js-install>/samples/images/logo.4 Defining the Data Source Data sources belong to the report engine. For the second image resource. click Add Now on the Resources List page of the Report Wizard. JasperServer uploads the file. and the Report Wizard displays the properties page for the file resource Figure 5-8 Properties of an Uploaded Resource on the File Resource Page 16.2. The File Resource page appears again to locate the second image: Figure 5-7 Uploading a Resource From the File System on the File Resource Page 14.jpg. Accept the default naming of the image by clicking Next. For AllAccounts_Res2. you must define a data sources in JasperServer that the report can use. 5. in this case JasperServer. The Data Source page of the Report Wizard lets you choose the data source in the repository or define a new data source on-the-fly. 83 . in the process of creating a report unit. and cannot be defined in the main JRXML.

On the Locate Query page. you will see an error when trying to run the report. The simple report example defines a custom query that displays accounts from a single country. This example overrides the existing query by defining a new query in the report unit. None – Lets you select or define the data source at a later time.jrxml file uploaded in section 5. 19. the reports will look the same. 5. 20. None – Uses the query defined within the main JRXML. Click Next to proceed to the Query page. Locally Defined – Lets you define a new data source that will only be available within the report unit.2. To define a custom query for the simple report example: 21. If there is no query in the main JRXML.2. but their data will be different. if any. You will see an error if you run the report in this state. 22. 84 . Proceed to the Locate Query page of the Report Wizard: Figure 5-11 Locate Query Page of the Report Wizard The three choices for the query are: From the Repository – Select an existing query object previously defined and stored in the repository.” on page 80 already contains a query.5 Defining the Query The query in report unit determines what data will be retrieved from a data source. select Locally Defined and click Next. “Uploading the Main JRXML. Locally Defined – Lets you define a new query that will only be available within the report unit. This allows you to create several different reports from the same JRXML file. but the Report Wizard also allows you to define a new query for the report unit. select From the Repository and choose /datasources/JServerJNDIDS that is created as part of the sample data in JasperServer. The AllAccounts.JasperServer User Guide To define the data source for the simple report example: 18.2. Proceed to the Locate Data Source page of the Report Wizard: Figure 5-10 Locate Data Source Page of the Report Wizard The three choices for the data source are: From the Repository – Select an existing data source from the repository. The main JRXML may contain a query. In this example.

Selecting None uses the default data source that you selected in section 5. In this example. Select SQL in the Query Language field and enter the following Query String to retrieve only Canadian accounts: SELECT * FROM accounts WHERE billing_address_country = "Canada" ORDER BY billing_address_city 85 . 24. 23. 25. Label – CanadaAccounts. Select None to use the report unit’s existing data source. Description – Query for New Simple Report in User Guide. the Report Wizard gives you the opportunity to select a data source that overrides the one associated with the report unit. As with the default data source. then click Next. you can select one from the repository or define a new one. The Query Locate Data Source page appears: Figure 5-13 Selecting a Query Data Source on the Locate Data Source Page When specifying a local query for the report unit. Click Next.2.4.Adding Reports Directly to the Repository The Query page appears where you can enter the properties for you local query: Figure 5-12 Entering Properties of a Locally Defined Query on the Query Page The locally defined query and its properties are visible only within the report unit. “Defining the Data Source. The Edit Query page appears: Figure 5-14 Entering a Locally Defined Query on the Edit Query Page 26. we create a query that retrieves only Canadian accounts. Enter the following properties for the example: Name – CanadaAccounts.” on page 83.

To validate the report unit of the simple report example: 27. click Save. and saves the new report unit in the repository with the type Report. all the accounts listed are in Canada. you may be prompted to review your entries. Click the name of your new report to run it and view the output. If you navigate to the last page of the report. You could easily change the images in the report by referencing other file resources. 28.6 Validating the New Report Unit You may click Finish anytime in the Report Wizard to skip pages you do not need. It’s always a good idea to test the report and review the output. If the report is valid. The report wizard validates all the elements of the report unit when done. The Validation page appears automatically.JasperServer User Guide 5. with a message indicating whether the report was successfully validated: Figure 5-15 Validation Page of the Report Wizard If the report was not validated. Use the left-hand navigation buttons to jump directly to the pages where errors occurred. you see the two logo images that were referenced as file resources. The report appears in the repository with the properties given on the Naming page: Figure 5-16 New Simple Report Added to the Repository 29. As shown in the figure below. Click Finish to skip to the end of the wizard. 86 .2.

jrxml file (the sub-report). “Running a Simple Report. Right-click the Samples folder and select Add Resource > JasperServer Report from the context menu.jrxml. 6. Click Add Now in the same row as SalesByMonthDetail. To create the report.2. Description – This is a complex example. Enter the following properties for this example on the Naming page: Name – new_complex_report. For detailed instructions. 2.Adding Reports Directly to the Repository Figure 5-17 Output of the New Simple Report Showing the Image Resources For more information about running reports. The beginning of the complex example is similar to that of the simple example. The complex report also uses a datatype and an image in the repository that are part of the sample data installed with JasperServer. see sections 5.2. go to Organization > Reports > Samples. Log in to JasperServer as an administrator and select View > Repository. 3. 5.jrxml file) and a logo image. The following procedure assumes you are familiar with the Report Wizard and how to navigate between its pages.jrxml.1. 87 . you must have access to all its resources.” on page 27.7 Complex Report Example This section describes the creation of a more complex report with a full set of input controls. To upload the main JRXML and suggested resource files for the complex report example: 1. “Uploading the Main JRXML. On the Resource List page. select From File System and click Browse to locate the file <js-install>/samples/reports/ SalesByMonth.2.” on page 81. b. 4. On the Main JRXML page.3. It may help if you are very familiar with the SalesByMonth. see section 3. Locate the folder where you want to add the report. including the SalesByMonth. In this example. the SalesByMonthDetail. “Uploading Suggested File Resources. This example uses these resources to create a report that behaves just like the SalesByMonth report found in the Reports > Samples folder of the repository.jrxml file. Select Upload From File System and click Browse to locate the file <js-install>/samples/reports/ SalesByMonthDetail.jrxml file and the resources it requires. The report file and its resources are found in the <js-install>/samples directory. as well as a scriptlet class JAR file and resource bundles.2. 5. The list of suggested resources indicates that you need a sub-report (the SalesByMonthDetail.” on page 80 and 5. upload the sub-report: a. Label – New Complex Report.

When you upload a TrueType font as a resource. On the Resource List page. accept the default report name and label. label. click Add Resource. you must know how they are referenced and give your file resources exactly the same name so they can be associated. The complex report example needs a scriptlet JAR and two language bundles (Java properties files). Label – Scriptlet JAR. Figure 5-19 Adding the Scriptlet JAR on the File Resource Pages 9. Click From the Repository and choose /images/JRLogo. the file must have the .8 Uploading Undetected File Resources The report wizard cannot detect every type of resource referenced in the main JRXML. accept the default name. c.JasperServer User Guide c. Select Upload from File System and click Browse to locate the <js-install>/samples/jars/scriptlet. Figure 5-18 Suggested Resources Added to the Complex Report on the Resources List Page 5. the name is referenced in the main JRXML file. To upload the undetected file resources for the complex report example: 8. Add and upload the scriptlet JAR file with the following steps: a. Description – Scriptlet JAR for complex example. upload the logo image resource: Both suggested resources in the list have been added. 88 . Click Add Now in the same row as Logo. c. On the next page. In addition. 7. click Add Resource again. Enter the following information. b. On the next page. a. so you must enter it exactly as shown: Name – Scriptlet. The next page indicates that the file was successfully loaded and automatically detected as a JAR. On the Resource List page again. and description.jar file. Add and upload the English resource bundle with the following steps: a.TTF file extension. You must be aware of other file resources needed in your report and upload them from the Resources List page.2. b. On the Resource List page.

Select Upload from File System and click Browse to locate the <js-install>/samples/resource_bundles/ sales_ro.properties.properties.properties. Label – sales. Description – Default English resource bundle. On the Resource List page.Adding Reports Directly to the Repository b. Enter the following information. c.properties. Enter the following information. Figure 5-21 Adding the Romanian Resource Bundle on the File Resource Pages 89 . the Name field must be exactly as shown: Name – sales. The next page indicates that the file was successfully loaded and automatically detected as a resource bundle (a Java properties file). enter the Name field exactly as shown: Name – sales_ro. click Add Resource again. Figure 5-20 Adding the English Resource Bundle on the File Resource Pages 10. The next page indicates that the file was successfully loaded and automatically detected as a resource bundle (a Java properties file). Description – Romanian resource bundle. c.properties file. Add and upload the Romanian Resource bundle with the following steps: a. Select Upload from File System and click Browse to locate the <js-install>/samples/resource_bundles/ sales.properties file. b. Label – sales_ro.

To prevent users from changing the default. optionally constrained by a minimum value. Boolean – A yes/no value determined by a check box. but date and date/time also provide a calendar icon. there are two aspects to defining an input control: the data type (for example number or text) and the widget type (for example text field or radio button) that allows that input.2. and number of values expected by your report. Single values provide a text box for the user to enter a value. 90 .jrxml file of the complex example has several parameters that require input controls. you must create the input controls so that they return the exact type. Text input can also be constrained by a matching pattern.JasperServer User Guide When done. Multi-select list to select multiple values. Figure 5-22 Undetected File Resources Added on the Resources List Page If you wish to upload a different file for a named resource. the data type for the value is a number. such as WHERE filter clauses in SQL parametrized queries. meaning that JasperServer will verify that the user input is numeric. As with other elements of a report unit. In this example. When a report is designed and configured for input controls. maximum value.9 Adding Input Controls Input controls are standard graphical widgets that take user input in a pre-determined format and pass it into the report.1 Adding a Text Input Control The most straightforward input control is a text box that allows the user to enter a value. for example to interpret a string of digits as a number. In general. number. Radio buttons to select a single value. Check boxes to select multiple values. click the X icon in the same row to remove the file resource and add it again. all three files appear in the Resources List. range. 5. JasperServer displays the input control widgets with the report and regenerates the report when the user changes the input values. You can also change the label and description of the resource. Choice of multiple values – The choices offered to the user can either be a static list of values that you specify or a dynamic list of values returned by a separate query. However. Each input control is a different type to demonstrate how each can be added to the report unit. but the report may process the input value. or both.2. Most components in the example are defined locally to demonstrate the use of the report wizard. input controls and the data types they rely on can either be locally defined or reused from the repository. the widget type can be: Drop-down list to select a single value. a user can modify runtime selections. The query in the SalesByMonth.9. click the resource name/ID in the table and locate the new file or repository object. If there is a mistake in a resource name/ID. Single value – A text. You must define an input control even when parameters have default values. All choices are presented and selected by their text representation. Once the list of values is determined. but not its name. 5. Input controls are complex objects that can be configured in many ways. date or date/time. you can make the input control read-only or invisible.

you can reuse them if they have the same parameter name in the report. Type – Determines the type of the input control. For this example. On the Resource List page of the report wizard. make sure its type and range are compatible with the input control you want. If you have a data type saved in the repository that you want to reuse. select Locally Defined: Figure 5-25 Locating the Datatype for the Text Input Control 91 . Mandatory. For this example. text. Prompt Text – The label that the user sees next to the widget for this input. Data types can be simple definitions of the expected input (numbers. or date/time). date.Adding Reports Directly to the Repository To add a text input control to the complex report example: 11. you can locate a datatype already stored in the repository. you must create the input control in the repository. 14. in this example use the default settings. in this example Single Value. On the next page. Visible – Affect how the input control is displayed. Also. you cannot reuse input controls that you defined locally in another report. 13. enter the naming properties for the input control as well as the type of the input: Figure 5-24 Entering the Properties of the Text Input Control The name is referenced in the main JRXML file. in this example TextInput. Description – An optional description that only appears within the report wizard. so you must enter it exactly as shown: Parameter Name – The name of the parameter in the report that receives the user value. Figure 5-23 Locate Input Control Page of the Report Wizard 12. in this example Text Input Control. select Locally Defined. but the they can also include range restrictions that JasperServer will enforce. Read-only. On the next page. If you have created input controls for similar reports. The Locate Input Control page appears. click Add Control.

enter the properties for the locally defined datatype associated with the input control: Figure 5-26 Defining the Properties of the Datatype for Text Input The name and label are required. Description – An optional description that only appears within the report wizard. a strict minimum means the value itself is not allowed. click Add Control. The Resources List page appears with the new TextInput control in the list of resources. in this example choose Number. but they are visible only when defining the input control: Name – integer_type. leave blank in this example. Type – Determines the format of the data that the user may enter.2 Adding a Simple Check Box Input Control A simple check box provides a true/false (boolean) input that can be used to conditionalize some part of the report. Leave blank in this example. On the next page. On the Resource List page of the report wizard. Label – Integer Control. The number format allows users to enter both integers and decimals. Click Save. a strict maximum means the value itself is not allowed. Minimum value and Is strict minimum – The lower bound of the value the user may enter. 16. To add a simple check box input control to the complex report example: 17.9. select Locally Defined. On the Locate Input Control page.2. Your report must handle both kinds of values when processing the parameter that receives the number. 92 .JasperServer User Guide 15. Maximum value and Is strict maximum – The upper bound of the value the user may enter. Leave blank in this example. Figure 5-27 Added Controls in the Resources List of the Report Wizard 5. 18.

3 Adding a Drop-Down Input Control Another type of input control gives the user a pre-determined list of choices to select from. Type – Boolean in this example. click Add Control. enter the naming properties for the input control as well as the type of the input: Figure 5-28 Entering the Properties of the Check Box Input Control The name is referenced in the main JRXML file. usually five or less.2. so you must enter it exactly as shown: Parameter Name – CheckboxInput in this example. The design of the report determines whether you must create a single-select or multi-select list. This example only has three pre-determined but uses a drop-down list. enter the naming properties for the input control as well as the type of the input: Figure 5-29 Entering the Properties of the List Input Control The name is referenced in the main JRXML file. so you must enter it exactly as shown: 93 . 5. You can either create one locally for the input control or reuse one that you have created beforehand in the repository. Visible – Use the default settings in this example. Click Next. To add a drop-down input control to the complex report example: 21. On the Locate Input Control page. On the next page. select Locally Defined. but use Checkbox Input Control in this example. The predetermined choices are defined in a list of values object. 23. 20.9. On the next page. The Resources List page appears with the new CheckboxInput control. Prompt Text – The label for the input control is usually formulated as a question.Adding Reports Directly to the Repository 19. Multi-select controls can either be a multi-select list or a set of check boxes. 22. Read-only. Radio buttons and check boxes are usually appropriate if there are few choices. Description – Leave blank in this example. On the Resource List page of the report wizard. When creating the input controls you can select whether to present a single choice as a drop down list or a set of radio buttons. Mandatory.

enter the values that the user will choose from. enter a name. On the next page. and optional description for the locally defined list of values. Label – List Type in this example. 27. Click Save. check the box in the row you want to remove and click –. The label for every item must be unique. Description – Leave blank in this example. These properties are not visible outside of the input control: Figure 5-31 Defining the Naming Properties of the List of Values Enter the following values: Name – list_type in this example. Figure 5-32 Defining the Values of the List of Values For each value that you want to add to the list.JasperServer User Guide Parameter Name – ListInput in this example. The value itself is passed to the report. If you have a list of values saved in the repository that you want to reuse. The Resources List page appears with the new ListInput control. On the next page. For this example. enter: Label First Item with value 1. make sure its values are compatible with the parameter that receives this input. then click +. 94 . 24. 26. Mandatory. Each value has a label that is displayed instead of the actual value. On the next page. Read-only. you can locate a list of values already stored in the repository. Label Second Item with value 2. label. Type – Single-select List of Values in this example. For this example. If you make a mistake. Visible – Use the default settings in this example. Label Third Item with value 3. Description – Leave blank in this example. Prompt Text – List Input Control in this example. so you must ensure that its type and value match what is expected. select Locally Defined: Figure 5-30 Locating the List Type for the List Input Control 25. enter its label and its value.

You must configure the query and designate how the results are displayed in the input control. click Add Control. On the Resource List page of the report wizard. On the Locate Input Control page.5 Adding a Query-Based Input Control This last example of an input control shows how the choices available to the user can be dynamically based on your data. 31. Mandatory. The drop-down automatically shows the data datatypes found in the repository.4 Adding a Date Input Control In this example of adding a date input control. On the Locate Input Control page. On the next page. 30. Prompt Text – Date Input Control in this example. Read-only. Visible – Use the default settings in this example. 29. 5. select Locally Defined.2. so you must enter it exactly as shown: Parameter Name – DateInput in this example. we use a data type that already exists in the sample data in the repository: To add a date input control to the complex report example: 28. Description – Leave blank in this example. The Resources List page appears with the new DateInput control. Select /datatypes/date from the drop-down: Figure 5-34 Locating the Datatype for the Date Input Control 32. select Locally Defined. On the Resource List page of the report wizard. Click Next. Type – Single Value in this example. as well as what value is passed as the corresponding parameter. JasperServer performs a query whose results are used to create the list of choices.9. To add a query-based input control to the complex report example: 33. 34. select From the Repository. 95 .9.2. On the next page. enter the naming properties for the input control as well as the type of the input: Figure 5-33 Entering the Properties of the Date Input Control The name is referenced in the main JRXML file. click Add Control.Adding Reports Directly to the Repository 5.

Figure 5-37 Defining the Properties of the Query for the Query Input Control 96 . For this example. so you must enter it exactly as shown: Parameter Name – QueryInput in this example. For a query-based input control.JasperServer User Guide 35. enter naming properties for the local query. enter the naming properties for the input control as well as the type of the input: Figure 5-35 Entering the Properties of the Query Input Control The name is referenced in the main JRXML file. On the next page. Read-only. On the next page. select Locally Defined. Prompt Text – Query Input Control in this example. Visible – Use the default settings in this example. 36. Mandatory. you can use a query stored in the repository. Figure 5-36 Locating the Query for the Query Input Control 37. we define a query that is local to the input control. with its own properties and query string. Type – Single-select Query in this example. enter testQuery in both the Name and Label fields. In this example. Description – Leave blank in this example. On the Locate Query page.

mutli-choice. and enter the following Query String: SELECT user_name. If you make a mistake. Visible Columns – first_name and last_name. JasperServer will display one choice in the widget you chose as the input type (drop-down. enter the following column names: Value Column Enter – user_name. check boxes). define the query that retrieves both the labels and the values to be displayed by this input control. first_name. enter its name. The Resource List page displays all the resources. select None to use the same data source you defined for the report. then click +. you can select a different data source from the repository or define one that is local to the input control. 97 . On the Edit Query page. On the Locate Data Source page. last_name FROM users Figure 5-39 Editing the Query String for the Query Input Control 40. On the Query Information page. 41. For each column that you want to display in a choice.Adding Reports Directly to the Repository 38. Figure 5-38 Locating the Data Source for the Query Input Control 39. including the new input controls. radio buttons. The column names must match those in the SELECT clause of the query string exactly. In this example. keep the default value in the Query Language field. Figure 5-40 Selecting Columns for the Query Input Control For this example. check the box in the row you want to remove and click –. name the database column that will be used as the input value and those that will be presented to the user. In your own reports. Click Save. For each row in the results of the query.

For example. For example.9. The goal is to use input controls as parameters for a query that populates another input control. the value selected is used by the query of the CITY input control. the input control's query must use a special syntax to reference a parameter name. Note that there are other ways to use a parameter in a query.2. For an example of running a report with cascading input controls. for example: select city from accounts where country = $P{COUNTRY} When the user selects a country from the COUNTRY input control.2. The following settings appear whenever one or more input controls are defined. a parameter is referenced using the following convention: $P{parameter name} Consider an example report that returns data identified by country and city. They apply to all input controls simultaneously: The Controls Layout specifies where the input controls should appear. It includes input controls called COUNTRY and CITY. “Cascading Input Controls. To configure the display of input controls in the complex report example: 42. consider a report that has input controls for country. the list of values includes only those in the selected state. 5.9. Leave the field Optional JSP location blank for this example. The syntax is identical to the JasperReports syntax used in report queries. By leveraging the cascading functionality. and city. state.” on page 33. the CITY input control is refreshed to show the result. These cascading input controls use queries to determine the values to display in each input control field.7 About Cascading Input Controls JasperServer JRXML-based reports can include input controls whose values are determined by user's selection in other input controls.6 Configuring the Display of Input Controls To complete the configuration of input controls. the options in the State input control are determined by the value selected in the Country input control.JasperServer User Guide Figure 5-41 All Added Controls on the Resources List Page 5. To do so. see section 3. but you can also make the input controls appear in a separate browser window or at the top the report itself. The query used by the CITY input control retrieves city names from a table called accounts based on the value selected by the COUNTRY input control. 98 . When the user selects a state. enter the optional settings at the bottom of the Resources List page.3. This setting allows you to specify a different JSP file to change to appearance of the input controls. Check Always Prompt to force JasperServer to prompt the user even though none of the input controls are mandatory.2. This example uses the default pop-up window.

Enter sample values as shown in left-hand figure below. If the report was validated. The pop-up dialog appears with all of the input controls you defined. Figure 5-42 New Complex Report Added to the Repository 46. 45. 44. The left-hand figure also shows all the dynamic choices for the Query Input Control: Figure 5-43 Entering Input Controls When Running the New Complex Report 99 .2. The Validation page displays a message indicating whether the report was successfully validated. Click Finish to skip to the end of the wizard.Adding Reports Directly to the Repository 5. Make corrections and try to validate the report again. On the Locate Data Source page. select From the Repository and choose /datasources/JServerJNDIDS from the dropdown. If the report was not validated. Skipping the last steps of the wizard accepts the default values for those options.10 Completing the Complex Report Example To finish the complex report example and validate it: 43. you may be prompted to review your entries. Click the display name of your new report to run the report and view it. click Save. The report appears in the repository.

If checked.JasperServer User Guide 47. Figure 5-44 Output of the New Complex Report Showing Values from the Input Controls You can open the Report Options widow at any time from the report by clicking the icon. The sample report includes a header that displays the value of each parameter received from the input controls. The number of decimal places allowed in the field. 100 . It also includes validation criteria. If you cannot identify the problem. the minimum value itself is not permitted. Any additional information you want to provide about the datatype. Click OK or Apply to run the report with the selected input. If running the new report results in an error. as shown in the righthand figure. The Text Input Control is defined as a numeric type and only accepts valid numbers. Possible values are Text. clicking Apply keeps it open to easily change values and run the report again. The actual data type. If checked. The highest permitted value for the field. A regular expression that restricts the possible values of the field. edit the report to review your settings. The datatype description page contains these fields: Name Label Description Type Max length Decimals Pattern Minimum value Is strict minimum Maximum value Is strict maximum The name of the datatype.2. The label of the datatype.11 More about Datatypes A datatype in JasperServer is more than just a classification of the data. only values greater than the minimum value are permitted. the maximum value itself is not permitted. JasperServer enforces the proper format defined for each input control. The maximum number of characters allowed in the field. The lowest permitted value for the field. Number. Clicking OK closes the Report Options window. 48. Enter a number and click OK or Apply again. Date. 5. only values less than the maximum value are permitted. edit the SalesByMonth sample report (in the repository at /reports/samples) and compare its settings to those you configured for your new report. or Date-Time.

13 Default Fonts in JasperServer By default. All is taken care of in the font extension file that makes these fonts available. as well. 101 .2. the java logical fonts listed above aren't recognized by browsers and are substituted with other font families in some browsers. For example. For example: <jasperReport name="StoreSales" pageWidth="595" pageHeight="842" columnWidth="515" leftMargin="40" rightMargin="40" topMargin="50" bottomMargin="50" resourceBundle="simpleTable"> In the above.display" value="$R{StoreState}"/> </field> JasperServer looks for a label with the ID of StoreState. the filename must include the correct extension (. you don’t need to set any other font attributes (such as the pdfXXX attributes) in the JRXML. you can right-click it in repository (using the JasperServer Plug-in) and select Replace with Current File.php?title=Main_Page. and declare the resource bundle in the header of the JRXML file. Also. if we were to localize a field called StoreState. you must upload the resource bundle. For more information on DejaVu. JasperServer uses three fonts you can use in your reports: DejaVu Sans DejaVu Serif DejaVu Sans Mono Using the DejaVu fonts shipped with JasperServer ensures that the fonts are always available in all environments. For example. iReport can help you localize your report by creating the resource bundle as well. due to font metric mismatches. When you upload the report. nor do you need to specify font mapping. Each $R expression refers to an entry in a resource bundle properties file that you must create. Serif. refer to its SourceForge project at: http://dejavu-fonts. When using the DejaVu fonts coming from JasperReports font extensions.2. Monospaced can still be used.String"> <property name="adhoc. simpleTable is the name of the resource bundle file that contains the StoreState property.org/wiki/index. 5. The DejaVu replace the Java logical fonts used in previous versions of JasperServer: SansSerif Serif Monospaced SansSerif. but should be considered deprecated. In order for this localization to work properly. If you edit a resource bundle in iReport. when viewing a report that uses the SansSerif logical font in Firefox in a Windows environment.lang. the font is rendered as Serif. This is because these Java logical fonts map to different TTF files in different environments. we might use this JRXML: <field name="StoreState" class="java.TTF). and run the risk of text being cut when exported to PDF.Adding Reports Directly to the Repository 5. When you upload a TrueType font to the repository. you must create the resource bundle with the correct labels.12 Localizing JRXML Reports JRXML reports (including Topics) support the $R expressions for field names. which in turn ensures the PDF will be pixel perfect every time. such expressions are used to localize reports into various languages.

Search or browse the repository to locate the report. Click Finish. or even change the data type to one from the repository. The properties page shows the settings for this input control. For this example: a. 4. Change the Controls Layout to Top of Page. 5. go to Organization > Reports > Samples. the report can display with all input controls still blank. In this example. This example will modify the display text of the ambiguous Text Input Control. Enter values and click Run Report to modify the report output according to your input. including the file resources and input controls. The report wizard opens with all the settings of the saved report. Because none of the input controls in this example are required. When the report has successfully validated. Figure 5-45 Output of the Modified New Complex Report In Figure 5-45. Navigate to the page of the report wizard where you want to make changes. 2. Instead of appearing in a pop-up before the report. b. Click the name of the TextInput control.JasperServer User Guide 5. the input controls appear above the full report. b. Change the contents of the Prompt Text field to Enter a number. In this example. Click Next until you reach the Datatype page where you can click Save. Right-click the New Complex Report and select Edit from the context menu.3 Editing JRXML Report Units Once a report unit has been added to the repository. you could make changes on these other pages. Log in to JasperServer as an administrator and select View > Repository. Click Next. c. don’t make any changes. you can see the new prompt label for the text input control. in this example click Controls & Resources in the left-hand list. d. click Save. You can make modifications in the report wizard. as if you were creating the report unit. If desired. 7. 6. On the Resources List page of the report wizard: a. 3. The Locate Input Control page shows that this input control is locally defined. To edit the complex report example: 1. c. Run the New Complex Report again. Clear the Always Prompt box. 102 . you can go back and edit any of its elements. 8.

The plug-in offers these features: Repository browsing. This section includes these topics: Connecting to JasperServer from iReport Creating a Report Unit in the Repository from iReport Managing Resources in the Repository from iReport Editing a Report in the Repository from iReport Running a Report from iReport Creating Reports in iReport Based on a Domain in JasperServer Creating Chart Themes in iReport 5. For example. Drag and drop images and sub-reports into the design page. and property files). The Repository Navigator tool bar appears: 2.4 Using the JasperServer Plug-in for iReport The JasperServer plug-in for iReport provides report developers with a quick and easy way to access reports inside the JasperServer repository. JNDI.1 Connecting to JasperServer from iReport You can connect to JasperServer (Professional or Enterprise) directly from iReport. For example.7 and JasperReports 3. datatypes. you cannot necessarily use a version of iReport or JasperReports that has a later version number than the version of JasperServer you use. JRXML files. iReport appears. This can make it easy to access both test and production environments. modify. list of values.4. fonts. in Windows select Start > Programs > JasperServer Pro > Start iReport on the computer hosting JasperServer. generic resources (including images. Access to Domains through the Domains plug-in for iReport.7 supports iReport 3. Create. and import data sources (JDBC. JAR files. remove. 103 . and JavaBean). Start iReport.” on page 166. JasperServer supports the version of iReport that ships with it. Open the JasperServer Plug-in for iReport by clicking Window > JasperServer Repository.7. Add. Jasper Server 3. To access the JasperServer repository within iReport: 1. and delete folders.2. For more information. and link controls to reports. This section assumes that you installed iReport when you installed JasperServer. and input controls. refer to section 8. modify. Jaspersoft keeps the release numbers of compatible versions consistent. and you can connect to multiple servers. Create.Adding Reports Directly to the Repository 5. reports. The plug-in uses the JasperServer web services to interact with the server. “iReport Plug-ins.

then expand the repository tree in the Repository Navigator. the list includes all the servers configured for every version iReport (after 3. Password – Password for the given user. Note that you may experience problems when connecting to servers that are not compatible with your version of the plug-in. Username – ID of the user account to use when accessing JasperServer. Enter the information that the plug-in will use to access your JasperServer instance. All fields are required: Name – An identifier for this JasperServer instance and its repository in the iReport Repository Navigator. The JasperServer repository tree appears as it would to the user in the given organization. for example organization_1. the default URL is provided and you only need to change the hostname. If you have multiple versions of the plug-in installed. Click Save. Figure 5-46 Connecting to JasperServer from iReport 4. Organization – If there is more than one organization in the JasperServer instance. To add a server. The view of the repository and any actions you take through iReport will use the permissions for this user. no servers are configured. click the first button in the repository navigator tool bar. you must specify the ID or the alias of the user’s organization. JasperServer URL – Full URL to the repository web service.JasperServer User Guide 3.1) that is installed on this computer. When iReport starts for the first time. In the default installation with a single organization. 104 . you can leave this field blank. 5. You can add any number of servers to this list.

Click Next. 2.6.4. a set of input controls (zero or more).” on page 108. “Creating Reports in iReport Based on a Domain in JasperServer. Right-click the parent folder for the new report and click Add > Report Unit in the context menu. You are prompted for the data source. right-click the server name and select Refresh from the context menu. Select a JRXML file in the repository or one saved on your hard drive. 5. and a set of resources (zero or more). A report has a main JRXML file.Adding Reports Directly to the Repository Figure 5-47 iReport Displaying a Report from the Repository Navigator 6. 105 . You are prompted for the main JRXML file. Download images and other files by clicking Export File on the Resources tab of the resource’s Properties window. Select a valid data source (either from the repository or locally defined) and click Finish. 3. The iReport plug-in adds the image element for you. To create a report that returns data from a Domain. View the property information of the resources in the repository.2 Creating a Report Unit in the Repository from iReport To add a new report unit. select Locally Defined and click Get source from current opened report to use it in the new report unit. If it doesn’t. you can: Browse the repository by double-clicking the server and folder icons.4. 4. which you should create in iReport beforehand. drag the image into the design window from the repository tree. To create a report unit in the repository: 1. and upload JRXML files. a data source. see section 5. 5. To add an image from the repository to a report. If you have a report open in the design area. edit. 6. you need a JRXML file. The report unit appears in the repository tree. For each server to which you have configured access in the JasperServer Plug-in. Download. setting an expression that refers to the image’s location in the repository.

refer to 5. You can also modify the location. or description of the repository folders. and other repository objects have their own specific settings. select Add then click the desired object in the context menu. iReport prompts you to locate the resources. or use the keyboard shortcut Control-V.4. When you upload a report that uses the repo: syntax to refer to resources in the repository. 2. Locate the destination and right-click and select Paste. respectively. if any. For more information. Or if you are maintaining existing reports. 3. As shown in the following figure. such as images. you can view the object’s repository label and description. right-click it. set the connection expression of the subreport to $P{REPORT_CONNECTION} in the Properties window’s subreport tab. “Running a Report from iReport. modify. and data sources.3 Managing Resources in the Repository from iReport While creating reports that you intend to store in the JasperServer Repository. In the dialog window that appear. and an input control lets you edit its various parameters: 106 . 8. On the General tab.” on page 108. To delete a resource from the repository. you may need to access. JRXML files. you will also need to create and manage the resources associated with them. To add. 5. If the logged in user has administrative privileges. contain controls that are specific to each type of resource. there are one or more tabs depending on the type of resource. locate the object.4. right-click the object and select Copy or Cut. datatypes. The JRXML for the subreport must already be created and saved as a resource in the repository or in the report A sub-report element is created. drag the JRXML for the subreport from the repository into the detail band. Figure 5-48 Editing General Properties of Repository Objects in iReport The other tabs. If the main report uses a JDBC connection. then drag-and-drop it to the new location. You must confirm you action to prevent accidental deletions. and save changes to existing resources. you can modify the values and save them back to the Repository. To run the report. Browse the repository to the correct resource and click OK. JARs. right-click the report unit and select run Report Unit from the context menu. and select Delete. properties files for localized reports. it will not be removed from its original location until pasted in the new location. To add a subreport to a report. input controls. right-click the folder that will hold the resource. lists of values. When cutting the object. File-based resources have a Resource tab to replace or export the file.JasperServer User Guide 7.5. then right-click the resource and select Properties. To modify a resource. You cannot run a subreport directly on the server. To add a resources in the repository navigator. you must run the whole report unit. or delete resources to the repository from iReport: 1. Alternatively. modify. style templates (JRTX). name. locate the object. 4. To change the location of a resource in the repository. an image resource shows the image itself. 5. or use the keyboard shortcuts: Ctrl-C and Ctrl-X. navigate the repository tree to find its folder.

either in the Designer or in the XML editor. On the General tab. change the repository name or description as appropriate. you can set display properties for any input controls. “Creating a Report Unit in the Repository from iReport. right-click the JRXML file in the report unit and select Open in Editor. In the repository tree. The JRXML is extracted from the repository and stored as a local copy in the <USER_HOME>/. you must be aware that iReport operates on a copy of the file. report units appear as special folders with this icon: . Edit the file as needed. you can change the JRXML file for the report. On the Main Report and Data Source tab. Click Current Report to use the JRXML currently being edited in iReport.Adding Reports Directly to the Repository Figure 5-49 Editing Resource-Specific Properties of Repository Objects in iReport 6. The JSP fields are for modifying the appearance of the controls. 2. This directory is never automatically cleared out. or uploading one through iReport.4 Editing a Report in the Repository from iReport In the repository tree. right-click it in the repository tree and click Replace with Current JRXML. To save the file and upload it to the repository. 107 .4. When working with JRXML files in the Repository from iReport.” on page 105 for instructions on adding images or subreports to your JRXML file.2. They contain JRXML files with this icon: . 3. right-click the report unit and select Properties. See section 5. A message confirms the operation’s success. See Figure 5-50 on page 108. 4. Similarly. You must upload it back to the repository when finished. In the repository tree. 3. either by selecting one from the repository. On the Other tab. and the Controls Layout determine where they appear. Click Save in the Properties dialog to make your changes effective in the repository. To edit a Report Unit in the Repository from iReport: 1.4. 5. you can select the data source from the repository or from iReport.ireport/jstmp directory. 2. The JRXML appears in the Designer window. as explained in the following procedure: To edit a JRXML file in the Repository from iReport: 1.

If the report does not display. see chapter 6. The Domain plug-in enables iReport users to generate reports from Domains. 5.” on page 115. the Report Parameters window prompts you for values. 2. and it limits the data to that which is appropriate for the audience. If the report has input controls. Running a Report from iReport To run a report on the server using all the export options set in iReport: Right-click a report in the repository tree and click Run Report Unit. 5.JasperServer User Guide Figure 5-50 Editing Parameters of a Report Unit in iReport 5. “Creating Domains. Click Save Report Unit in the Properties window to make the changes effective in the JasperServer repository. It relies on the JasperServer plug-in to access the repository. The plug-in is installed in iReport by default.4.4. 108 . Figure 5-51 Report Parameters Window in iReport The report is displayed in the Report Viewer Window. For more information about Domains. look for errors or messages in the Report Problems Window at the bottom of the iReport interface.5 1.6 Creating Reports in iReport Based on a Domain in JasperServer A Domain is a virtual view of a data source that represents the data in business terms appropriate to your audience.

click File > New > Domain Report. Select a JasperServer connection to determine the server and repository containing the Domain you want. “Connecting to JasperServer from iReport. To start a report based on a Domain.1.” on page 103. Figure 5-52 Domains Window in iReport 3.4. The Domain Window appears docked on the left-hand side of the screen. The Domain Report wizard opens to the Connection step: Figure 5-53 Connection Step in the iReport Domain Report Wizard 4. Configure iReport to access your JasperServer repository as described in section 5. Figure 5-54 Domain Step in the iReport Domain Report Wizard 109 . then click Next. Click Window > Domains. 2.Adding Reports Directly to the Repository To create a report in iReport based on a Domain in JasperServer: 1.

Select a Domain and click Next. The Domain Window now shows the sets and items in the Domain. Figure 5-56 Name and Location Step in the iReport Domain Report Wizard The Name and Location step determines the file name of your report in iReport. See below to publish your report in the repository. Filters will limit the data your report will return. which may correspond to fields and calculated fields in the Domain. This dialog is similar to the Filters page in the Choose Ad Hoc Data wizard within JasperServer. Click Finish.JasperServer User Guide The Domain step displays a selector containing all the Domains within the repository visible to the user defined in the connection. The report document appears in design area. the list will include any Domains they define as well. 110 . Even if that field is not included in the report.” on page 71. 5. 6. If the user’s organization includes sub-organization.5. 7. Click Next and specify a name and a location on your hard drive to save the report. see section 4.2. For more information. “The Filters Page. and you may select any field to prompt the user with an input control. not in the JasperServer Repository. 8. Define any necessary filter conditions on the fields of the Domain. Figure 5-55 Filters Step in the iReport Domain Report Wizard The Filters step displays the Domain’s items.2. the filter will be active and will apply to the rows of data that will appear.

13. Select a valid repository location and click Finish. click Edit Filters in the Domains Window. Edit your report to format its data and look and feel. If the report doesn’t appear in the repository tree.” on page 150. label (display name) and an optional description for the report in the repository. drag them to the detail area of the JRXML in the designer. then click Next. label. save your report. you can test it by clicking The report output appears in the Report Viewer Window. You are prompted for location for the report unit. With the report published to the server. 14. 111 . The filter uses the Domain Expression Language described in section 7. Enter a name (object ID).2.amount &gt. 10. Figure 5-57 Designing a Report in iReport Based on a Domain in JasperServer If you want to change the filters on the Domain data. in the repository navigator window. then click Publish Report in the Domain window.field_ID. right-click the server name and click Refresh. You cannot run a Domain report until it has been published to JasperServer.= 10000</queryFilterString> </query>]]> </queryString> The query has two elements: queryFields and queryFilterString: Field IDs in both elements are specified as set_ID. When you are satisfied with the report. “The DomEL Syntax. the generated XML is the following: <queryString language="sl"> <![CDATA[<query> <queryFields> <queryField id="newSet2. You are prompted for a name.Adding Reports Directly to the Repository 9. and description of the new report unit. Click XML next to Designer to view the XML. For the simple filter shown in step 6. 12. Filters are defined as queryFilterString elements in the XML of the report. 11.amount"/> </queryFields> <queryFilterString>newSet2. To add items from the Domain.

JasperServer User Guide

5.4.7

Creating Chart Themes in iReport

Using iReport, you can create new chart themes that give a custom look to any chart. You can easily set the fonts, colors, line widths, and other settings that determine the appearance of charts. You can then import the chart theme for use in reports generated in JasperServer, either on a report-by-report basis or as a global setting for all charts that do not provide their own theme.
To create a new chart theme in iReport:

1.

Select File > New > Chart Theme. The new file dialog opens with a default file name. Chart themes use the .jrctx file extension.

Figure 5-58

New Chart Theme in iReport

2.

Enter a name and location and click Finish. Alternately, open an existing chart theme file with the .jrctx extension. The chart theme editor appears in the Designer window.

3.

Use the following panes to work with your chart theme: Template inspector on the left . Contains the categories of properties that can be modified. Chart properties on the right. Lists the properties in each category and lets you modify their settings. These panes are shown in Figure 5-59 on page 113. The available options are based on the JFreeChart library used to generate charts. Note that iReport only supports the most common options provided by JFreeCharts.

4. 5.

Select each category in the template inspector and review the available option, which appear in the properties pane to the right. Select a property to change its value. Depending on the nature of the property, you might type text, select a color, check or clear a check box, or select a value from a dropdown. As you update the chart theme, the Designer shows your changes. For example, change the Series Color property in the Plot category to set the color of the data series in the chart. Selector different chart types from the dropdown at above the Designer to see how the theme appears with different types of charts. This is especially important if you are creating a theme that will be used with many reports, such as a corporate chart theme. To view the XML that defines the chart theme’s appearance, click XML above the Designer.

112

Adding Reports Directly to the Repository

Figure 5-59

Chart Theme Editor in iReport

6. 7.

When you are satisfied with the chart theme, click File > Save to save your chart theme. This saves the report to your local hard drive. In the template inspector, right-click Chart Theme and click Export as Jar from the context menu.

Figure 5-60

Exporting a Chart Theme

You are prompted to identify the chart theme. 8. 9. Enter the name of the theme and the name of the JAR file. The chart theme name is the text that appears in the Chart Theme dropdown in iReport’s properties pane. If you don’t want this theme to be available in iReport for some reason, clear the check box. 10. Leave the box checked if you want the JAR to be placed on iReport’s classpath. 11. Click Export. The chart theme is exported. It can be used at the report or server level in JasperServer. For more information, refer to the JasperServer Administrator Guide.
In iReport, you can upload the chart theme to JasperServer using the JasperServer plug-in; right-click the folder in the repository where the theme should reside, and select Add > JAR Archive.

113

JasperServer User Guide

114

6. A Domain is a virtual view created and stored in JasperServer. “Creating a Report from a Domain. and users create reports based on the Domains using either the Ad Hoc Editor or iReport. without modifying the data source. 115 . In JasperServer. For instructions on creating Domain Topics and reports based on Domains in the Ad Hoc Editor. Columns with data relevant to users need to be joined across several tables.1 Introduction to Domains Production databases typically contain data in tables that are optimized for storage and retrieval. and Domain Topics. and the data values they can access are limited by security policies. Domains are similar to Topics in that they are used in the Ad Hoc Editor as a basis for designing reports.5. They are different from Topics in several significant ways: Domains can be created directly through the JasperServer user interface.4. filtered and labeled for their business needs. Through a Domain. Domains are created for end users by database administrators or business analysts who understand the structure of the raw data in the database.” on page 67. This chapter contains the following sections: Introduction to Domains Example of Creating a Domain Using the Add New Domain Dialog Using the Domain Designer Editing a Domain 6. It presents the data in business terms appropriate to your audience. and it can limit the access to data based on the security permissions of the person running the report. see section 4. a Domain performs all these functions and more such as the localization of report text and permissions based on data values. Ad Hoc reports. Typically. as described in section 5. secured against unauthorized access. A Domain defined in JasperServer and can be used to create reports.” on page 108. In relational databases. filtered by business needs. Domains defined in JasperServer can be accessed through iReport as well. and labeled with user-friendly names. “Creating Reports in iReport Based on a Domain in JasperServer. Administrators define Domains. This chapter covers the process of creating Domains and defining their contents. a view can perform some of these functions.Creating Domains 6 CREATING DOMAINS A Domain is a metadata layer that provides a business view of the data accessed through a data source. In the default JasperServer installation. those who create Domains must have organization admin privileges. users see columnss that have been joined.

and columns are composed of fields in each row. Domains can be used to perform complex joins. columns are called items. Some Domain operations refer to columns. there might only be one Domain within the organization but many Domain Topics that users have created for specific needs. it has a name. and also save the settings in a Domain Topic so others can design similar reports.3. Users can filter the data for each column. Users would have a wide variety of Domain Topics to choose from.2 Terminology This chapter refers to both columns and fields. and save their settings as a Domain Topic for future reuse in Ad Hoc reports. Domain Topics. In this case. but no opportunity to access the Domains to perform their own filtering.3. Conventionally. others to fields. For more information.1 Domain Use Cases The use of Domains. but when users create a report based on a Domain.5. On the other hand. perform very little filtering. have formulae for calculating new columns. 6. A small number of users who understand their database might be given administrator privileges to define complex Domains as an extension of the Ad Hoc report design process. database tables are composed of columns. They could then perform their own filtering. The table in section 4.1. A Domain references the following components: 116 . Users can select a subset of columns to appear in the Ad Hoc Editor and give them custom labels.” on page 73 gives individual use cases for Domains. On the other hand. relabel columns for their own needs. Like other repository objects. Once all these settings have been made. operations such as joins and filters operate on designated field values in a row.” on page 73. but they are defined by the columns that determine the fields involved. joins. “Creating Topics from Domains. however the two terms refer to the same concept from different perspectives. Report creators have the opportunity to further filter data and prompt for user input later when running the report. JasperServer can optimize database access to allow editing of reports that access huge datasets. they have to opportunity to further choose the data from within the Domain.5. but there are many scenarios that combine some degree of both. This last point is a very powerful feature of Domains. Administrators create Domains. “Creating Topics from Domains. users can save the report for others to run. 6. The number of users in your production environment and their level of proficiency will also determine your general use cases. filter data.1. then use repository access permissions to make sure users cannot modify them. administrators will want to create Domains that help the users meet their business goals. In this scenario. administrators could create very targeted Domains and Domain Topics. In the other case. but define a strong data-level security policy. Domain Topics. When designing a report based on a Domain. a Domain could contain dozens of tables in several unjoined sets. and reports based on Domains. Because an item may originate from derived tables or calculated fields. and select a small set of columns for specific users or specific types of reports. it may not correspond to a single column in the database. “Creating a Report from a Domain. each for a specific purpose. there might be many specific Domains. Perhaps reports also need to be internationalized. as well as labels and locale bundles to specify how the data appears. The preceding examples illustrate two extreme cases. Similarly. see sections 4. For example.JasperServer User Guide Domain creators can write SQL queries.1. optional description and folder location specified at creation time. 6.3 Components of a Domain A Domain is saved as an object in the repository. and each would have corresponding locale bundles and a single Domain Topic. and saved reports in JasperServer depends on the complexity of your data and your business needs. Within a Domain. Domains and Domain Topics can give users great freedom in designing reports while the security features make sure they do not access inappropriate data. and more importantly create input controls on columns so that report readers can modify the filter values. But the effect of a calculated field in every row is to create a new caluculated column. a calculated field refers to a field in row that is computed from the field values in other columns. Users of the Domain might only see a single set of tables according to their security permissions. so the administrator creates the corresponding locale bundles. filter expressions and security files to specify exactly what data can be accessed. with large numbers of users or less database proficiency.5. In the first case.” on page 67 and 4.

SuperMart Domain – Demonstrates advanced features of Domains. calculated fields. As an administrator user. such as translated labels and local formats. You can export the Domain’s design file as described in section 7. you need to determine a security policy for the data retrieved through the Domain. Complex Domain with many tables and joins. You can use them to practice designing and using Domains. Locale bundles and security files are uploaded from external files. and labels to display the columns.2 Example of Creating a Domain The following example shows how to create a Domain. On the Data and Resources page.” on page 139. 6. You can download and inspect the Domain’s security file and locale bundles.” on page 139. You also need to determine whether the users of your Domain need localized resources. you should plan your Domain’s features before you begin the creation process. select Add Resource > Domain in the repository to open the Add New Domain dialog. The following sections describe the various dialogs for selecting.5 Overview of Creating a Domain In practice. Log in to JasperServer as an administrator and select View > Repository.1. joins to perform. 2.Creating Domains A JDBC or JNDI data source whose tables and columns will be presented through the Domain.3.1. joins between tables. You can export the Domain’s design file as described in section 7. Optionally define localization bundles or data-level security on the Resources page of the Add New Domain dialog.1. Launch the Domain Designer and step through its tabs to ultimately define the sets and items of your Domain.3. Shows how report creator can see the items in a Domain through a Domain Topic. Optional security file that defines row and column-level access privileges based on users or roles. and item properties to expose to users. You should know the elements of your design: tables and columns to choose.” on page 125 and 6.1.4. select a data source then enter a name and optional description for your Domain. “Creating Topics from Domains. queries for derived tables. The new Domain is not created until you click Save in the Add New Domain dialog. as described in section 4. Based on the Foodmart sample data source. 117 . 4. For complete information on all of the options and settings available for designing reports. sets you need. 6. Domain used to create Simple Domain Topic in the Organization > Ad Hoc Components > Topics folder. 6. 5.” on page 73. “Using the Domain Designer. The next section gives a detailed example of using these dialogs to create a Domain. “The Domain Design File. as described in section 7. The Domain design that specifies tables and columns in data source.1.” on page 127. creating or uploading the components of a Domain. as well as see complex reports based on Domains: Simple Domain – Demonstrates very basic features of Domains Based on the SugarCRM JNDI sample data source. see sections 6. The Domain design is either created through a dialog or uploaded from an external XML file. filters to define. There are several dialogs involved in creating a Domain in JasperServer: 1. “The Domain Design File. Data sources are selected from previously defined data sources in the repository. And finally.4 Sample Domains Two sample Domains are provided in Organization > Domains in the default installation.5. “Using the Add New Domain Dialog. Optional locale bundles consisting of localized property files to give labels and descriptions in other languages.” on page 139. “The Domain Design File. 3. To create a sample Domain: 1. You should decide on the data source and define it in the JasperServer repository.

The list of tables to choose from shows all the database tables found in the data source. the click OK. repository location. Under the Properties heading. The Domain Designer opens to the Tables tab showing the data source you selected in the previous step.JasperServer User Guide 2. You can expand each table to see its individual columns. expand and select Analysis Components > Analysis Data Sources > SugarCRM Data Source. 5. Locate the folder where you want to place the Domain. click Browse. Figure 6-1 Data and Design Page of the Add New Domain Dialog 4. In this example: Display Name is Example Domain Location is /Domains (unchanged) Description is Created in User Guide tutorial. Click Launch Domain Designer on the Create tab under the Design heading. Right-click the folder and select Add Resource > Domain from the context menu. for example Organization > Domains. Figure 6-2 Select a Data Source Dialog for a New Domain 6. Under the Data Source heading. 3. In this example. The Add New Domain wizard opens to the Data and Design page. enter a name. and optional description of the Domain. 118 .

so you may leave it checked or not. opportunities. accounts_opportunities. Figure 6-4 Derived Tables Tab of the Domain Designer 119 . the check box to Inspect new tables and automatically generate joins has no effect.Creating Domains Figure 6-3 Tables Tab of the Domain Designer 7. Double-click the following tables in the left-hand list to add them to the list of selected tables: accounts. users With the data source in this example. cases. Click Next to display the Derived Tables tab. 8.

define the following joins: Left Table and Column accounts: id accounts_opportunities: opportunity_id opportunities: assigned_user_id Right Table and Column accounts_opportunities: account_id opportunities: id users1: id Join Type Inner Inner Inner 120 . Select the same . 10. For this example. expand the tables to see column names. d. The new derived table is shown in the list of tables and contains the columns you selected. b. Click Create.JasperServer User Guide 9. In the left-hand list. Create a derived table as follows: a.priority=1 and cases. and rename it to users2. Now there are two table aliases for the users table to avoid circular joins. then click a join icon. select the users table and click the Copy Table icon users table again and click the Change Table ID icon to create the users1 table. select a column in the left table list and a column in the right table list. A derived table is defined by a query and a selection of the columns in the result. Click New and enter a meaningful name in the Query ID field. To specify a join.deleted=false Click Run to see the columns in the result of the query. c. Click Next to proceed to the Joins tab. 12. 11. Select the following columns by Control-clicking in the list of query results: account_id assigned_user_id case_number date_entered description id name resolution status e. Figure 6-5 Joins Tab of the Domain Designer The tables selected on the Tables tab and defined on the Derived Tables tab appear in both lists. Type the following query: select * from cases where cases. in this example: p1cases.

but itself was not joined to the other tables. then enter the following details for a calculated field that creates unambiguous city names: Name: city_and_state Type: String Expression: concat( accounts. 121 . In this example. you can expand the join tree and double-click column names to insert them.billing_address_state ) When entering the expression. accounts. In this example. 13. click Next to proceed to the Calculated Fields tab. and the right outer join includes P1 cases without assigned users. Click OK to validate the expression and add the calculated field to the list of available columns.Creating Domains Left Table and Column accounts: id users2: id Right Table and Column P1cases: account_id P1cases: assigned_user_id Join Type Left Outer Right Outer Outer joins are needed when columns might have null values. '. The list of available columns shows all the joined and unjoined tables resulting from the joins you defined. the cases table was used only to help create the p1cases derived table. Click Create Field to begin. '. When you have selected all the necessary joins. Figure 6-6 Calculated Fields Tab of the Domain Designer 14.billing_address_city. the left outer join includes accounts without P1 cases.

Use Equals as the comparison operator. Figure 6-7 Filters Tab of the Domain Designer 16. d.JasperServer User Guide 15. f. b. e. Choose the “Does Not Equal” comparison operator and type closed as the value. including any calculated fields. click Cancel to clear the Condition Editor. 122 . Click the arrow next to the opportunity_type column to create a condition for it in the Condition Editor. Click Next to proceed to the Filters tab. The list of available columns is identical to the one on the previous tab. Define two filters as follows: a. c. JasperServer did not find any values for this column in the data source. Click OK to save this condition as well. If you select the wrong one. This also places it in the Condition Editor. g. Create another condition by expanding the p1cases table and double-clicking the status column. Expand the join tree and the opportunities table in list of Available Fields. Click OK to save this condition in the list below. but you can still enter a value in this way. and select Existing Business from the list of available values.

remove the unwanted items. in the properties table shows the Edit description dialog: Figure 6-9 Edit Description Dialog of the Domain Designer For this example. create the sets and items in the following table. Figure 6-8 Display Tab of the Domain Designer The join tree is shown on the left again. then type the new label.. A set is a grouping of items independent of the tables in which the columns originate. To change the order of sets or items. To rename an item or set. Double clicking the description property or clicking . You can double-click or drag-and-drop sets and items between the two lists. Display properties include labels. The names and descriptions shown here are meant to be realistic but do not represent an actual business case. 123 . select them and click the arrow buttons to the right of the list. that is chosen to appear in the Domain. An item is a column or calculated field. You can also use the icons above the lists to create new sets and move columns into them. To the right of it is a list of sets and items that will appear in this Domain. descriptions that appear as tooltips. along with its display properties. and then rename the sets and remaining items and give them descriptions. The simplest way is to double-click JoinTree_1 to select all of its tables and columns. as well as default formats and summary functions.Creating Domains 17. Only columns from the joined tables in JoinTree_1 will be added to this example Domain. The table on the right shows the display properties of the set or item selected in the list. 18.. Create a hierarchy of item sets and items from the tables and columns in the left-hand list. Click Next to proceed to the Display tab. select it and double-click its current label in the properties table.

Date: data format of Jan 01. 124 . these items will have the data formats and summary functions by default. 2009 Opportunity. 2009 When used in reports. Set the data format and summary properties on the following items: Opportunity. Click Save in the Add New Domain dialog. Click Done. Amount: data format of ($1. The Edit tab under the design heading informs you that the design has been created and that you can launch the Domain Designer again to edit it. State First Name Last Name Date Amount Probability Description Source Stage Case Date Summary Description Resolution Status First Name Last Name Name of customer Account type Primary industry Estimated annual revenue Estimated number of employees City and state of headquarters Given name Surname or family name Date opportunity opened Anticipated amount of the contract Estimated chance of winning the contract Description of the opportunity Lead source Sales stage Case number Date case opened Name or summary of the case Detailed description of the case Description of the case resolution Current status of the case Given name Surname or family name Item ID Item Label Item Description 19.JasperServer User Guide (Set ID) Set Label Set Description (accounts) Account Customer account information name account_type industry annual_revenue employees city_and_state (users1) Account Rep Primary account representative (opportunities) Opportunity Sales opportunity first_name last_name date_entered1 amount probability description1 lead_source sales_stage (p1cases) P1 Case High priority support cases case_number date_entered2 name2 description2 resolution status (users2) Case Rep Support case representative or engineer first_name1 last_name1 Customer Type Industry Revenue Size Employee Size City.234) and summary using average P1 Case. Date: data format of Jan 01. The example Domain design is finished. The new Domain is stored in the repository folder named in the Location field and appears in search results. 20. The Add New Domain dialog appears again. 21.

The text field shows the repository path of the chosen data source. For more information. no Domain is created. there are sample data sources in Organization > Data Sources and Organization > Analysis Components > Analysis Data Sources. Both contain JDBC data sources that can be use for a Domain. Click Browse to open a dialog that lets you choose from among all the data sources in your organization. The Save button validates your Domain components then saves the Domain. Resources – Optionally specify a security file and one or more locale bundles. as well as set its repository object properties. you will select schemas when you launch the Domain Designer. when modifying an existing Domain.3. “Domain Validation. The Cancel button exits the dialog without saving any of your Domain settings. JasperServer locates Domains by their repository object type. 6.3. Properties heading: For new Domains. The default location is the last folder selected in the repository. such as an Oracle RDBMS. For new Domains. and the properties of its repository object. a design or valid design file. and a display name on the Data and Design page before you may navigate to the Resources page or Save a Domain. The location for Domains in the sample data is the Organization > Domains folder.3 Using the Add New Domain Dialog The dialogs entitled Add New Domain and Edit Domain are identical and are used to define all the components of a Domain. The mandatory components of a Domain are: A data source selected from the repository A Domain design created interactively with the Domain Designer or uploaded from a file Figure 6-10 Data and Design Page of the Add New Domain Dialog Data Source heading: You may use only data sources that are in the repository and to which your user has access privileges. it remains unchanged. not by their location.” on page 126. If you installed the sample data. There are two pages: Data and Design – Specify the domain’s data source. see section 6. If your data source supports schemas. To navigate between pages.3. enter a display name and specify a location in the repository by typing or clicking Browse. but you may use any location. its domain design. 125 . click the page name at the top of the dialog or the Next and Back buttons at the bottom.1 The Data and Design Page The Data and Design page of the Add New Domain and Edit Domain dialogs lets you specify the mandatory components of a Domain.Creating Domains 6. You must specify at least a data source. Domains may only have JDBC-based data sources.

you need to edit the files and upload them again. The description is displayed with the Domain in the repository and when users are selecting a Domain to create an Ad Hoc report. 6.JasperServer User Guide The description field is optional but recommended.” on page 139. For more information. On the Upload tab. If the settings are in the uploaded files. “Domain Design Validation. Design heading: On the Edit tab. 4. Figure 6-11 Resources Page of the Add New Domain Dialog The Resources page is documented in section 7. In special cases where you need to create a design before the data source is available. See the JasperServer Administrator Guide. If validation fails. verify that all items originate in the same join tree. In each defined set.3. Verify that all items reference existing columns. 3. “The Domain Design File. Make the necessary changes to your settings and save again. this step can be omitted by setting a parameter in the JasperServer configuration file. The Add New Domain dialog checks the syntax of files when they are uploaded.2 The Resources Page The Resources page of the Add New Domain and Edit Domain dialogs lets you upload security and locale bundle files for your Domain.” on page 139. 5. both tabs indicate that a design has been created. click Launch Domain Designer to open the interactive Domain Designer dialog. When you click Save. You can use this page to add.4. the Add New Domain or Edit Domain dialog performs the following validation. You can then edit your design in the Domain Designer again or upload another file to replace the current design. 6. replace. “The Domain Design File. Verify that the tables and columns of the Domain design exist in the data source.3. 126 .1. If a security file has been uploaded. the Add New Domain dialog remains open and a message appears to help you correct the error. see section 7. or remove any previously uploaded files for your Domain. The first four steps are the same as in section 6. but overall consistency must be checked when saving the new or edited Domain. After using the Domain Designer or uploading a design file.3 Domain Validation The validation of a Domain ensures that all of its components are consistent among each other.” on page 134: 1.1. verify that all items and sets in the security file exist in the Domain design.10. 2. click in the text field or Browse to specify a design file to upload. Verify that derived tables have valid SQL queries.

“Domain Design Validation. replacing any current design. The Done button validates your design then saves it in the Domain.10. For more information. “Locale Bundles. For more information. but you cannot save your settings until you make a selection on the Display tab. The Cancel button exits the dialog without saving any of your design settings. To navigate between tabs.2 Tables Tab The Tables tab presents all the tables and columns found in the chosen data source so you can select the ones to appear in the Domain. or if you access synonyms on an Oracle database. To be precise. even if their columns will not appear directly in the Domain. 6. see section 7. For data bases that support schemas.4. For example.4.5. either directly or indirectly. and the Tables tab will present all tables and columns found in those schemas. Display – Give display properties to various tables and columns to expose them sets and items in the Domain. Typically.” on page 134. Along the top of the Domain Designer are tabs for various aspects of the design: Tables – Select all tables whose columns you wish to use in the Domain. select all tables you wish to reference in your Domain design. see section 6. Filters – Specify conditions on field values to limit the data accessed through the Domain. you select the tables that need to be joined. See the configuration chapter in the JasperServer Administrator Guide. Exporting the XML from the Domain Designer avoids having to write it from scratch. for example to duplicate settings with copy-paste or to enter a complex formula. Calculated Fields – Enter expressions whose results appear as calculated fields.” on page 161. 6. For new Domains. Use this feature if you wish to edit your Domain design in an external editor. Additionally. 127 . Use this button to create a template for your locale bundles after you have defined your sets and items on the Display tab.” on page 139.4. Export Bundle Stub – Exports a Java properties file for the labels and descriptions of sets and items in your design. For more information.Creating Domains 6. Export Design to XML – Exports the Domain design in its current state to an XML file. Cancel – Closes the dialog without saving your Domain design and returns to the Data and Design page. click the tab name at the top of the dialog or the Next and Back buttons at the bottom. “The Domain Design File.4 Using the Domain Designer The Domain Designer is an interactive dialog for specifying all the settings in the design of a Domain. “Domain Design Validation. Check Design – Validates the domain as described in section 6.1. regardless of which tab is selected. select the tables containing columns that you will use in a derived table or calculated field. you will be prompted to choose one or more schemas.” on page 134. no design is saved. If your data source has special data types such as CLOB or NVARCHAR2. Same as clicking Done at the bottom of the dialog. Once you have selected the tables on the first tab. it remains unchanged. It gives you the option of automatically generating keys based on the set and item IDs. the Tables tab shows all columns that have a supported type listed on page 143. when modifying an existing design. therefore you must understand the logical design of tables in your data source.4.10. Joins – Define inner and outer joins between all the tables and derived tables. Same as clicking Cancel at the bottom of the dialog. you need to configure JasperServer to recognize them. such as an Oracle RDBMS.1 Designer Tool Bar The tool bar buttons operate on the Domain design in its current state. Derived Tables – Enter queries whose results appear as derived tables available in the Domain. see section 7. you may jump to any tab. Done – Saves your current selections as the Domain design and returns to the Data and Design page.

then launch it again: New tables and new columns appear in left-hand list. see section 6. single-click a table name and use the arrow button between the list. if you had selected the dropped columns for display. new columns appear under their table name. “Maintaining Referential Integrity. then click Add to open a dialog to select an available data source from the repository. the Domain Designer removes those columns or tables from the Tables tab. All the tables in the schemas you choose will appear in the left-hand list on the Tables tab. The Data Source field at the top shows the name of the data source for your Domain. Alternatively. [ Figure 6-12 Manage Data Source Dialog of the Tables Tab You can edit the alias by double-clicking the alias name and typing a new alias. all previous settings in the Domain Designer that do not conform to the new data source will be lost without prompting.5. column-level selections are made on the Display tab. you need to create a new data source objet and use it to replace the previous one in your Domain. When you accept. double-click it or drag it out of the Selected tables list. If your data source supports schemas. 128 . For deleted tables and columns that were selected in the Domain. The default alias for a data source is the display name of its repository object.3 Manage Data Source Domains assign aliases to data sources. Usually this is not necessary because the data source alias is not displayed to Domain users. Because the Tables tab selects entire tables. For information about removing columns that were displayed through the Domain. the generated joins will appear on the Join tab.4. Use this button to replace the data source with an equivalent one. you must add all new columns together by moving their table name to the right-hand list. Click OK to apply your changes. To remove a table you do not want. you are prompted to remove them from the right-hand list.” on page 136. you must manually remove them from the Display tab. To update a Domain after making changes to your database structure. click Select Schemas to choose among all available schemas in the data source. The Inspect new tables and automatically generate joins check box creates joins only if your database has been configured with referential constraints (foreign keys). 6. such as an Oracle RDBMS. However. selecting it has no effect. click Delete to remove the current one. However. You can also click the doublearrow button to clear the list of Selected tables. To change the data source and alias. The Replace button lets you select a different data source to be associated with the alias. When you change the data source. if your database changes servers.1. If you change the data source. Otherwise. or click Cancel to return to the Tables Tab without changing the data source. For example. otherwise the Domain will have a validation error. Click Manage to change the chosen data source. Double-click or drag a table name in the Choose tables list to move it to the Selected tables list.JasperServer User Guide Click the tree icons beside the table names to inspect the columns of a table. If applicable. only whole tables may be selected on this tab. all of your settings in the Domain Designer that do not have an are discarded. click Done to close the Domain Designer. and the Manage Data Source dialog available on the Tables tab lets you set aliases as well as change the data source. The Tables tab does not detect changes to your database tables and columns in real-time.

By default.” on page 116. Click New to begin defining a derived table. Type a name for your table in the Query ID field. the WHERE clause may contain conditions that determine the rows of the derived table. it can only be selected by editing an existing join. For example. removing it on the Joins tab also removes it from the list of selected tables on the Tables tab. Your query may refer to any table or column available in the data source shown. all based on equality between values in each column: Join Inner – The result will contain only rows where the values in the chosen columns are equal. In this example. In order to create a join between two tables. it is easier to specify the column names in the SELECT clause of the query. and with blanks otherwise. JasperServer supports the four most common join types. but don’t click them. paired with a row of the right-hand table when the values in the chosen columns are equal and with blanks otherwise. select a column in each table with the same logical meaning and compatible formats. a user might also appear several times if different support cases refer to the same support engineer user ID. and filled with blanks otherwise. all columns in the result are selected. or in order to join it to itself.). 129 . Change Table ID – Lets you edit the name of the selected table. Once a derived table is defined. each must have a column with the same meaning.1. A distinctive icon identifies it as a derived table.4 Derived Tables Tab A derived table in a Domain is defined by a custom query and a selection of the columns in the result. If you only want a few columns out of many. the query is written in SQL.4. Join Left Outer – The result will contain all the rows of the left-hand table. The result will contain all rows from both tables. you may need to duplicate a table in order to join it several times without creating a circular join. Join Right Outer – The result will contain all the rows of the right-hand table. a table with data for support cases has a column for the assigned engineer user ID that can be joined with the table of user data that has a user ID column. then click one of the join icons. the result of a right outer join will contain all the users and the support case assigned to each. If the deleted table was the only instance of a table. On the Joins tab. Click Create to add the derived table with the current selection of columns to the left-hand list of tables and columns. 6. Use control-click to change the selection. and is updated everywhere it appears in the Domain Designer. the result of a left outer join will contain all support cases even if they do not have an assigned engineer. Enter a valid SQL (JDBC) query in the Query field. The new join appears below in the list of joins. if any.4. the result of an inner join will contain only support cases that have been assigned to a support engineer. the list of selected and derived tables is duplicated in two lists. You can also duplicate a table so it may be joined with different tables for different uses. The syntax for a valid SQL query does not include a closing semi-colon (. Expand the tree icons of the tables in the left-hand list to view column names you may wish to use. In some cases. The new name becomes the ID of the table throughout the Domain. as described in section 6. The copy appears in both lists. In the support case example above. If the support cases are in the left-hand table of the example. the other to choose the right table. Multiple joins associate columns across many tables to create powerful data visualizations when used in reports. one to choose the left table.Creating Domains 6. Because Domains are based on JDBC data sources. Expand a table in each list. click Run to test it and see the list of columns in the result. The number of tables and joins in your Domain depends on your business needs. When your query is complete. Delete Selected Table – Removes the table from both lists. the columns selected from the result are available for use in the Domain design.5 Joins Tab Joins create associations between tables so that their rows may be presented together in the same report. The result of an SQL query is a table whose structure and contents are determined by the clauses in the query. paired with a row of the left-hand table when the values in the chosen columns are equal. “Domain Use Cases. If the users are in the right-hand table of the example.1. Click the following icons above the left-hand list to make copies of a table: Copy Table – Copies the selected table and gives it a name with sequential numbering. Full Outer Join – This join type cannot be created directly. For example. paired when the joined columns are equal.

you can later give it a descriptive label and full description. Select a datatype for your calculated field. This name becomes the ID of the field in the Domain. To insert a reference to the value of another column. Columns of table A and table C may appear in the same report because their tables belong to the same join tree. To clear the calculated field editor without saving. 6. click Cancel. then join tables D and E. use the indications of the error message to help correct the expression. For most expressions this is also the datatype of the columns you wish to use in the expression. When you select a join on either tab. use the Joins on Selected Table tab to see only those defined on the table currently selected in the left-hand list. qualified by its table name. Click Create Field to being defining a new calculated field. all columns that appear in the expression for a calculated field must be from the same join tree. Therefore. 130 . Calculated fields have a distinctive icon for easy recognition in the list of columns. The expression you write must compute a value of this type. The expression uses the Domain Expression Language fully described in section 7. because the calculated fields editor does not validate expressions as they are written. Enter the expression to compute the value of your calculated field. Delete Join – Removes the selected join definition from the list of joins and from the Domain design. a calculated field appears in the table or join tree whose columns are used in the expression.” on page 150.4. you need to be familiar with the datatypes of the various columns in your data source. This list include the Full Outer join type that cannot be created directly. For example.6 Calculated Fields Tab A calculated field is defined by an expression that computes a value based on the values of other columns. their columns may not be compared or appear in the same report. Figure 6-13 Calculated Fields Editor in the Domain Designer Click OK to save your new calculated field. The Domain Designer validates the expression and warns you of any errors at this time.JasperServer User Guide Below the lists of left and right tables. if you join tables A and B. Tables A and D are said to be unjoined. If you have many joins in your domain. Once validated. In order for the values to be coherent. there will be two join trees. Do not insert column reference from unjoined trees. the All Joins tab summarizes the joins you have defined. The result of the Joins tab is a number of join trees that appear on subsequent tabs. you can change the join type by selecting another type in the drop-down list. expand the join-tree to find its table and double-click the column name. If there are errors. The column name appears in the expression at the cursor. “The DomEL Syntax. Tables that are not joined appear individually along with the join trees. Enter a short name for your calculated field.2. B and C.

” When you select a whole string matching operator. double-click the available values to select them. You may define a filter on a column that you do not plan to expose in the Domain. then click Create Condition. Alternatively. Calculated fields may be used to compute other calculated fields. but nothing earlier. you might create an integer field named Count that has the value 1 and later has a default summary function to count all occurrences. if you select a date column with the “is between” operator. If there are more than 50 values to display. then click OK to save the new definition. The filter will still be active and only data that satisfies all defined filters will appear to report users. reports based directly on the Domain can define their own filters.4. 131 .7 Filters Tab A filter on one or more columns reduces data that is not needed or not wanted in reports based on the Domain. cancel any input in the calculated field editor.Creating Domains An expression that does not use any columns will have a constant value. or its expression. To define a filter that compares two columns of the same datatype. For example. you should clearly document such data restrictions in the description of your Domain. If you only wanted to view the definition of the field. It is always good practice to filter out irrelevant data to reduce the size of query results and processing time within JasperServer. financial reports for the current fiscal year may need data from the previous fiscal year for comparison. Also. then click the name of the field in the left-hand list. edit. The filter value depends on the datatype and the comparison operator. in which case it doesn’t make sense for the column to appear in a report. the choice of comparison operators depends on the datatype of the column. select the second column with a Control-click. For example. 6. so that users understand what data is accessible through the Domain. Select a column in the left-hand list and click Create Condition to begin defining a filter on that column. Click Delete Field to remove the calculated field from your Domain design. Putting often-used filters in the Domain design avoids the need for each user to define them independently and also reduces the chance for errors. Double-click the calculated field name to insert a reference to it into an expression. you may filter data to select a single country. For example. For multiple value matching. In the Condition Editor. click Cancel to remove it from the editor. This button will only be enabled when two columns of the same type are selected. its type. the dialog displays a list of all existing values for the chosen column retrieved in real-time from your database. For example. the condition editor will display two calendar icons for specifying a date range. For example. use the search controls to the left and click to narrow your list of available values. To view. or delete the definition of a calculated field. However. You may perform multiple searches and select values from each list of results. Modify its name. Figure 6-14 Condition Editor on the Filters Tab of the Domain Designer Text columns have both substring comparison operators such as “starts with” or “contains” and whole string matching such as “equals” or “is one of. string types offer a choice of string search operators and date types have a choice of time comparison operators. Constant fields are independent of join trees and automatically appear in a set called Constants. you can click the arrow next to the column name or double-click the column name.

all items in a set must correspond to columns in the same join tree. You can also expand sets in the right-hand list and drag-and-drop tables and columns to the destination set. Then add items chosen among the columns of the left-hand join tree. All tables are created as sets. you may also click the Delete Condition button to remove it from the list. users will only be able to include items that originate in the same join tree. The new name becomes the ID of the table throughout the Domain. 6. to further help report creators. as they appear on the Join tab. To clear the condition editor without saving a filter. Use carefully. and is updated everywhere it appears in the Domain Designer. 132 . If you want to display all or most of your tables and columns in the join tree. Sets are optional. and columns are added as items within the destination set. you may create a list of items outside of any sets. and unneeded columns should be omitted to simplify the report creation interface. Removed items automatically reappear in the join tree or table where they originated in the left-hand list. Then remove any unwanted sets or items individually from the right-hand list as follows: Delete (above Sets and Items) – Removes the selected set or item from the left-hand list. Change Table ID – Lets you edit the name of the selected table. Click a row of Current Conditions to edit it again in the Condition Editor.4. including any calculated fields in their defined locations. On the Display tab. Typically. You can then remove any unwanted sets or items from the right-hand list as described above.” In other words. The table list displays the list of unjoined tables and derived tables. it creates a subset. Add to Set – Select a destination set in the right-hand list. You can also drag-and-drop tables and columns from the join tree to the list of sets and items. double-click the join tree name or drag-and-drop it to the list of sets and items. if a set or item within a set is selected. You may include any combination of joined and unjoined items in the list of Sets and Items. but when creating a report. however. If you only want to display a few of the columns from the join tree. A column along with its display properties is called an item in the Domain. After selecting a row. The table is removed from the Joins tab. click Cancel. then make a selection in the join tree and click this icon: tables are added as subsets.8 Display Tab The Display tab lets you specify which columns and calculated fields are exposed through the Domain and how they will appear. The list of Current Conditions shows all the filters you have defined. only columns that are useful in reports or for further filtering should be selected. Click OK to save your changes. The Join Tree list at the left of the tab contains all the join trees and unjoined tables. Delete Selected (above Table List) – Removes the currently selected table from the left-hand list and from the Domain altogether. you also define display properties for each chosen column. Add New Set – Creates a new set or subset in the list of sets and items. If no set is selected it creates a top-level set. You can also double-click the object or drag-and-drop it to a blank area of the join tree list. the overall filter applied to your data is the logical AND of all conditions you have defined. It also activates the following icons: Add All (active only if the right-hand list is empty) – Creates all the tables as sets and all the columns they contain as items in the right-hand list. and the columns they contain are created as items within the sets. The label name is also updated in the list of properties. The list of Sets and Items to the right shows the sets and items that will appear to report creators. start by creating sets in the right-hand list. Change Label – Lets you edit the name of the selected set or item. A set is a grouping of items independent of the tables in which the columns originate. Add Selected – Make a selection in the join tree and click this icon: tables are added as sets. click OK to define your filter. The note at the bottom of the current conditions reminds you that “data rows much match all conditions. such as a label and description. The left-hand list also offers an alternative view mode: click Table List just below the icons.JasperServer User Guide After choosing the comparison operator and filter value. and any joins with this table are deleted. and columns are added as items outside of any set.

All table and field properties are read-only. and providing descriptions for them: To change the order of sets or items..9 The Properties Table The properties table is located on the Display tab to the right of the list of sets and items. For sets and items. 6.Creating Domains After your list of sets. The following properties are available. Item Description An identifier used within the Domain. Subsets always appear after the items in a set.5. All others you can double-click to edit. 133 .4. description. select it then click the Change Label icon or double-click its label in the properties table. Data Source Source Table Type Table. properties shown in red are read-only. to edit the description. description. Field Table. The internationalization keys are the property names of internationalized strings in locale bundles. depending on the selected object: Table – The name of the table and the name of the data source (view-only) Field (column) – The name of its table in the data source and its Java datatype (view-only) Set – The label. The label and description help report creators understand the data represented by the set or item. you should not change any IDs. You can reorder items within a set and sets within the list. Field Set. When creating a Domain. The data format and summary properties determine how the item will appear by default in a report. Field Field Alias of the data source for the selected field or table. It lets you view and edit the display properties for the currently selected set or item.. refine your Domain display by reordering them. Property ID Appears On Table. internationalization keys. For more information. The following table describes each of the properties in detail. When editing a Domain that has been used to create Topics and reports. or click . Set and item descriptions appear as tooltips in the Ad Hoc Editor and help report creators understand their purpose. and internationalization keys (view and edit) Item – The label. but you may change the ID of a table as long as it remains unique. To achieve this. but items and subsets may not be moved into other sets. Java type of the selected field. Does not change when the ID property of a table is modified. select it then double-click its description in the properties table. The display properties determine how the sets and items will appear to users of the Domain. “Maintaining Referential Integrity. To add a description to a set or item. Table and field IDs are based on the names in the data source.” on page 136. Set and item IDs are a separate namespace in which each ID must be unique. select the objects and use the arrow buttons to the right of the list to move them up or down. although based on table and field IDs by default. the properties of tables and columns can also be viewed. renaming them. you may change any set or item ID as long as it is unique among all set and item IDs.1. subsets. remove the item or subset and add it again in the new set. and items is defined. When the left-hand list displays the Table List. To rename a set or item. and default format and summary properties (view and edit) Figure 6-15 Table of Properties on the Display Tab of the Domain Designer Table and field properties appear only when Table List view is enabled. see 6. Name of the selected table or of the field’s table in the data source.

the syntax is Domain_jointree. The data format is a numerical or date format. For a large number of sets and items. Label ID Descr. Verify that all tables and columns exist in the data source. Default summary function for the item when used in a report. Item Set. If you change the data source.datasource_field. when navigating from tab to tab. When you click Done to exit the Domain Designer.4. When you click the Validate tool bar icon. Validation is important because the Domain design may include derived table queries and calculated field expressions entered by the user. Internationalization key for the label property. References the Domain names of the table and field associated with this item. For more information about the internationalization keys.Domain_table. locale bundles associate this key with the localized text for the set or item label. for example ($1. When you export the design file. In each defined set.4. See the JasperServer Administrator Guide. Default data format for the item when used in a report. For more information about saving and uploading XML. Validation performs the following steps: 1. This will detect any inconsistencies in Domain designs from uploaded files. Internationalization key for the description property. this step can be omitted by setting a parameter in the JasperServer configuration file. “The Domain Design File. Make sure your set and item IDs are finalized because they are used to generate the keys. The generated keys are added to your Domain design and appear in the table of properties. see section 7.” on page 139. The description helps the report creator understand the data represented by this set or item. “Locale Bundles.” on page 161. Items with string values do not have a data format. see section 7.10 Domain Design Validation The Domain Designer must ensure that all tables and columns are consistent with the data source. Item Description User-friendly name displayed in the Choose Ad Hoc Data wizard and the Ad Hoc Editor. Item Set.1. 6. Item Item Item Summary Item Labels and descriptions may contain any characters. ID Source Data Format Set.” on page 127. all others let you count distinct values or count all values.1. If you wish to edit the properties for a large number of sets and items. See section 6. User-friendly description displayed as tooltip on the label in the Ad Hoc Editor. This will detect problems on the tab where they occur.234) or 01/01/2009.JasperServer User Guide Property Label Description Appears On Set. this could be faster than using the properties table on the Display tab. locale bundles associate this key with the localized text for the set or item description. verify that all items originate in the same join tree. In certain cases. In special cases where the design is created before the data source is complete. Numerical items have functions such as sum or average. but the ID property value must be alphanumeric and not start with a digit.5. “Designer Tool Bar. Export Bundle Stub – Generates the internationalization keys if needed and saves them to a file that serves as a template for your locale bundles. the following buttons in the tool bar can help: Export Design to XML – Lets you edit the properties of your sets and items within an XML file. 134 . Validation occurs at the following times: When opening the Domain Designer. 2.

4. You can edit a Domain by changing. Log in to JasperServer as an administrator and select View > Repository. adding to.1. a message appears when validation fails to help you correct the error. This allows you to reimport the XML file of your Domain design after exporting it and making modifications in an external editor. there is no message when validation succeeds.5. A Domain specifies the data source for the Domain Topics and reports that are based on the Domain. select the Edit tab and click Launch Domain Designer. Alternatively. typically by setting the Domain filter. Under the Data Source heading. Under the Design heading.4. click Next or Resources. 6.5 Editing a Domain Use extreme caution when editing Domains that might have been used for reports and Domain Topics.” on page 127. . Unless you clicked the Validate tool bar icon. the definitions in your Domain design will no longer be valid and you will not be able to save the Domain. see section 6. If you change to a data source with a different database. The Domain appears in the Edit Domain dialog. This dialog is identical to the Add New Domain dialog documented in section 6. and deleting its components. Verify that derived tables have valid SQL queries. 3. Changing the data source only makes sense in certain cases. for example if your data source definition changes slightly but not the underlying database. The Resources page is further documented in section 7. use the repository manager to move the Domain object to a different folder. 5. However.” on page 125. 135 7.” on page 136. “Using the Add New Domain Dialog. To change the location of a Domain.1. To edit a Domain: 1. “Maintaining Referential Integrity. Verify that all items reference existing columns. For instructions. Right-click an existing Domain and select Edit from the context-menu. “Using the Domain Designer.3. select the Upload tab. Browse or search the repository to locate the Domain. Under the Properties heading. They might fail if the underlying Domain is edited. they will certainly fail if the underlying Domain is deleted. 6.Creating Domains 3. If you wish to add or replace the security file or locale bundles for the Domain.” on page 139. you can change the display name or description of the Domain’s repository object. Before you proceed. 2. see section 6. Figure 6-16 Data and Design Page of the Edit Domain Dialog 4. click the path or click Browse to change the data source for your Domain. and click Browse to locate a Domain design file. See also “Maintaining Referential Integrity” below if you need to remove items in your Domain. “The Domain Design File.

it is up to the user to maintain the referential integrity between the items in the Domain and any Domain Topics or reports that have been created from the Domain. some users were confused by the additional items and used the date_modified item in their reports. You can. an administrator or data analyst creates a Domain and many end-users create Topics and reports based on it.” on page 133). you must be sure that no Domain Topics or reports are based on that item. 1. it is necessary to communicate with users beforehand. that only allows new reports to use the Domain Topic. However. This means that changes to sets and items that are not used in a given report or Topic do not affect the report or Topic. 136 . as are any reports based on Topic A that did not include the deleted item.4. However. all the items that it references are still defined in the Domain. This may occur if it was erroneously included in the first place and found to expose data that should not be exposed. see the JasperServer Administrator Guide. 9.2.9. Moving an item must be treated as deleting it from its current location so it can be added elsewhere. it does not fix the broken reports based on the items deleted from the Domain Topic. This will remove any data that was based on the old instance of your Domain and avoid inconsistencies in new reports. To change the name of an item or set. open a Domain Topic for editing and remove references to deleted items. click Cancel. however. The Domain in this example is similar to the one in section 6. If you modify a Domain by removing sets or items. click Save to update the Domain with your changes. so that each may modify his or her reports that use the item. For example. not its ID (see section 6. and the user will require support to fix the broken report. even after the original item has been removed. Changing the ID of an item or moving it to a different set will also make it unavailable to any Topics and reports that referenced the ID. It may also occur if the underlying database changes so that the item is no longer valid. When deleting Domain items in a case like this. The granularity of referential integrity is at the individual set and item level. the sets and items referenced in the Domain must still exist in the Domain. then Topic A will fail and reports based on Topic A that included the item will fail. allowing the user to open the report and edit it. When done.JasperServer User Guide 8.5. the solution for maintaining referential integrity is to avoid deleting items from a Domain if they might be in use. To close the dialog without modifying the Domain stored in the repository. A Domain Topic that references a deleted item will cause errors when used in the Ad Hoc Editor. Unfortunately. you must clear your Ad Hoc cache of all queries based on the Domain.2 Fixing Referential Integrity Normally. edit its label property. the creator accidentally exposed the accounts_opportunities table that contains no useful columns and is necessary only to join the accounts and opportunities tables. For instructions. “Example of Creating a Domain. The following procedure explains how to fix referential integrity with placeholder items. Instead. it becomes necessary to remove an item or set from a Domain. Sometimes. Any report that references a deleted item will no longer run. “The Properties Table. 6.5.1 Maintaining Referential Integrity When editing an existing Domain. if you delete an item used by Topic A but not Topic B. JasperServer provides a mechanism to replace the deleted item with a placeholder. nor can it be opened in the Ad Hoc Editor again. In a typical scenario. there is inevitably a report that is not updated. However. But Topic B and its reports are unaffected. Even if the underlying tables and columns still exist in the database. 6. After modifying a Domain.” on page 117. Referential integrity means that at the time a Domain Topic or report is opened or run. Domain items are identified by their IDs and the IDs of the sets in which they are located.

3. we learn that the date_modified item that we need to replace had the ID date_modified1 in a set with the ID accounts_opportunities. Click the Calculated Fields tab of the Domain Designer. We use the ZZ prefix on the name to distinguish it from other meaningful columns in the Domain. In general. For the syntax of calculated field types. Now click the Display tab of the Domain Designer. and was of the type java. A calculated field is essentially a custom column of a userselected type. the dialog lists the item label. the set and items IDs as a path. “Datatypes. Then we enter an expression that gives a constant value of the same type. we create a constant value that will be recognized as a placeholder should it actually appear in a report. which must match the type of the item that this placeholder will replace. Click Create Field and enter values as shown in Figure 6-18. For each deleted item.” on page 151. so we must create a placeholder set as well. Since the value of the column is not important. From the dialog.1. the set was deleted along with the item. We remove the accounts_opportunities set and all its items by selecting it and clicking the Delete icon . Figure 6-18 Creating a Calculated Field of the Same Type 4.Timestamp.sql. Figure 6-17 also shows the warning dialog about referential integrity. the placeholder item must exist in exactly the same path of nested sets as the original item. In this example. in this case a timestamp. Figure 6-17 Deleting Items From an Existing Domain 2.Creating Domains Figure 6-17 below shows the Domain open in the Display tab of the Domain Designer. and that is what we need to create a placeholder. see section 7. Placeholder items must be located in placeholder sets that mimic the same structure as the original item that was deleted. The most important setting is the type. 137 . The dialog shows all the items that are deleted and the information necessary to replace them with placeholders. and the data type of the item.2.

1. We set the label and description to distinguish the placeholders from real items and discourage their use when seen by users in the Ad Hoc Editor. 4. using the values shown in Figure 6-20 above. also noted in step 2.6. “Structure of the Design File.” on page 141. For more information. This will remove the reference to the unwanted column. Click the Add to Set icon to create the placeholder item from the calculated field. but now that they are identical to those of the deleted item and set. first create the constant calculated field. The IDs are not visible to users. as described in section 7. then enter the ID value of accounts_opportunities that we noted in step 2. and replace it with an item that references the placeholder field. 3. Select the placeholder set created above and double-click its ID property. Now expand the list of Constants to select ZZdate_modified created above. as shown in Figure 6-19. Then locate the item definition and change its resourceID so that it references the newly created calculated field. 2. then enter the ID value of date_modified1. the placeholder will be substituted in reports and in the Ad Hoc Editor.1.3. Figure 6-19 Inserting the Calculated Field as a Placeholder 5. Alternatively.4. Now we edit the properties of the placeholder set and item so that they will effectively replace the deleted item. Save the design file and upload it. see section 7. the modifications are the same as described in this procedure. Conceptually. as described in section 7. Figure 6-20 shows the properties for the placeholder item and set after they have been modified.1.3. Now select the new item created above and double-click its ID property. Figure 6-20 Setting the ID Properties to Match the Deleted Item 6.JasperServer User Guide Click the Add New Set icon to create the placeholder set. you can edit the XML design file of a Domain to fix referential integrity. but the order is slightly different: 1. 138 .” on page 150. “Uploading a Design File to a Domain. ensuring that the report can be opened and run. Click Done in the Domain Designer and then Save in the Edit Domain dialog. Instead of deleting the item. You must be familiar with the design file syntax to create the calculated field with the correct type and expression. Update the other properties of the item and its enclosing set. “Representing Sets and Items in XML. You can even do this in the Domain Designer before exporting the design file.” on page 147.

see section 6. A design file can be modified or written from scratch in an editor and uploaded to JasperServer. There are several common use cases for working with design files: 139 . and item as used in Domains. For a definition of the terms column. calculated fields. any derived tables. however there is also an XML file format for exporting and uploading the settings. they provide data access permissions and localized strings for reports based on a Domain.1 The Domain Design File The design of a Domain specifies the selection of tables in the data source. A design has additional constraints that are not mapped in the XML format. as well as how those elements will appear to users. the Domain design itself can be exported to an XML file and edited outside of JasperServer.” on page 116. In addition. “Terminology. Data security and localized strings are defined in external files that Domain creators must upload to the Domain. there are constraints on a Domain design that are not expressed in the XML schema. The text file containing a Domain design represented in XML is called a design file. This chapter contains the following sections: The Domain Design File The DomEL Syntax Resources of a Domain The Domain Security File Locale Bundles 7. The XML file is only a representation from which the design can be inferred. Both take effect in the Ad Hoc Editor when creating the report and in the final output when running the report. When implemented.2. as long as it conforms to the XML schema and the design constraints. The XML in a design file is a hierarchy of elements and attributes on those elements that specifies all the settings in the Domain. the Domain design can be created interactively through the Domain Designer dialog.Advanced Domain Features 7 ADVANCED DOMAIN FEATURES Both the security file and locale bundle are optional components of a Domain. The elements and attributes are defined by an XML schema provided in an XSD file. and filters. This gives Domain creators an alternative way to specify the design and allows Domains to be shared between systems.1. XML is not the native format of the Domain design. This chapter documents the syntax for each of these files and the considerations necessary when writing or modifying their contents. In addition. In JasperServer. We start with the Domain design file because the security file and locale bundles rely on certain values it contains. field. joins.

validated. 2. Other elements of the XML file will appear on some or all of the Designer tabs. you may need to edit each table or item in the design in the same way. Right-click an existing Domain and select Edit from the context-menu.1. column definitions. “Domain Design Validation. The file will contain the current state of the Domain in the Domain Designer. These other resource files refer to elements of the Domain design. Use the Domain Designer to define as much of the design as possible.2 Working With a Design File The relationship between item definitions. When you open the design in the Domain Designer again. 5. Working with very large Domains. On the Edit tab under the Design heading. a design file must meet the following conditions: It must be well-formed XML. Log in to JasperServer as an administrator and select View > Repository. To save the design file. These are constraints that cannot be expressed in the XSD file because they are outside the scope of an XML schema. To export a Domain’s design file: 1. see section 6. In the tool bar at the upper-right of the dialog. This ensures that the elements and attributes are the same ones with the same meaning used by JasperServer. 7. and actual database columns is the essence of the Domain itself and must be maintained when editing the design file. and it is often more convenient to copy-paste them between external files.4.1 Exporting the Design File from a Domain The design file of a Domain can be exported from the Domain Designer dialog and saved as an XML file. If errors are found. 6. spelling and punctuation is correct so that the file contains a hierarchy of elements. but editing the labels and descriptions of dozens of items is faster when they appear in a single design file. typically by setting the Domain filter. The XML schema defines element and attribute names that are allowed and how they are nested to create a hierarchical structure. 140 . For example. you can cancel the export. In order to be usable when uploaded to a Domain. The Domain Designer opens to the Tables tab. a description you added in the XML design file will appear in the Properties table of the Display Tab.xml suffix.1. For example. Be sure to keep the .JasperServer User Guide Completing the elements of a new design. However. 7. click Launch Domain Designer. your modifications will appear and be editable in the Designer.10. it is much easier to begin with a basic design file exported from the Domain Designer or to modify an existing design file. It must be valid with regards to the XML schema. Creating locale bundles and security files as described in the other sections of this chapter. JasperServer validates the design before exporting the XML file. Creating a Domain design from scratch.xsd The design file must be internally consistent and define all the necessary elements of a Domain design. It is possible to write a valid XML file that meets the constraints of JasperServer and defines a Domain design. 3. This means that all syntax. The Domain appears in the Data and Design page of the Edit Domain dialog. and used to define the design of a new or existing Domain. After editing. For more information. Your browser will download the XML file and usually give you the choice of viewing or saving the file. a design file can be uploaded. If your database changes or you want to move a design file to a different system. The Domain Designer makes it easy to select all tables and columns and expose them as sets and items.” on page 134. Using search-and-replace on an external editor will do this quickly. and you will be able to edit it again the Designer. The XML schema of a Domain design is given in the XSD file is located in: <install-dir>/samples/domain-xsd/schema_1_0. attributes and content. 4. then export the design file and add your handwritten code to the exported file. click the Export Design to XML icon . due to the complexity of creating a valid design file. The tabs of the designer show you the design settings for this Domain that will be exported to XML. Repetitive changes to an existing Domain design. you can enter the SQL query for a derived table or complex expressions for a calculated field. select a location and give it a name. Browse or search the repository to locate the Domain.

As a result.1. </resources> </schema> schema – The outer-most container element of a design file (originally called the schema file of a Domain). In addition. If you want to make structural changes or write a design file from scratch.” on page 117. The design must references valid table and column names in the data source. JasperServer exports well-formatted XML. the Domain resource and the XML may not remain totally synchronized through several cycles of exporting to XML. and the columns in the results must match those declared in the design.jaspersoft.w3. However. but it does not correspond to a valid URL. This string must be unique to Jaspersoft. The sample XML code is taken from the example Domain created in 6. However. the Domain Designer cannot read some valid designs. the schema element includes the xmlns and version attributes. This format is documented in section 7.. this type of XML editor lets you insert elements and attributes only in the places they are allowed to ensure that the design file is valid. “Example of Creating a Domain. no editor can enforce the internal and external constraints on a design file. a design file is specific to a given data source and will most likely fail when used in a Domain with a different data source. the Domain Designer sometimes renames the result of a join (JoinTree_1).” on page 150. These rare cases are documented in the following sections. When exported from the Domain Designer. so you don’t introduce other errors.Advanced Domain Features The tables and columns in the design must be consistent with their external definition in the data source of the Domain. editing. The following section explains all of the possible elements and attributes of an XML design file and the various constraints you must maintain on each of them.. and the design must use that column accordingly. a text editor is sufficient. in particular..xsd file.0" schemaLocation="schema_1_0.. in a design file. and resources: <schema xmlns="http://www. For example. As a result. The xmlns attribute specifies an XML namespace for all element names. use an XML editor that understands the XML schema in the schema_1_0. Because certain XML elements correspond to objects in the Domain design.. “The DomEL Syntax.org/TR/REC-xml-names.2. As with any XML file. The data source also defines the datatype of a column. a specialized XML editor will ensure that the design file is well-formed.com/2007/SL/XMLSchema" version="1. and it may have some validity errors that cannot be detected. although some elements have been added to show structures that did not appear in the example. Expressions for filters and calculated fields must be valid programmatic expressions in a local format called Domain Expression Language (DomEL). 7. </items> <resources>. By loading both the XML and XSD files. the tables and columns in the query must exist in the data source. see http://www. For editing the content of the design file.2. table names for a design based on an Oracle RDBMS must include the schema name. For example. and if you only want to make a few changes or simple additions. The top-level container elements of a design file are schema. This is a short-hand description that means the XML elements contain other XML elements that represent the Domain objects. a design file is plain text and can be edited in any text editor. The design of a Domain is stored internally in the repository. The XML is only a representation from which the design can be inferred. The version attribute gives the version of the XSD used to create this design file. which affects the security file. For more information. this section refers to XML elements that contain Domain objects such as sets. Also. and uploading. 141 . the Domain Designer also has limitations and cannot create some valid designs.3 Structure of the Design File This section explains each of the XML elements and attributes in a design file and how they relate to the settings in the Domain Designer. itemGroups. in which case you must not open the uploaded design file in the Domain Designer. </itemGroups> <items>. Furthermore. items.xsd"> <itemGroups>.. you may select the columns of a table whereas you can only select whole tables on the Tables tab. the more complex elements of a design file have further constraints: SQL queries for a derived table must be valid with respect to the JDBC driver for the data source.

analogous to their definitions on the corresponding tabs of the Domain Designer. </jdbcTable> <jdbcTable datasourceId="SugarCRMDataSource" tableName="accounts" id="JoinTree_1"> . In the XML design file.String"/> <field id="assigned_user_id" type="java.. they must be externally consistent with the data source intended for this Domain.. The resources element contains the jdbcTable and jdbcQuery elements to represent database tables and derived tables... derived tables.lang. tables. Even though the itemGroups appear first in the design file. <filterString>opportunity_type == 'Existing Business'</filterString> </jdbcTable> <jdbcQuery datasourceId="SugarCRMDataSource" id="p1cases"> <fieldList> <field id="account_id" type="java. These correspond to the items at the root level of the Display tab. resources – Contains all the definitions of columns...1 Representing Tables in XML In the Domain Designer. Therefore. and filters in the design..Integer"/> <field id="date_entered" type="java..lang.lang. Join trees are represented as a jdbcTable element with additional contents to define the joins.lang. however. items – Contains all the items that are not within sets. itemGroups and items define what users will see when they create a report based on this Domain. 142 . this element corresponds to all the sets and items defined on the Display tab of the Domain Designer. The sets and items defined under itemGroups and items must be internally consistent with the tables and columns under resources.lang.String"/> <field id="resolution" type="java.JasperServer User Guide The schemaLocation attribute is often added by XML editors to locate the XSD file. Because the elements under resources refer to data base objects. calculated fields.. </jdbcTable> <jdbcTable datasourceId="SugarCRMDataSource" tableName="accounts_opportunities" id="accounts_opportunities"> .. </jdbcTable> <jdbcTable datasourceId="SugarCRMDataSource" tableName="opportunities" id="opportunities"> . </jdbcTable> </resources> 7. itemGroups – Contains all the sets and items within sets in the Domain.lang.String"/> <field id="status" type="java. respectively. </jdbcTable> <jdbcTable datasourceId="SugarCRMDataSource" tableName="users" id="users2"> . Along with items.lang.sql.1. not individual columns.Timestamp"/> <field id="description" type="java.String"/> <field id="id" type="java.deleted=false</query> </jdbcQuery> <jdbcTable datasourceId="SugarCRMDataSource" tableName="users" id="users1"> . When all items are contained in sets.priority=1 and cases. this element is absent.String"/> <field id="case_number" type="java. you can only select entire tables. joins.lang.String"/> </fieldList> <filterString>status != 'closed'</filterString> <query>select * from cases where cases..3.. you can specify any subset of columns that you need. this section will document the resources first so that design elements are presented in the same order as the tabs of the Domain Designer. <resources> <jdbcTable datasourceId="SugarCRMDataSource" tableName="accounts" id="accounts"> .String"/> <field id="name" type="java.

table_name.lang.math.Character java. If you add a derived table in the Domain Designer. JasperServer may not be able to map its Java type from the JDBC driver. you can override any mapping by specifying the type attribute for any given field in the XML design file.2 Representing Derived Tables in XML Derived tables are similar in structure to tables. query – The SQL query sent to the database server. the datasourceId will automatically become the alias associated with the data source defined for your Domain. The syntax for a valid SQL query does not include a closing semi-colon (. tableName – Literal name of the table in the data source. Both attributes of field are required: id – Literal name of the column in the data source. Only the columns represented by a field element are available for reference by other elements. this alias must be identical for all tables and derived tables.sql. type – The Java type of the column.Double java. All three attributes of jdbcTable are required: datasourceId – Alias that identifies the data source. Alternatively.lang. but not necessarily within the Domain. When creating a design file. as well as their types. the id must be unique within the jdbcTable. Any reference to the id of a jdbcTable may also reference the id of a derived table.Float java. The id must be unique within the query results.lang. The alias designates the data source that will be queried. type – The Java type of the column.3. id – Table ID that is used to reference the derived table in the Domain design. the id is the same as the alias. fieldList – A required container for the field elements.lang.Date java.” on page 128. field – Represents a column in the results of the query.Boolean java. As in the JDBC model that the data source is based on. 7. 143 .Time java. You could then export the design file containing the generated column list. You must reference all the columns that you use in the Domain. You can configure the mapping for proprietary types. Required on jdbcTable elements because it would not make sense to have a table without columns in the Domain design. JasperServer will raise an exception.1.String java. All the columns that you want to reference in the Domain defined with this element. but not necessarily within the Domain.Timestamp java.4. The columns of a derived table must be among those returned by the query. For a Oracle RDBMS. but this case is documented separately on page 144. id – Table ID that is used to reference the table in the Domain design.lang. field – Represents a column of a table in the data source.Byte java. If your query gives an alias to the column in a SELECT AS statement. If your proprietary type cannot be cast in the specified type. If you have proprietary types in your database. but it must be identical for all tables and derived tables. the set of columns corresponds to the selection of columns in the query result on the Derived Tables tab. as determined from the data source by the JDBC driver. A Domain design must reference all the tables that it needs to access.). In the design file. You may then export the XML design file with this information and refine your design. Both attributes of jdbcQuery are required: datasourceId – Alias that identifies the data source for the Domain. The type is one of the following: java.lang. The jdbcTable element is also used to describe join trees. When uploading the file. Any valid SQL can be used.BigDecimal java. “Manage Data Source.3. When the derived table is created in the Domain Designer. each has the same datasourceId and tableName but must be given a different id.Date Unless you know the name and type of every column in the data source. it is often easier to select and export tables from the Domain Designer. as determined from the data source by the JDBC driver.lang. regardless of its mapping. JasperServer will use this Java type for the field.Advanced Domain Features jdbcTable – Represents a table or a copy of a table in the data source. this is the data source alias defined in section 6.util. The Domain Designer accesses the data source to find the names of all tables and columns. as described in the JasperServer Administrator Guide. id – Literal name of the column in the query result.Integer java. the table name includes the schema name in the form schema_name.sql. If you copy a table in order to join it multiple times. this alias may be any name you choose.Long java. When created in the Domain Designer.Short java. fieldList – A container for field elements.lang. it will run the query and generate columns based on the result set. as long as the columns in the result match the id and type of all field elements of the derived table given in the fieldList.lang.sql. but they use the jdbcQuery element which contains the query element: jdbcQuery – Represents a derived table that is the result of an SQL query.

For more information. The Domain mechanism applies filters.account_id)</joinString> </joinedDataSetRef> <joinedDataSetRef><joinString>right outer join users2 users2 on (users2.” on page 144. including a field calculated in the SQL. see section 7.JasperServer User Guide The following sample query selects some columns.account_id)</joinString> </joinedDataSetRef> <joinedDataSetRef><joinString>join opportunities opportunities on (accounts_opportunities.3.. <jdbcTable datasourceId="SugarCRMDataSource" id="JoinTree_1" tableName="accounts"> <fieldList> <field id="accounts_opportunities. calculated fields within derived tables may use any function call recognized by the RDBMS.currency_id = c.lang. In the design file. Here are some things to keep in mind when deciding how to implement your Domain: Unlike joins defined in the Domain. e.1. Unlike calculated fields in DomEL.opportunity_id == opportunities.exp_date) = c. aggregation. 144 . It also contains a list of columns that are exposed through the Domain. <query> select e. It contains the joinInfo and joinedDataSetList elements to define the actual joins. conv. joins within a derived table are not restricted to equality comparisons when uploaded to the Domain Designer. there is one jdbcTable representing each join tree and containing only the join expressions for that tree.conversion_ratio conv.3. only exp_date. from the result of a join with sorted results. In this case.currency.3. c. “The DomEL Syntax. amount.amount. amount * c. but in the design file you only need to specify those you wish to reference elsewhere in the Domain. To define the join. e.store_id. each with a prefix on the field id attribute to identify its originating table.currency_id and date(e.account_id" type="java.id == p1cases.conversion_ratio as_dollars from expense_fact e join currency c on (e.assigned_user_id)</joinString> </joinedDataSetRef> </joinedDataSetList> </jdbcTable> jdbcTable – Represents the results of one or more joins between tables.id)</joinString> </joinedDataSetRef> <joinedDataSetRef><joinString>left outer join p1cases p1cases on (accounts.String"/> .” on page 150 for restrictions on function calls in calculated fields. datasourceId – Alias that identifies the data source for the Domain. the attributes and elements have a different meaning than for a regular table. The alias designates the data source where the join will be performed. which may be less efficient on some databases than the equivalent query generated for a non-derived table 7.assigned_user_id == users1.id == p1cases. c. See section 7.1. The Domain Designer automatically exposes all columns of all tables in a join. “Representing Joins in XML.exp_date </query> A derived table provides an alternative way to create joins and calculated fields.id)</joinString> </joinedDataSetRef> <joinedDataSetRef><joinString>join users1 users1 on (opportunities. this alias must be identical to that for all tables and derived tables. and as_dollars can be exposed as columns of this derived table.id == accounts_opportunities. store_id. and joins to derived tables by wrapping the SQL in a nested query. If not all tables are joined together.. </fieldList> <joinInfo alias="accounts" referenceId="accounts"/> <joinedDataSetList> <joinedDataSetRef> <joinString>join accounts_opportunities accounts_opportunities on (accounts.2. currency.date) order by e.exp_date.3 Representing Joins in XML A join is represented in the design file as a special jdbcTable element.

The first one must contain a join expression between the table_alias it defines and the alias in the joinInfo element. you must be careful to use the alias throughout the joinString element that defines the join. By default. By default. joinedDataSetList – Container for the list of join statements. In the Domain Designer. Because it references only the columns of accounts. such as boolean operators and other comparisons. Calculated fields that rely only on columns of the same table appear in jdbcTable for that table. it appears in that table and in the join tree. each join tree is automatically given the ID JoinTree_n. For an Oracle RDBMS. but you may supply a true alias in handwritten design files. You can sometimes replace them with filters on tables in the join. Join expressions with several boolean clauses are not supported in the Domain Design either. as long as it is unique among all other tables and derived tables. join expressions other than equality between field values are not supported in the Domain Designer. When you create your own design file.3. If you use a distinct alias. the alias is the same as the table_ID.1.4 Representing Calculated Fields in XML Calculated fields are defined as regular columns in a field element with an additional attribute. join_expression – Expression that compares the columns on which the join is made. the alias is the same as the referenceID. type – The Java type of the column. This table name is combined with those in the joinInfo and joinedDataSetList to define the join expressions. See section 7. left outer. the design file includes every column in every table of the join. The subsequent ones may only reference the table_alias they define and ones that appear in joinString elements before them. where n is a sequential number. The order of joinedDataSetRef elements is important. When created in the Domain Designer. “The DomEL Syntax. joinString – A string expressing an SQL join statement in the following format: join_type join table_ID table_alias on join_expression Where: join_type – One of right outer. 7. This element and its two attributes are required even if they are identical.table_name. but they will be overwritten with equi-joins if you open the design in the Domain Designer. The following example shows the XML for a calculated expression in the accounts table. referenceId – Table id of the table within the design whose data source name is given in tableName. joinInfo – Gives the table ID and alias for the table given by the tablename attribute. you can give the join any name you wish.Advanced Domain Features id – ID that is used to reference the join results in the Domain design.” on page 150. only the columns you wish to reference are needed. 145 . The table ID and alias are used as the first table in the join definition.field_name == right_table_alias.field_name. Both attributes of field are required: id – Field ID composed of the ID of the table in the design and the literal name of the column in the data source. identical to the type in its table definition. tableName – Literal name of the first table in the join.field_name Join expressions are actually written in the DomEL syntax to allow more complex expressions. You can upload a design file with such joins. alias – Alternative name within the join expression for the table identified in referenceId. fieldList – A required container for the field elements in the join tree. but you may supply a true alias in handwritten design files. or full outer. as well as in the join tree. Inner join is the default if no join type is specified. joinedDataSetRef – Container for the join statement. table_ID – The ID of a table within the design. However. In the design file. The table of each column is identified by a prefix on the id attribute. table_alias – Alternative name to use for the table_ID within the join expression. field – Represents a column in the join tree. Calculated fields that rely on columns from different tables that are joined appear only in the join tree. The syntax is table_ID.2. the table name includes the schema name in the form schema_name. in the form left_table_alias.

the id has the form table_ID.String"/> . <field dataSetExpression="concat( billing_address_city.” on page 150. '. filterString – Expression which evaluates to true or false when applied to each row of values in the data source. Other filter expressions are not supported. <field dataSetExpression="concat( accounts. but they will be overwritten or cause errors if you open the design in the Domain Designer. Whereas other settings mainly determine which columns will be available for use in a report. The full syntax for the expression is documented in section 7. <jdbcTable datasourceId="SugarCRMDataSource" id="JoinTree_1" tableName="anything"> <fieldList> . '. Because constant fields are not dependent on any column values. 3.field_name. When editing a design file.1. The syntax for the expression. billing_address_state )" id="city_and_state" type="java. or even as an item. 2.When the expression computes a constant value. </fieldlist> </jdbcTable> The attributes of the field element have a different meaning when defining a calculated field: dataSetExpression – Expression which calculates a value based on other columns. the following filters are defined in the example Domain on page 122: 146 .String"/> . filters.city_and_state" type="java.. 7.String.When the expression references columns in different tables. b. for example java. '. constant fields are automatically grouped in a table named Constant and may be used in other calculated fields. you must treat constant calculated fields in the same way... type – The Java type of the value calculated by the expression.billing_address_city.The field appears in the table and the id is a simple column name.The field also appears in a join tree that uses the table. id – User-defined name of the calculated field. The format of the id is dependent on how the calculated field appears in the design file: 1. and the id is a simple column name.If the expression references columns in the same table: a.. accounts. For example.3. with more complex filters created by the conjunction (logical AND) of several conditions. In the Domain Designer. </fieldlist> </jdbcTable> .lang. Filters defined in the Domain Designer are limited to conditions on one column or comparisons of two columns. The expression refers to columns using their id attribute. a filter on a table or derived table refers to the simple column name. is documented in section 7.lang.2.lang..2.JasperServer User Guide <jdbcTable datasourceId="SugarCRMDataSource" id="accounts" tableName="accounts"> <fieldList> . You can upload a design file with more complex filters.” on page 150. Thus. a filter determines which rows when running the report.field_name.5 Representing Filters in XML Filters are defined as optional filterString elements inside of jdbcTable and jdbcQuery elements.field_name. They impose a condition on any results that will be returned for that table.. but a filter on a join tree refers to the table_ID.billing_address_state )" id="accounts.. “The DomEL Syntax. '. The field appears in a table named Constant. and the id has the form jointree_ID. This type must be compatible with the result of the DomEL expression and among the JDBC-compatible types listed on page 143.. A special case of a calculated field occurs when the expression does not reference any column names. thereby limiting the number of rows returned when accessing the data source. or join tree. including how to reference columns. the field appears only in the join tree of those tables. query.. they may be used in any join tree and exposed to the user along with the items from any join tree. “The DomEL Syntax.. The calculated field will always have the same value and is said to be a constant. Constant fields are further explained below.

“The Properties Table.lang. </items> </itemGroup> </itemGroups> <items> <item label="outsideitem1" . <field id="opportunity_type" type="java. label – The set’s name...Advanced Domain Features <jdbcTable datasourceId="SugarCRMDataSource" id="opportunities" tableName="opportunities"> <fieldList> . <itemGroups> <itemGroup label="outerset" .. we look at the definitions of sets and items that will be exposed through itemGroups and items elements at the top of the Domain design file. or both. This attribute is required. visible to users as a tooltip on the set name in the Ad Hoc Editor. subsets and items and hold attributes that define all the properties available on sets and items. /> /> /> itemGroups – A container for itemGroup elements. respectively. representing its subsets and items.lang. The itemGroups and items elements are equivalent to the selection of sets and items on the Display tab of the Domain Designer.9.... If the label is missing.. an items element.. The itemGroup element may contain an itemGroups element. /> </items> > ..String"/> </fieldList> <filterString>status != 'closed'</filterString> <query>... <item label="outersetitem2" .... description – The optional description of the set.3.. outside of any set..” on page 133. > <itemGroups> <itemGroup label="innerset" . itemGroup – Represents a set. labelId – The internationalization key for the label in the Domain’s locale bundles. The following example shows two levels of sets.. the Ad Hoc Editor will display the id.4. see section 6. <items> <item label="innersetitem1" <item label="innersetitem2" </items> </itemGroup> </itemGroups> <items> <item label="outersetitem1" . For a description of each possible property.</query> </jdbcQuery> 7.1. /> <item label="outsideitem2" . /> .String"/> </fieldList> <filterString>opportunity_type == 'Existing Business'</filterString> </jdbcTable> <jdbcQuery datasourceId="SugarCRMDataSource" id="p1cases"> <fieldList> . descriptionId – The internationalization key for the description in the Domain’s locale bundles.. The attributes of itemGroup are the properties of the set it represents: id – The unique identifier of the set among all set and item IDs. <field id="status" type="java..6 Representing Sets and Items in XML Now that all the table and field IDs have been defined.. with items inside each level as well as at the root.. visible to users of the Domain. 147 .. They create a hierarchy of sets.

When an internationalization key is defined for the label or description. 148 .field_ID.(#. defaultMask – A representation of the default data format to use when this item is included in a report.” on page 117.##0 0 $#. The attributes of item are the properties of the item it represents: id – The unique identifier of the item among all set and item IDs.hide medium.##0) short. This attribute is required because it defines the connection between what the user sees and the corresponding data in the data source. the label or description will be replaced with the value given by the key in the local bundle corresponding to the user’s locale. See the table below. visible to users. When the item refers to a column in a join tree.hide long.00. 2009 March 31.JasperServer User Guide resourceId – A reference to the table on which the set is based.medium Not allowed Default Summary Functions Appearance -1. “Example of Creating a Domain. item – Represents an item.##0) #. resourceId – A reference to the column on which the item is based.##0.##0. but it has no meaning on a set and is not significant in the design. description – The optional description of the item.5.hide medium.##0.00) $#.field_name because the field ID in a join tree includes the table ID.234) 3/31/09 Mar 31. The following table gives the possible data formats and summary functions based on the column type.2. This attribute is required. the Ad Hoc Editor will display the id. visible as a tooltip on the item name in the Ad Hoc Editor.table_ID.##0. The appearance columns show the equivalent setting in the properties table of the Display tab: Field Type Integer Default Data Formats Attribute Value #. descriptionId – The internationalization key for the description in the Domain’s locale bundles. The design file was exported from the Domain Designer. If the label is missing.($#.” on page 161.##0. This attribute is required. The possible values for the defaultAgg depend on the type attribute of the column referenced by the resourceId.56 -1234 ($1. the resourceID corresponds to jointree_ID.##0.234.234) (1234) -1. 2009 23:59:59 Attribute Value Highest Lowest Average Sum DistinctCount Count Appearance Maximum Minimum Average Sum Distinct Count Count All Double Date DistinctCount Count Distinct Count Count All All others The following example shows the use of the itemGroup and item elements to represent the sets and items from section 6.56) ($1. items – A container for item elements. see section 7.234.($#. label – The item’s name.($#.00 0 $#. defaultAgg – The name of the default summary function (also called aggregation) to use when this item is included in a report.##0) #. 2009 Mar 31. For more information. labelId – The internationalization key for the label in the Domain’s locale bundles. The resourceId has the form table_ID. The possible values for the defaultMask depend on the type attribute of the column referenced by the resourceId.234 -1234 ($1. “Locale Bundles.

amount"/> <item id="probability" label="Probability" description="Chance of closing the contract" labelId="" descriptionId="" resourceId="JoinTree_1.users1.case_number"/> <item id="date_entered2" label="Date" description="Date case opened" labelId="" descriptionId="" resourceId="JoinTree_1.lead_source"/> <item id="sales_stage" label="Sales Stage" description="Sales Stage" labelId="" descriptionId="" resourceId="JoinTree_1.date_entered"/> <item id="amount" label="Amount" description="Estimated contract Amount" labelId="" descriptionId="" defaultMask="$#.opportunities.hide" resourceId="JoinTree_1.users1.sales_stage"/> </items> </itemGroup> <itemGroup id="p1cases" label="P1 Case" description="High priority (P1) support case" labelId="" descriptionId="" resourceId="JoinTree_1"> <items> <item id="case_number" label="Case" description="Case number" labelId="" descriptionId="" resourceId="JoinTree_1. <itemGroup id="users1" label="Account Rep" description="Primary account representative" labelId="" descriptionId="" resourceId="JoinTree_1"> <items> <item id="first_name" label="First Name" description="Given name" labelId="" descriptionId="" resourceId="JoinTree_1. </itemGroups> Labels and descriptions may contain any characters.date_entered"/> <item id="name2" label="Summary" description="Name or summary of case" labelId="" descriptionId="" resourceId="JoinTree_1.first_name"/> <item id="last_name" label="Last Name" description="Surname or family name" labelId="" descriptionId="" resourceId="JoinTree_1.p1cases.. 149 .opportunities.probability"/> <item id="description1" label="Description" description="Description of opportunity" labelId="" descriptionId="" resourceId="JoinTree_1.p1cases.last_name"/> </items> </itemGroup> <itemGroup id="opportunities" label="Opportunity" description="Sales opportunity" labelId="" descriptionId="" resourceId="JoinTree_1"> <items> <item id="date_entered1" label="Date" description="Date opportunity opened" labelId="" descriptionId="" defaultMask="short..opportunities..opportunities.description"/> <item id="lead_source" label="Lead Source" description="Lead Source" labelId="" descriptionId="" resourceId="JoinTree_1.p1cases.resolution"/> <item id="status" label="Status" description="Current case status" labelId="" descriptionId="" resourceId="JoinTree_1.opportunities. but the ID property value of both itemGroup and item elements must be alphanumeric and not start with a digit..##0)" defaultAgg="Average" resourceId="JoinTree_1.p1cases.opportunities.p1cases.($#.description"/> <item id="resolution" label="Resolution" description="Description of the case resolution" labelId="" descriptionId="" resourceId="JoinTree_1.status"/> </items> </itemGroup> .##0.name"/> <item id="description2" label="Description" description="Detailed description of the case" labelId="" descriptionId="" resourceId="JoinTree_1.Advanced Domain Features <itemGroups> .p1cases.

6. you may make further modifications on any of the tabs. To upload an XML design file: 1.4 Uploading a Design File to a Domain Once you have modified an XML design file. you must select a data source before you can proceed. If you cannot resolve the error or inconsistencies. you can upload it through the Edit Domain dialog. you can create a new Domain based on a modified file or even on a design file created from scratch. locate the folder where you want to place it. Alternatively. Select the Upload tab under the Design heading. When processing a report based on a Domain.1. click Cancel on the Data and Design page and start over. the current design is not replaced. 150 . JasperServer validates the uploaded XML file.” on page 155) A DomEL expression is a shorthand way of writing a complex query. If you made a mistake or upload the wrong file. 5. Once the design appears correctly in the Domain Designer.JasperServer User Guide 7. and environment variables. If there are syntax or semantic errors. Currently. “The Domain Security File. the augmented SQL with either be passed to the data source. Log in to JasperServer as an administrator and select View > Repository. Click Save to update the Domain in the repository. or JasperServer will perform a simpler query and apply the DomEL expressions to the full data set in memory. field values. The design file overwrites any existing design without prompting. do not launch the Domain Designer after uploading the file. you should make changes to the XML file. 4. 2. upload it again. 7. If you are creating a new Domain. The results of editing a design in the Domain Designer based on inconsistent XML file are unpredictable.4. Make sure the settings you made in the XML file appear as expected on the various tabs of the Domain Designer. The Domain appears in the Data and Design page of the Edit Domain or Add New Domain dialog. To create a new Domain. If you want to create a new domain. right-click the folder and select Add Resource > Domain from the context menu. the following features in XML design files are expressed in DomEL: The on and where clauses of derived tables The on clause of join statements Calculated fields Filter expressions in Domains and Domain topics (equivalent to where clauses) Row-level security (see section 7. verify the uploaded Domain design by selecting the Edit tab and clicking Launch Domain Designer. typically by setting the Domain filter. Browse or search the repository to locate the Domain. JasperServer interprets DomEL expressions to generate parts of the SQL expression that will perform the desired query. Depending on the data policy.2 The DomEL Syntax Various components of Domain need to compute values based on some expression involving constants. For instructions. see the JasperServer Administrator Guide. 7. then click Browse to find and upload your XML design file. If there are any errors or inconsistencies. The Domain Expression Language (DomEL) was created to fulfill this need. you must clear your Ad Hoc cache of all queries based on the Domain. This will remove any data that was based on the old instance of your Domain and avoid inconsistencies in new reports. If you modified an existing Domain. You can make changes to the XML file and upload it again until there are no errors. If you intentionally use syntax in your design file that Domain Designer does not support. The Domain Designer can have unpredictable results with some XML designs it does not support. If you used only supported features in your design file. 3. To update an existing Domain. you should click Cancel on the Data and Design page so that the uploaded design is not saved. and verify it again. right-click the Domain and select Edit from the context-menu.

2. Even though join expressions may appear in separate joinedDatasetRef elements.45 or -123. Floating point numbers. Inclusive range applicable to numbers and dates. used in expressions.2.) are not supported. depending on where the expression appears: Appears In Derived table Field Reference table_ID. Therefore.Advanced Domain Features 7. double quotes (") are not supported. and the Domain Designer sometimes includes it.1 Datatypes The following simple datatypes may be declared as constants. However.0:12. all references to field values in an expression are based on the IDs given in the Domain design.field_name Calculated field on a table or derived table field_name 151 .field_name Explanation The SQL query that defines a derived table can refer to any previously defined table or derived table in the Domain.45 string date timestamp 'hello world' d'2009-03-31' or Date('2009-03-31') ts'2009-03-31 23:59:59' or TimeStamp('2009-03-31 23:59:59') The following composite datatypes may be declared as constants and used with the in set or in range operator.2 Field References DomEL expressions are stored in the Domain design and interpreted when JasperServer prepares to run a query to retrieve data from the data source. 2. The values in these composite types are not necessarily constant. including fields that are number or date types. the alias declared in each one can be used in any subsequent one. Character string entered with single quotes ('). ANSI standard date and time. Example (1. Join expression table_alias.). Calculated fields can only appear on a table if they refer exclusively to fields of the table.34) (d'2009-01-01':d'2009-12-31') (limit_min:limit_max) 7. Therefore. Whole numbers. other separators such as comma (. you must include the table ID. Example of Constant none integer decimal 123 or -123 123.'oranges') (0:12) or (0. tables are given alias names that must be used. 3) ('apples'. and returned as values: Simple Type boolean Description Expressions such as comparison operators return boolean values. Decimal separator must be a period (. Field references have the following format. but true and false constants are undefined and cannot be used. ANSI standard date. in which case no table ID is needed. the table ID is not forbidden. Within a join expression. they could be determined by field values: Composite Type set range Description Contains any number of any simple type above.

JasperServer User Guide Appears In Calculated field on a join tree. listed in order of precedence. Parentheses for grouping are not supported.name). subtract equal not equal less than less than or equal greater than greater than or equal in set in range not and or Syntax i * j / k i + j . Sets can be of any type. You may also use SQL functions in a DomEL expression under limited circumstances: They must be supported by your database. but not TRIM('Jr' FROM person.field_name 7. Filters that are evaluated within the table or derived table do not need the table ID. divide add. 'suffix') contains(k.field_name Explanation Calculated fields declared in join trees refer to fields prefixed with their table ID. Operator multiply. For example. field_name table_ID. either within the expression or for the type of the calculated field.2..k i == j i != j i < j i <= j i > j i >= j i in ('apples'.3 Operators and Functions DomEL provides the following operators. 'substring') concat(i. Comparison operators for string. Boolean operators. The SQL context must be appropriate for the functions. and date types.) Description Comparison operators for strings. Operators higher in this list will be evaluated before operators lower in the list. See your vendor documentation for available functions and their syntax. For example. you cannot use aggregation functions such as COUNT in a calculated field because there is no GROUP BY clause. To test string equality. 152 .. Ranges must be numeric or date types. DomEL also defines the following operations as functions: Function startsWith endsWith contains concat Syntax startsWith(i. j. Comparison operators for numeric and date types only.'oranges') i in (j:k) not ( i ) i and j and k i or j or k Description Arithmetic operators for numeric types only. Filter on a table or derived table Filter on a join tree Field Reference table_ID. Parentheses are required for not and may be used for grouping. 'prefix') endsWith(j. Returns the string of all parameters concatenated. numeric. Filters that refer to fields in separate tables of the join tree need to use the table ID on each field name. ' and '. use i in ('string'). They must follow the convention of comma-separated parameters.name) The type of the return values must be appropriate. . you can use TRIM(person.

'CA'. Provide internationalized labels for the sets and items of the Domain design.5.Float.Advanced Domain Features Except for the comma-separated parameter pattern. Another way to reduce errors and also support future data changes is to use more general expressions such as: s1. Filters must be true or false overall. they must be logically associated with and or or (currently. Join expression boolean Calculated field any type Filter boolean 7. To compute complex arithmetic expressions. 'United States') 7. For more information about the syntax of resource files. The expected return type depends on where the expression appears: Appears In Derived Table Expected Return Type SQL query with boolean expressions Explanation A derived table is defined by an SQL expression that contains DomEL expressions.3 Resources of a Domain The two optional components of a Domain are also called resources because they are defined by uploaded files: A single security file. Defines row and column-level access to data selected by the Domain.store_country in ('US'. The following examples show expressions suitable for filters. the DomEL validation cannot enforce these criteria. Parentheses () may be used for grouping boolean operators. The join on clause may contain boolean comparisons and the where clause may contain filters. This section describes how to upload and replace Domain resources. you can use the values it has found. For example.closed ) As shown in these examples. The expression must evaluate to a type that is compatible with the SQL type declared in the Domain Designer or in the design file. but arithmetic expressions that rely on parentheses are not supported. Otherwise. Any number of locale bundles.” on page 161. 'NV') The following filter expression uses a date range: s1. When there are several conditions. “Locale Bundles.lang. These files are uploaded and managed on the Resources page of the Edit Domain or Add New Domain dialog. “The Domain Security File.4 Return Value DomEL expressions are used in different contexts for different purposes. only and is supported in the Domain Designer). field values are often compared to constant values such as 'USA'. The Domain Designer determines values for comparison by accessing the data source. Complex expressions are written by grouping any of the operators or functions above. Therefore.2. a wrong value might go undetected and impact the quality of data in reports based on the Domain. 'OR'. otherwise your expression will cause errors when using the Domain to create a report. see sections 7.first_opened_date in ( Date( '2000-01-01' ) : Date( '2004-12-31' )) and not( s1. 'USA'. Within a join expression. the expression must compute a decimal value. The on clause may also contain other DomEL expressions logically associated with and or or to create a complex join condition (see warning on page 144). 153 . so if you export a design file. you may need to define several expressions as separate calculated fields.store_state in ('WA'.store_country in ('USA') and s1. the author of the design file must ensure that values used in a DomEL expression exist in the data source. You must ensure that any SQL functions meet these criteria. and then reference them in a simpler expression in another calculated field. both of which are described below. if the declared type is java.” on page 155 and 7. the on clause contains a comparison of fields from each table that has a boolean result.4. This first one selects only stores in western states of the US: s1.

but it will not warn you if you replace it with a different file. Click Add Security or Add Locale Bundle to upload a security file or locale bundle to the Domain. typically by setting the Domain filter. 7. 3. The Domain appears in the Data and Design page of the Edit Domain dialog. 2. Click OK to upload the file and add it to the list of current resources. See step 9 to replace an existing security file. select an XML file created explicitly as a security file. the XML file in the repository is referenced by the Domain. you must ensure that any updates to the files are compatible with the Domains that reference them. you will see only XML files or locale bundle objects in the repository. Figure 7-2 Add Security File Dialog 6. Click the Local File or Repository tab and then Browse to select a file or repository object. For the security file. Click Resources at the top of the page or Next at the bottom. JasperServer validates the file to make sure it matches the format of a security file or locale bundle. Resources can be uploaded from local files or from objects in the repository. The repository manager will warn you if you attempt to delete a resource that is referenced by a Domain. There can only be one security file but any number of locale bundles. A window appears in which you can select the resource. Figure 7-1 Blank Resources Page in the Add New Domain Dialog 5. 4. Search or browse the repository to locate the Domain. When you store resource files in the repository. Right-click an existing Domain and select Edit from the context-menu. 154 . If the file type is not recognized or there is a syntax error. unlike a local file that is uploaded directly into the Domain. Log in to JasperServer as an administrator and select View > Repository.JasperServer User Guide To upload or manage a security file and locale bundles for a Domain: 1. When a security file exists. the Add Security text is disabled. When selected. When browsing the repository. the file is not added to the list of resources and you must select another file or click Cancel.

For example. you must clear your Ad Hoc cache of all queries based on the Domain. Permissions can be set separately on the data’s columns and rows. row security is defined on resourceId. 7. To manage the uploaded resources. corresponding to columns in the data source. the user name and roles are checked against the permissions in the security file. Tomas has access to columns B-C and rows 1-3. Column security is defined on itemGroupId and itemId. 10. modifying. sets and items that appear in the design are referenced by the security file. If you modified an existing Domain. Security on columns is defined by permissions on the sets and items of the Domain. in a certain Domain. select a file and click one of the following buttons on the Resources page: Edit – Replaces the selected file with a different one uploaded from a file or from the repository. The Resources page shows the list of all uploaded files. and uploading the security file as well. you will need to add its label and description keys to each bundle. Anita has access to columns C-E and rows 2-5. rows display the values of each item. Delete – Removes the selected file from the Domain. user David has access to columns A-F and rows 1-6.Advanced Domain Features 8. In Domains. When creating or running a report based on a Domain. columns. For instructions. only certain users might be able to see sensitive employee information such as a Social Security Number. When the users run reports from the Domain.and row-level access. This will remove any data that was based on the old instance of your Domain and avoid inconsistencies in new reports. Figure 7-3 Resources Page for Supermart Domain in the Edit Domain Dialog 9. see the JasperServer Administrator Guide. edit each file to add the new keys. Download each of the locale bundles in your Domain. if you add an item to you Domain after creating your locale bundles. You might also want to define access permissions for the new item by downloading. Security on rows is defined by permissions on the data values. A user can only see results where he has both column. for example a manager might only be allowed to see the salary column of employees whose manager field equals the manager’s employee number. Download – Lets you save the security file or locale bundle to a local file. For instance. columns display the items in the Domain. The IDs of tables.4 The Domain Security File The security file defines permissions to control access to Domain data on the basis of user names and roles existing in JasperServer. For example. Repeat steps 5 through 7 to upload one security file and any number of locale bundles. they get different results. David sees data in cells where columns A-F 155 . then upload each file to replace the corresponding locale bundle.

as described in section 7. If you modify your Domain.getRoleName() in ['ANY_SUPPORTED_ROLE'] } </principalExpression> The expression gets the current authentication object and determines the access privileges of the principal in the object.codehaus. an expression can test for any object in the principal. The standard expression is <principalExpression>authentication. Security that is defined on the physical layer applies to all content in the presentation layer. you should also export the design file and update the security file with any IDs that have changed. All access grants for a Domain are defined in a single security file that is attached to the Domain as a resource. The expression evaluates to <principalExpression>authentication.any{ it. Tomas sees data only where columns B-C and rows 1-3 intersect.getAttributes(). When the report runs. the security definition finds the access grants and determines his access rights. When the query is passed to the data source and the report is run. Finally.roles.2. Anita sees data only where columns C-E and rows 2-5 intersect.” on page 140. “Resources of a Domain.getAttributeA() in ['ANY_SUPPORTED_ROLE'] } </principalExpression> The scripting language for principalExpression is Groovy (http://groovy. see section 7.org).org).3. the grants are applied as filters on the report’s columns and rows.roleName in ('ANY_SUPPORTED_ROLE') </principalExpression> While the standard principal expression tests for a given role. this expression tests for attribute A: <principalExpression>authentication. 156 . For example. he sees only the columns to which he has access. it gets the user and roles associated with the object. Item A 1 2 David Item B David Tomas David Tomas Item C David Tomas David Tomas Anita David Tomas Anita David Anita David Anita David Item D David Item E David Item F David David David David David 3 David David Tomas David Anita David Anita David 4 5 6 David David David Anita David Anita David David Anita David Anita David David David David David David David David For a given query on the data source.JasperServer User Guide and rows 1-6 intersect.jasperforge. it evaluates the roles for the specified role.getRoles(). then for resources.getPrincipal(). from JasperServer.any{ it. Then.principal. portions to which the user has no access will be blank.1.” on page 153. Access grants take a principalExpression that evaluates the principal in authentication objects created in the Acegi security framework (http://www. Security that is defined on a join applies only to the presentation layer content that is specific to the join. “Working With a Design File. The default access is granted. When creating a security file. determined first for item groups and items. For more information. When a user is designing a report in the Ad Hoc Editor.getPrincipal(). be sure to use the IDs of items and groups as they are defined in the Domain design file exported from the Domain Designer. The access grants are applied to the role.

any{ it.store_state in ('CA') </filterExpression> </resourceAccessGrant> . </itemGroupAccessGrants> </itemGroupAccessGrantList> . For instance. </itemGroupAccessGrants> </securityDefinition> 7..store_country in ('USA') and s.. </resourceAccessGrants> </resourceAccessGrantList> . even if that query does not include the related dataset..com/2007/SL/XMLSchema" version="1.Advanced Domain Features A typical security file has the following structure: <securityDefinition xmlns="http://www. a resourceAccessGrantList specifies the rows to which a user has access. Tomas’s report uses columns from Region but he cannot see them because he does not have access to Sales. a column in the Region table might be joined to a column in the Sales table.. User Tomas has access to Region but not Sales. For each dataset from which data is returned by a query in the design file.Begin column-level security --> <itemGroupAccessGrantList id="expense_join_item_group_access_grant_group" label="aLabel" itemGroupId="expense_join" defaultAccess="denied"> <itemGroupAccessGrants> <itemGroupAccessGrant id="expense_join_super_user_item_group_grant" access="granted"> <principalExpression>authentication.getPrincipal(). </resourceAccessGrants> <itemGroupAccessGrants> <!-. A resourceAccessGrant must be defined for a joined resource if any query in the security definition has at least one item from the resource.getPrincipal().getRoles(). Each grant is defined in a resourceAccessGrant that contains a principalExpression and a filterExpression.1 Row-Level Security Row-level security is specified in resourceAccessGrants...getRoleName() in ['ROLE_SUPERMART_MANAGER'] }</principalExpression> <filterExpression>s..jaspersoft. Row-level security applies whenever access to a secured resource is requested.getRoles().Begin row-level security --> <resourceAccessGrantList id="expense_join_resource_access_grant" label="aLabel" resourceId="expense_join"> <resourceAccessGrants> <resourceAccessGrant id="expense_join_ROLE_SUPERMART_MANAGER_store_row_grant"> <principalExpression>authentication.getRoleName() in ['ROLE_ADMINISTRATOR'] }</principalExpression> </itemGroupAccessGrant> .4. 157 .0" itemGroupDefaultAccess="granted"> <resourceAccessGrants> <!-.any{ it. even if the request is indirect..

getPrincipal(). Filter on the dataset.getPrincipal().getPrincipal(). List of grants for one dataset in the Domain.getRoleName() in ['ROLE_SUPERMART_MANAGER'] }</principalExpression> <filterExpression>s.getRoles().getRoles().getPrincipal().store_state in ('CA') </filterExpression> </resourceAccessGrant> <resourceAccessGrant id="account_ROLE_SUPERMART_MANAGER_account_row_grant" orMultipleExpressions="true"> <principalExpression>authentication. Filters are applied to resource IDs.any{ it. principalExpression.2.getRoleName() in ['ROLE_SUPERMART_MANAGER'] }</principalExpression> <filterExpression>s.getRoleName() in ['ROLE_ADMINISTRATOR'] }</principalExpression> </resourceAccessGrant> <resourceAccessGrant id="account_ROLE_SUPERMART_MANAGER_row_grant"> <principalExpression>authentication.getRoles().any{ it.getRoles().any{ it.store_country in ('USA') and s. determines the rows to which access is granted.store_number == 0</filterExpression> </resourceAccessGrant> <resourceAccessGrant id="account_ROLE_SUPERMART_MANAGER_account_row_grant2" orMultipleExpressions="true"> <principalExpression>authentication.any{ it. resourceAccessGrant.any{ it. filterExpression.getRoles().store_number == 24</filterExpression> </resourceAccessGrant> </resourceAccessGrants> </resourceAccessGrantList> <resourceAccessGrantList id="account_resource_access_grant" label="aLabel" resourceId="account"> <resourceAccessGrants> <resourceAccessGrant id="account_resource_super_user_row_grant"> <principalExpression>authentication.Begin row-level security --> <resourceAccessGrantList id="expense_join_resource_access_grant" label="aLabel" resourceId="expense_join"> <resourceAccessGrants> <resourceAccessGrant id="expense_join_ROLE_SUPERMART_MANAGER_store_row_grant"> <principalExpression>authentication.” on page 150 for examples of valid filter expressions. See the section 7.getRoleName() in ['ROLE_SUPERMART_MANAGER'] }</principalExpression> <filterExpression>s.JasperServer User Guide Row-level security is defined as follows: <resourceAccessGrants> <!-. Grant in the dataset for a specific case. 158 .getPrincipal(). Evaluation of the authentication object and user to determine the role to be granted access.getRoleName() in ['ROLE_SUPERMART_MANAGER'] }</principalExpression> <filterExpression>account_type == 'Expense'</filterExpression> </resourceAccessGrant> </resourceAccessGrants> </resourceAccessGrantList> </resourceAccessGrants> Elements of resourceAccessGrants are: resourceAccessGrantList. “The DomEL Syntax. such as a user role or profile attribute.

Access to items within an item group can be specified by itemAccessGrants. If access is specified for an item group but there is no item group principal expression matching the current user. the item group’s access applies.Begin column-level security --> <itemGroupAccessGrantList id="expense_join_item_group_access_grant_group" label="aLabel" itemGroupId="expense_join" defaultAccess="denied"> <itemGroupAccessGrants> <itemGroupAccessGrant id="expense_join_super_user_item_group_grant" access="granted"> <principalExpression>authentication.any{ it.getRoleName() in ['ROLE_ADMINISTRATOR'] }</principalExpression> </itemGroupAccessGrant> <itemGroupAccessGrant id="ROLE_SUPERMART_MANAGER_item_group_access_grant" access="granted"> <principalExpression>authentication.4. In this case (specified item group > unspecified item group > unspecified item). the user has the item group’s default access. If multiple item group principal expressions match the user (such as one expression for the user and one for his role).getRoles(). If the unspecified object is an item in an item group. the access of the nearest parent item group applies to the item. or ANDed. As a result. the access of the parent object applies. their access grants are combined. the user’s access to items for which access is specified will be as specified.getPrincipal(). Access to other items will be the item group’s specified access.getPrincipal(). Column-level security is defined as follows: <itemGroupAccessGrants> <!-.getPrincipal().getRoleName() in ['ROLE_SUPERMART_MANAGER'] }</principalExpression> <itemAccessGrantList id="expense_join_ROLE_SUPERMART_MANAGER_item_grant" defaultAccess="denied"> <itemAccessGrants> <itemAccessGrant id="itemAccessGrant1" itemId="ej_expense_fact_exp_date" access="granted" /> </itemAccessGrants> </itemAccessGrantList> </itemGroupAccessGrant> </itemGroupAccessGrants> </itemGroupAccessGrantList> <itemGroupAccessGrantList id="expense_join_store_item_group_access_grant_group" label="aLabel" itemGroupId="expense_join_store" defaultAccess="denied"> <itemGroupAccessGrants> <itemGroupAccessGrant id="expense_join_store_super_user_item_group_grant" access="granted"> <principalExpression>authentication. Within the group.Advanced Domain Features 7. one denied statement overrides multiple granted statements. An itemGroupAccessGrantList defines default access to one item group.2 Column-Level Security Column-level security is specified in itemGroupAccessGrants. in a simple series. If the nearest parent group’s access is also unspecified. If a matching item group principal expression does exist. that group takes its access from its parent group and passes it to the item.any{ it. not the item group’s specified access.getRoles().any{ it. access is granted by user role in itemGroupAccessGrants.getRoleName() in ['ROLE_ADMINISTRATOR'] }</principalExpression> </itemGroupAccessGrant> <itemGroupAccessGrant id="ROLE_SUPERMART_MANAGER_store_item_group_access_grant" access="granted"> 159 . Column-level security passes from parent object to child object unless specified otherwise: If access is unspecified for an object. If the unspecified object is an item in an item group that is nested in another item group. access for the item cannot be specified in an item-level grant.getRoles().

then grant access to specific items. Next. the SuperMart manager will have no access at all.getRoleName() in ['ROLE_SUPERMART_MANAGER'] }</principalExpression> <itemAccessGrantList id="expense_join_ROLE_SUPERMART_MANAGER_store_item_grant" defaultAccess="denied"> <itemAccessGrants> <itemAccessGrant id="itemAccessGrant3" itemId="ej_store_store_type" access="granted" /> <itemAccessGrant id="itemAccessGrant4" itemId="ej_store_region_id" access="granted" /> <itemAccessGrant id="itemAccessGrant5" itemId="ej_store_store_name" access="granted" /> <itemAccessGrant id="itemAccessGrant6" itemId="ej_store_store_number" access="granted" /> <itemAccessGrant id="itemAccessGrant7" itemId="ej_expense_fact_exp_date" access="granted" /> <itemAccessGrant id="itemAccessGrant8" itemId="ej_expense_fact_amount" access="granted" /> </itemAccessGrants> </itemAccessGrantList> </itemGroupAccessGrant> </itemGroupAccessGrants> </itemGroupAccessGrantList> </itemGroupAccessGrants> Elements of itemGroupAccessGrants are: itemGroupAccessGrantList. access is defined for the SuperMart manager role. Evaluation of the authentication object and user to determine the role to be granted or denied access. Specifies default access to the items. An alternative way to restrict access is to simply deny it on specific items. access to each item group is granted for administrator roles. alternatively. For instance. Access is denied to everyone initially.JasperServer User Guide <principalExpression>authentication. List of access grants to items in the item group. Otherwise. First. Specifies access to one item. List of access grants to one item group. If access is not granted at the group level. all grants for a given role are ANDed. Then. create an itemGroupAccessGrantList for them where the id of the group is "". the progression of column access grants is: Deny access to everyone. itemAccessGrant. By default. this method is not as secure as denying access to all items then granting access to some. access is granted to each item group even though the access may be limited eventually. Grant group access to additional roles. which is more secure. the following grants are implemented as A and B and C: 160 . access to all items in the group is denied. all users would have complete access.getPrincipal(). Specifies default access to the item group and all items in the group. For each item group: Grant group access to administrator roles. For each additional role. The ANDed series can be modified by an OR expression (orMultipleExpressions="true"). Specifies access to the item group for one user role. itemAccessGrantList. In the above example. If you want to restrict access to items outside of any group or set. deny access to specific items or.getRoles().any{ it. The latter requires the programmer to specifically identify each item to which the role has access. itemGroupAccessGrant. principalExpression. However. deny access to all group items. Overrides default in itemGroupAccessGrantList. followed by grants to specific items. Next.

The name of the file includes the target locale. it displays the text associated with the key in the default bundle. only the internationalization keys. You give all labels and descriptions a clear and complete text within the design. JasperServer looks for the corresponding locale bundle and uses the labels and messages it contains. and Domains make reports internationalizable so that users can create and view reports in their language. or description property defined. To create localized text for those users. you do not specify any labels or descriptions in your Domain design. 161 . Based on the search algorithm above and your localization needs. The files contain other-language versions of the labels and messages that are displayed to users.5 Locale Bundles A locale bundle is a set of properties files used in localizing software. and you can use specialized software or translation services to create all the locale bundles you need. As your enterprise grows.NAME. default bundle. The JasperServer interface is already internationalized. 7. When a user’s operating environment specifies a locale.NAME. you could have one of the following scenarios: You do not have any localization needs at the time you create your Domain. users will see the text of the default locale bundle. all user-visible text for your Domain is in the standard format of a locale bundle. JasperServer displays the text associated with the key. Descriptions are localized in the same manner.LABEL=Client ACCOUNTS. If these exist. There are several strategies for managing your locale bundles. if the bundle or key does not exist.DESCR=Nom du client French fr ExampleDomain_fr. then create the locale bundle. Then you create a default locale bundle that gives the clear and complete text of every label and description in your preferred language. users in another country need to create reports based on your Domain.DESCR=Name of Customer ACCOUNTS. In this case. A locale bundle for a Domain consists of a single file containing all the internationalization keys for the sets and items in the Domain.properties When a Domain with locale bundles is used to create or run a report. You can create locale bundles incrementally each time you have users who need a new language. Language English Locale default Filename ExampleDomain. except they are left blank if there is no locale bundle. then JasperServer looks for the same key in a default bundle among the resources. Users in your home country who do not specify a locale will still see the labels and description in the original Domain design.Advanced Domain Features <resourceAccessGrant id="A"> <resourceAccessGrant id="B"> <resourceAccessGrant id="C">. then It displays the text of the label property defined in the Domain design. if the default bundle or key does not exist. then It displays the value of the id property. and you leave the key names undefined.NAME. JasperServer resolves each label to display as follows: JasperServer looks for a bundle corresponding to the current locale and for the key corresponding to the label.properties Sample Contents ACCOUNTS. In case a label or description is left untranslated. In this way. if no label is defined. edit your Domain design to define the internationalization keys. If both exist. Each key is associated with the text for the label or description in the language of the target locale.LABEL=Customer ACCOUNTS. You want to create your Domain tailored to a multilingual environment where reports need to be localized for each user’s specified locale.NAME. while these grants are implemented as (A or B) and C: <resourceAccessGrant id="A"> <resourceAccessGrant id="B" orMultipleExpressions="true"> <resourceAccessGrant id="C"> The OR expression can be applied in grants for items and item groups as well as resources. so JasperServer automatically associates it with the user’s locale when needed.

the name of the internationalization keys are defined by the Label ID and Descr. but save the exported file to another name and attempt to merge in the generated keys. any keys that already exist will not be modified. as long as each key is unique among all keys within the Domain. ready for translation. You may name the keys in any way you wish. You can then generate the keys automatically. it is simplest to create the properties files from the stub exported by the Domain Designer. If the _<locale> part of the file name is omitted.2 Creating Locale Bundle Files A locale bundle for a Domain is a Java properties file where each property name is a unique internationalization key from one of the labels or descriptions in the design. Whether you have created your design in the Domain Designer or in an external file uploaded to the Domain Designer. To define the keys.DESCR SET_ID. The locale bundle stub is further explained in the next section. 162 . ID properties on each set and item defined on the Display tab. these properties are blank. but this is not necessary. In this case. where <locale> is any Javacompliant locale identifier. use the Generate Bundle Stub icon performs two tasks: in the menu bar of the Domain Designer. The name of the file identifies the locale in the form <any_name>_<locale>. This function Figure 7-4 Locale Bundle Stub Options Dialog It automatically generates all the key names. the generated key names have the following format: SET_ID.5.DESCR It outputs a locale bundle stub. The text for a given key in a given locale is determined by the algorithm given on page 161. Usually. use the Generate Bundle Stub icon in the menu bar to export a blank properties file. or neither. as described in the previous section.LABEL SET_ID.1 Defining the Internationalization Keys In the Domain Designer. it may be easier to upload the design file in a Domain and open it in the Domain Designer.JasperServer User Guide 7.ITEM_ID.properties. only the description keys. give these attributes a value that is unique among all the keys. If you have many sets and items. the file designates the strings for the default locale. To automate this process. ID properties. By default.LABEL SET_ID. both. you will not be able to use the exported design file.5. Optionally. If these attributes are missing or defined with an empty value (""). You have the option of generating only the label keys. 7. the name of the keys are given by the labelId and descriptionId attributes on each itemGroup and item element. In the design file. This is a properties file in the proper format containing all the defined keys. export the bundle stub as explained above. If your design file does not load properly in the Domain Designer.ITEM_ID. and export the XML design file that now contains the generated keys. do not overwrite your design file. for example fr or fr_CA. In order to guarantee uniqueness. Often. the set of keys is identical in the properties file of each locale bundle. The value of each property is the text for the label or description in the target language. When you click OK. the keys are not defined. you may generate any missing keys. the generated key names will be added to all the blank Label ID and Descr.

LAST_NAME.DESCR= ACCOUNTS.FIRST_NAME. Generally.LABEL= ACCOUNTS.ACCOUNT_TYPE. ACCOUNTS.DESCR=D\u00e9tails des comptes clients.LAST_NAME. . everything after the = symbol is part of the translated text.DESCR= .LAST_NAME.DESCR= USERS1. All of the internationalization keys were generated automatically as well.FIRST_NAME.EMPLOYEES..EMPLOYEES.LABEL= ACCOUNTS.DESCR=Pr\u00e9nom usuel.ACCOUNT_TYPE.LABEL=Localit\u00e9 ACCOUNTS.LABEL= USERS1. ACCOUNTS. The syntax for the properties file is the same as for Java properties files.LABEL= USERS1.DESCR=Industrie d\u2019activit\u00e9 primaire.LABEL=Responsable USERS1.LABEL=Client ACCOUNTS.INDUSTRY. USERS1.LABEL=Taille du personnel ACCOUNTS.ACCOUNT_TYPE. Java properties files use the ISO-8859-1 (Latin-1) encoding that is the same as ASCII for all English nonaccented characters.CITY_AND_STATE.LAST_NAME. ACCOUNTS.LABEL= ACCOUNTS. sets and items in the bundle stub appear in the same order as on the Display tab of the Domain Designer: ACCOUNTS.. “Example of Creating a Domain.FIRST_NAME.DESCR= USERS1.ANNUAL_REVENUE.DESCR=Revenus annuels estim\u00e9s.DESCR=Nombre d\u2019employ\u00e9s estim\u00e9s.Advanced Domain Features The following example shows part of the properties file output for the Domain created in section 6.INDUSTRY.DESCR=Ville et r\u00e9gion ou \u00e9tat du client. ACCOUNTS.CITY_AND_STATE.LABEL= ACCOUNTS.INDUSTRY.DESCR= ACCOUNTS.DESCR=Nom de famille.2.DESCR=Responsable du compte client.ANNUAL_REVENUE. including the UTF-8 code for accented characters and other symbols. USERS1.INDUSTRY.ANNUAL_REVENUE.EMPLOYEES.LABEL=Taille par revenus ACCOUNTS. For international characters that are not in ISO-8859-1.ANNUAL_REVENUE. ACCOUNTS.CITY_AND_STATE.NAME.. A best practice is to save a blank properties file or the default locale bundle as a 163 .CITY_AND_STATE. Once you have the properties file for your first locale.” on page 117. As the example shows.DESCR=Type du compte client. ACCOUNTS.DESCR= ACCOUNTS.LABEL=Pr\u00e9nom USERS1.DESCR= ACCOUNTS.DESCR= USERS1.NAME.FIRST_NAME.NAME.LABEL=Comptes ACCOUNTS.LABEL= ACCOUNTS.LABEL=Type ACCOUNTS.DESCR= ACCOUNTS. The following example shows the French translation for the properties file shown above. use Unicode escape sequences (for example \u00e9 is é)..LABEL=Nom USERS1.DESCR= ACCOUNTS.LABEL= USERS1.LABEL= ACCOUNTS.DESCR=Nom du client ACCOUNTS.ACCOUNT_TYPE.LABEL= ACCOUNTS.EMPLOYEES.NAME. you can simply copy the file and change the _<locale> designator to begin translation of another locale bundle. USERS1.LABEL=Industrie ACCOUNTS.

follow that same procedure to download. and upload each locale bundle. you can export the locale bundle stub again and compare it to the template to find all new keys. modify. Also. Also.JasperServer User Guide template for future translations. see the Localization chapter in JasperServer Administrator Guide.3. if you change your Domain design and need to modify your properties files. See the procedure in section 7. Certain editors provide features for editing properties files. “Resources of a Domain. Regardless of how you edit properties files. For additional information on locales and locale bundles in JasperServer. you need to upload them as locale bundles to your Domain in order to take effect.” on page 153 for instructions on uploading locale bundles. You can create and edit the properties file in any text editor. when all translations are finished. if you change your Domain design. 164 . There are also translation products that manage all of the resource bundles together. allowing you to translate in parallel and find missing keys and missing translations.

Figure 8-1 Messages Page Use the check boxes and buttons on this page to manage your list of messages.1 Messages When an event occurs (such as an when a scheduled report returns errors). 8. To open the Messages page: On any page. 165 . such as if a report fails because its data source is configured with incorrect credentials. You can view a message by clicking its name. The message opens in the Event Details page.1 Message List The Messages page displays the list of events logged for the current user. You can browse these messages to gain an understanding of report scheduling problems in JasperServer. JasperServer notifies the owner of the report through an internal message. Information there can help you troubleshoot problems with your scheduled reports.1.Utilities 8 UTILITIES Messages iReport Plug-ins This chapter contains the following sections: 8. click View > Messages in the menu bar.

8.5 or greater JasperServer with enabled web services To launch the JasperServer Plug-in in iReport 1. The Domain plug-in enables you create reports from Domains in the JasperServer repository./iReport. change to the iReport home directory and enter . iReport includes JasperServer and Domain plug-ins. 8. 8. iReport 3. 2.2. In Windows. The JasperServer plug-in enables you to move reports between iReport and JasperServer. or In Linux. 3.2 iReport Plug-ins By default. For more information on mail configuration.7 Java Sun JDK 1. click Start > All Programs > JasperServer Pro > Start iReport. The mail server must be manually configured after installation in order for users to send email notifications.2.JasperServer User Guide Figure 8-2 Event Details Page A common cause of the error message indicating that the report failed to execute is a misconfigured mail server. Click Window > JasperServer Repository. refer to the JasperServer Administrator Guide. To launch iReport: 1. For more information.sh at the command prompt.7.7 The Domain plug-in is included by default in the Professional version of iReport.7 JasperServer Professional or Enterprise 3. Launch iReport. “Using the JasperServer Plug-in for iReport. A JasperServer pane appears in the upper left corner of your iReport workspace. 166 .2 Domain Plug-in The Domain plug-in for iReport requires: JasperServer plug-in.4.1 JasperServer Plug-in The JasperServer plug-in requires: iReport 3. refer to section 5.” on page 103. iReport opens.

and drill through. It is the entry point to analysis operations. and it becomes one of the items to which the Domain’s security file and locale bundles can apply. such as slice and dice. the Ad Hoc Editor lets you drag and drop report elements to draft. The practice of managing every facet of a company’s interactions with its clientele. CRM applications help businesses track and support their customers. A range of criteria can be audited and the results logged. and finalize reports. preview. All Ad Hoc reports can be run with auditing enabled. Audit Archiving Determining the limit on saving audit results. Analysis View A view of multidimensional data that is based on an analysis client connection and an MDX query. and scheduled within JasperServer. In addition. drill down. An analysis client connection is either a direct Java connection (Mondrian connection) or an XML-based API connection (XMLA connection). Like JRXML reports. Ad Hoc reports can be run. operators.Glossary GLOSSARY Ad Hoc Editor JasperServer’s integrated report designer. printed. and constants. Analysis Schema A metadata definition of a multidimensional database. Ad Hoc reports may be reopened in the Ad Hoc Editor. In JasperAnalysis. Audit Logging Recording who used JasperServer to do what when. the results can be used as input for other reports. Starting from a collection of fields predefined in a Topic or selected from a Domain. a field whose value is calculated from a user-written formula that may include any number of fields. 167 . CRM Customer Relationship Management. and saved. Analysis Client Connection A definition for retrieving an analysis view. A calculated field is defined in the Domain Designer dialog. schemas are stored in the repository as XML file resources. Calculated Field In a Domain. CrossJoin An MDX function that combines two or more dimensions into a single axis (column or row). further modified. such as limiting them to a range of dates or a total number of instances.

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

For Domain-based reports that prompt for filter values. but you may define calculated fields in a Domain or custom fields in the Ad Hoc Editor. 169 . An OLAP operation for returning the parent hierarchy level to view to summary information. and filters and aggregates the data to create a multidimensional database. text field. Input Control A button. ETL Extract. the new table displays the low-level data that constitutes the data that was clicked. Eclipse An open source Integrated Development Environment (IDE) for Java and other programming languages. the field chosen to define the group becomes the independent variable on the X axis. Facts are typically numeric. while the other fields appear as columns. such as C/C++. Group In a report. the value appears in a header and footer around the rows of the group. is called an item and may be used in the Ad Hoc editor. user input. input controls and their associated datatypes must be defined as repository objects and explicitly associated with the report. In a table.Glossary Domain Topic A Topic that is created from a Domain by the Choose Ad Hoc Data wizard. but it allows further filtering. For JRXML reports. Items can be grouped in sets and are available for use in the creation of Ad Hoc reports. Unlike a JRXML-based Topic. When either type of report is used in a dashboard. Field A field is equivalent to a column in the relational database model. Drill up. its input controls are available to be added as special content. Frames can be mapped to input controls if their content can accept parameters. Click a fact to open a new table beneath the main navigation table. A process that retrieves data from transactional systems. Frame A dashboard element that displays reports or custom URLs. drop-down list. and selection of items. 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. Drill through. Load. the input controls are defined internally. Hierarchy Level In analysis. Item When designing a Domain or creating a Topic based on a Domain. Any type of field. check box. Fact The specific value or aggregate value of a measure for a particular member of a dimension. while the other fields of each group are used to compute the dependent value on the Y axis. a member of a dimension containing a group of members. Drill To click on an element of an analysis view to change the data that is displayed: Drill down. a Domain Topic can be edited in JasperServer by users with the appropriate permissions. A Domain Topic is based on the data source and items in a Domain. along with its display name and default formatting properties. Fields originate in the structure of the data source. a group is a set of data rows that have an identical value in a designated field. or calendar icon that allows users to enter a value when running a report or viewing a dashboard that accepts input parameters. 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. In a chart. Transform. An OLAP operation that displays detailed transactional data for a given aggregate measure.

Mondrian A Java-based. In an analysis view. a formula that calculates the values displayed in a table’s columns. and returning cube data for analytical processing. a formula that calculates the facts that constitute the quantitative data in a cube. or analysis view. 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.mysql. MDX Multidimensional Expression Language. JPivot An open source graphical user interface for OLAP operations. or a chart’s dependent variable (such as the slices in a pie). anything residing in the repository. font. report element. For information. such as an image. For more information. data source. a collection of joined tables from the actual data source. visit http://www. dashboard. An MDX query is the query that determines the data displayed in an analysis view. JDBC Java Database Connectivity. Administrators set user and role-based access privileges on repository objects to establish a security policy.JasperServer User Guide JavaBean A reusable Java component that can be dropped into an application container to provide standard functionality. Object In JasperServer. saved report.sourceforge. Join Tree In Domains. open source multidimensional database application. Mondrian XMLA Source A server-side XMLA source definition of a remote client-side XMLA connection used to populate an analysis view using the XMLA standard. JNDI Java Naming and Directory Interface. Measure Depending on the context: In a report. visit http://jpivot. a crosstab’s data values. Only the fields in a same join tree or calculated from the fields in a same join tree may appear together in a report. domain.com/. The folders that contain repository objects are also objects. Provides multidimensional views of data that help users analyze current and past performance and model future scenarios. A standard interface that Java applications use to access databases. MySQL An open source relational database management system. file. A standard interface that Java applications use to access naming and directory services. Navigation Table The main table in an analysis view that displays measures and dimensions as columns and rows.net/. Mondrian Connection An analysis client connection that consists of an analysis schema and a data source used to populate an analysis view. Mondrian Schema Editor An open source Eclipse plugin for creating Mondrian analysis schemas. A language for querying multidimensional objects. 170 . OLAP On Line Analytical Processing. such as OLAP (On Line Analytical Processing) cubes. topic. report output.

Pivot To rotate a crosstab such that its row groups become columns groups and its column groups become rows. In JasperAnalysis. dashboards. parameters can be mapped to input controls that users can interact with. and resources. analysis views. TIME. Administrators create named roles. Organization Admin Also called the organization administrator. such as its color and label. X and Y axis) for organizing information containing more than two logical dimensions (for example.Glossary Organization A set of users that share resources and repository objects in JasperServer. Repository The tree structure of folders that contain all saved reports. Properties Settings associated with an object. a very low sales figure or a very high number of helpdesk tickets. pivot the crosstab by clicking . For example. they are uploaded to the repository as resources. For Domains. schemas are represented in XML design files. Such outliers may indicate a problem (or an important achievement) in your business. such that each physical dimension is capable of representing one or more logical dimensions. and repository objects. 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. An organization has its own user accounts. Applications can access the repository through the web service API. A report parameter is defined by its name and type. Role A security feature of JasperServer. Properties are normally editable. In JasperServer. 171 . Administrators use the import and export utilities to back up the repository contents. The default organization admin in each organization is the jasperadmin account. Schema A logical model that determines how data is stored. and LOCATION). roles. repository permissions. and then set access permissions to repository objects based on those roles. In Java. and repository content. Users access the repository through the JasperServer web interface or through iReport. The settings determine certain features of the object. JasperServer also makes certain functionality available to users based on their roles. properties can be set in files listing objects and their settings. Pivot Table A table with two physical dimensions (for example. an OLAP schema is the logical model of the data that appears in an analysis view. JasperAnalysis excels at revealing outliers. For example. A user in an organization with the privileges to manage the organization’s user accounts and roles. and indexes. views. In the Ad Hoc Editor. assign them to user accounts. Pivot tables are used in JasperAnalysis. and root folder in the repository to securely isolate it from other organizations that may be hosted on the same instance of JasperServer. which determines certain menu options displayed to those users. where the values described by the dimensions are aggregated using a function such as SUM. CUSTOMER. An organization admin can also create sub-organizations and mange all of their accounts. the schema in a relational database is a description of the relationships between tables. PRODUCT. roles. Outlier A fact that seems incongruous when compared to other member’s facts.

but all items in a set must originate in the same join tree. users. password. An XML standard that uses Simple Object Access protocol (SOAP) to access remote data sources. Web Services A SOAP (Simple Object Access Protocol) API that enables certain features to be managed over the web without running JasperServer. such as a retail transaction. XML eXtensible Markup language. database experts or business analysts who create data sources and Domains.sourceforge. For more information. Slice An OLAP operation for filtering data rows. Transactional data are often stored in relational databases. WCF Web Component Framework. and interpreting data for use across any number of XMLenabled applications. A low-level GUI component of JPivot. and business users who create and view reports and dashboards.org/ XML/A Connection A type of analysis client connection that consists of Simple Object Access Protocol (SOAP) definitions used to populate an analysis view. The system admin can create root-level organizations and manage all server settings.JasperServer User Guide Set In Domains and Domain Topics. The features include repository. scheduling and user administration tasks. XML/A XML for Analysis. SQL Structured Query Language. repository permissions. see http://jpivot. A set can be based on the fields in a table or entirely defined by the Domain creator. For more information. A standard language used to access and manipulate data and schemas in a relational database. System Admin Also called the system administrator. transferring. a named collection of items grouped together for ease of use in the Ad Hoc Editor. Topic A JRXML file created externally and uploaded to JasperServer as a basis for Ad Hoc reports. Roles are assigned to user accounts to determine access to objects in the repository. relevant to your business. The account associates the login name with user's full name. User Depending on the context: A person who interacts with JasperServer to fulfill a goal.net/ wcf/index. There are generally three categories of users: administrators who install and configure JasperServer. Transactional Data Data that describe measurable aspects of an event. roles. with one row for each event and a table column or field for each measure. Topics are stored in the Ad Hoc Components folder of the repository and displayed when a user launches the Ad Hoc Editor. A user who has unlimited access to manage all organizations. The default system admin is the superuser account.html.xmla. 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. 172 . and email address. The order of items in a set is preserved. A user account created for a specific person or purpose. A standard for defining. see http://www. and repository objects across the entire JasperServer instance.

61 area chart 63 auto-refresh interval in dashboards 21 available content 17 B bar chart 63 basic functions 57 Boolean operators in Domains 69 C calculated fields 57 cascading input controls 33. 49 add function 57 Add New Domain wizard 118 adding a design file as a new Domain 150 adding reports 87 alphabetical ascending 54. 49 tool bar 42 Ad Hoc reports and dashboards 24 kinds 43 limits 78 localization 77 saving 42.Index INDEX A access grants and scheduled reports 34 Domain column-level 159 Domain row level 157 effect of grants 68. 76 collapse group 65 collapse members 66 column-level security in Domains 159 columns column groups 46. See input controls. 66 percent of column group parent 53. 74. count all 66 creating 173 . 58 summarizing 47 controls. 155 Ad Hoc Editor available fields selected in Domain Topic 70 calculated fields 57 custom fields 57 decimal places 58 designing report layouts 43 editing reports created in the Ad Hoc Editor 48 filters 59 formatting reports 48 formulas 57 how to use 41. 47. 98 CGP 53. 65 column width 49. 69. 47. unsummarized 63 theme for 112 types of charts 63 unique features 63 Charts Pro 29 Choose Ad Hoc Data wizard 67. 45 input controls 59 limits on reports 78 page properties 43 parametrized queries 59 reports 41 rounding and custom fields 58 saving reports 42. 58 change fields for Domain-based reports 71 chart reports and dashboards 24 compared with table and crosstab 44 display options 63 page size 64 resizing 64 sample Topic 63 summarized vs. 66 alternate group 42.

24 area 18 auto-refresh interval 21 behavior when content deleted from repository 23 buttons 17 containing other dashboards 22. 66 measures 65 percent of group 58 pivoting 65 row and column groups 65 row group parent 53. 66 Data page 67 data policies 78 data sources. 23 creating 17–24 deleting content 21. 25 and parameters 25 and screen size 23. 66 hyperlinks 66 keep only 52. 23 D dashboards adding content 22 adding custom URLs 17 adding logos 17 and Ad Hoc reports 24 and available items 17 and custom URLs 20. 103 crosstab reports adding fields 65 and dashboards 24 and dataset size 42 collapse group 65 collapse members 66 column group parent 53.JasperServer User Guide dashboards 17–24 Domain security files 155 Domain Topics 73 reports 73. 87. adding as a new Domain 150 editing 141 exporting 140 filters 150 itemGroups element 142 items element 142 joins 144 Oracle schema name 141 resources element 142 schema element 141 schemaLocation attribute 142 structure 141–149 uploading edited file 150 version attribute 141 xmlns attribute 141 XSD 140 Display page 69 distinct count 66 divide function 57 174 . 79. 74. 66 expand group 65 expand members 51. fixed sizing 23 refining the layout 21 saving 18 SuperMart dashboard 16 tips for creating reports 24 title 21 viewing 16 working with 15–25 Data and Design page 118 data formats 49. 25 mapping input controls to URLs 20 multiple selection 22. 58 sample size 66 sample Topic 65 setting data formats 66 sorting 54. and scheduled reports 34 datasets 42 datatypes 92. 23 and input controls 19. 66 switch to column group 51. 22. 23 overview 17 proportional v. FILE protocol 23 limitations 17. 100 date functions 57 design files See also Domains. 65 switch to row group 65 unique features 65 custom fields add 57 basic functions 57 date functions 57 default name 58 divide 57 multiply 57 operators 57 overview 57 percent of group parent 57 percent of total 57 rank 57 renaming 58 round 57 special functions 57 subtract 57 swap fields 57 custom URL in dashboards 17. access grants. 58 compared with table 44 drill to details 66 exclude 52. 22 designer 18 edit 24 HTTP v.

Index Domain Designer 118 Domain plug-in input controls 110 installing 166 parametrized queries 110 using in iReport 108 Domain Topics editing 76 effect of access grants 68. Simple Domain 117 Simple Domain Topic 117 SuperMart Domain 117 typical uses 115 using a Domain for a report 67 drill to details 66 dynamic filters 59 E Edit Domain Topic wizard 76 Event Details page 165 exclude 52 expand group 65 expand members 51. 19. 51. 60 in Topics 59 using 60 Filters page 68 fixed sizing 24 Flash charts 29 folders 106 fonts 88 formats for report output 28 formatting reports 48 formulas 57 Fusion 29 G glossary 167 Groovy 156 groups adding to crosstab reports 64 expanding and collapsing 65 pivoting 42 switching 42. 166 editing 135 effect of access grants 68. 52. 93 compared to filters 59 date 95 default values 30 display differences in dashboards 25 encouraging reuse of 25 in reports run from Domain plug-in 110 in the Ad Hoc Editor 42. 25 and parametrized queries 59 cascading 33. 155 exporting designs to XML files 140 filtering data for a report 68 filters 69 Groovy 156 input controls 110 item sets 68. 22 pop-up page 31 175 . 69. 66 exporting Domain designs to XML design files 140 external resources 88 F fields changing for Domain-based reports 71 in crosstab reports 64. 123 joins 120. 98 check box 92. See Domain Topics. 65 filter pane 43. 74. 74. 59 filters compared to input controls 59 filtering items in Domains 69 in Domain plug-in 110 in Domains 68 in the Ad Hoc Editor 59. 155 saving 73 Domains See also design files. 65 H help 9 hide scroll bars 22 hiding detail rows 49 Home page for end users 8 icons 9 I icons export report output 28 Home page 9 input controls 42 adding 90 and dashboards 17. 132 locale bundles 161 localization 161 presentation and physical layers 156 principal expressions 156 properties files 161 referential integrity 136 samples 117 saving as Topics. 61. 69. access grants and scheduled reports 34 Boolean comparison operators 69 defined 115 defined by a new design file 150 design file 139 designing a Domain 117–134 Domain plug-in for iReport 108. 59 limitations 25 mapped to custom URLs 20.

adding input controls 90 and dashboards 20. 87 Maps Pro 29 measures 65 messages about system events 165 Messages page 165 multiple v. 87 K keep only 52 L layouts of reports 43 Liferay 64 line chart 63 locale bundles 161 locales 8. 128 NVARCHAR2 127 schema name in design file 141 synonyms 127 P pages Data 67 Data and Design 118 Display 69 Event Details 165 Filters 68 Home page for end users 8 Input Control 31 Job Details 35 Jobs List 34 Locate Query 84 Main JRXML 81. 58 percent of total function 57 physical layer 156 pie chart 63 pivoting 42. 127.JasperServer User Guide running a report with input controls 30 testQuery 95 text 91 types 90 using 59 installing Domain plug-in 166 JasperServer plug-in 166 iReport adding resources 106 connecting to JasperServer 103 creating reports 105 Domain plug-in 108. 66 O online help 9 Oracle choosing schemas 125. 88. 25 and reports 40 in reports run from Domain plug-in 110 in the Ad Hoc Editor 42. 77. 65 plug-ins Domain 108. 166 JRXML files 107 limits on reports 78 repository 105. 123 itemGroups element in design files 141. 101 localization of Domains 161 Locate Query page 84 logging in 8 M Main JRXML page 81. 113 JasperAnalysis 9 Job Details pages 35 Jobs List page 34 jobs. 132 security 156 JRXML files and Domain Topics 73 and Topics 76 external resources 88 field names in 101 field names in Topics 77 in iReport 107 to create a new report 81. 166 JasperServer 166 portal 64 presentation layer 156 presentation mode 42. See scheduling reports. 142 items element in design files 142 J JAR files 87. 50 preview 18 principal expressions 156 print view 17 176 . 59 running a report with parametrized queries 30 passwords 8 percent of group parent functions 57. 107 running reports 108 item sets 68. single controls in dashboard 17 multiply function 57 N Naming page 81 numeric ascending and descending 54. 87 Messages 165 Naming 81 Report 30 Resource List 82 Save Topic 74 Topics and Domains 67 parametrized queries See also filters. 61. joins in Domains 120.

table and chart 43. 47. 103. 58 round function 57 row-level security in Domains 157 rows percent of row group parent 53. 50. 20 resolution 24 Resource List page 82 resources adding to iReport 106 and Ad Hoc reports 77 and localizations 101 resources element in design files 141. 142 RGP 53. 71 designing in the Ad Hoc Editor 41 designing layouts 43 editing labels 47 editing reports created in the Ad Hoc Editor 48 effect of access grants 34. 108 sample size 66 sample Table report 45 saving in the Ad Hoc Editor 42. 30 Flash charts 29 from iReport 108 in the Ad Hoc Editor 42.jrxml 87 SalesByMonthDetail. 49 saving report output 28 selecting styles 48 setting data formats 49.Index properties. 47. 68. 74. crosstab and chart 43.jrxml 80. 107 main page 10 manager 117 searching 10 system messages 165 reset 17. 99 with input controls 30 repository in iReport 105. example 27. 42. 81 logo. 105 crosstab layout and formatting options 65 crosstab vs. 24 Q query resource 84 R rank function 57 recurrence calendar recurrence 39 simple recurrence 38 types 36 redo 42 referential integrity 136 report area 46 report output 42 Report page 30 Report Wizard 81 reports See also scheduling reports and running reports. 71 validating 86. 79. 50 in the background 39 limits 78 on a schedule 35 S sample Domains 117 sample files AllAccounts. 65 summarizing 47 running reports See also reports and scheduling reports. 66 summarizing rows and columns 47. access grants and scheduled reports 34 defining a job 35 defining schedules 34 editing a job 38 177 .jpg 80 SalesByMonth. 155 export icons 28 exporting report output 28 Flash-enabled 29 formatting 48 limits 78 localization 101 report area 46 report output 28 report parameters 40 row and column groups 46. 66 based on Domains 78 based on JDBC data sources 78 chart layout and formatting options 63 creating 73. 66 sorting 62. in locale bundles 161 proportional sizing 23. 65 running 27. Ad Hoc 41 adding 87 adding fields 46. 65 adjusting column width 49. 66 table vs. 87. 39.jrxml 87 sample reports Accounts 28 Freight 30 SalesByMonth 87 sample size 66 sample Topics demo for adhoc 45 foodmart data for crosstab 65 Simple Domain Topic 117 Save Topic page 74 scatter chart 63 scheduling reports See also reports and running reports. 69. 74. 58 row groups 46.

for charts 112 time series chart 63 time zones 8 tool bar 42 Topics See also Domain Topics.JasperServer User Guide recurrence 38 viewing job schedules 34 schema element in design files 141 schemaLocation attribute in design files 142 schemas. 20 special functions 57 standard controls in dashboards 17 styles 48 submit 17. 56 uploading edited design files 150 URLs in dashboards 20 utilities iReport 166 messages 165 V validating reports 86. 66 spacer 49 special content in dashboards 17. 71 designing layouts 43 formatting 48 hiding detail rows 49 sample 45 selecting styles 48 setting data formats 49 showing detail rows 49 sorting 42. 55 undo all 42. 62 spacer 49 summarizing rows and columns 47 text label 17 themes. 62. See design files. 54. 65 switch to row group 65 switching groups 42. 76 Domain Designer 118 Edit Domain Topic 76 Report 81 X XML Domain design files 140 xmlns attribute in design files 141 XSD of Domain design file 140 178 . 69 fields and data in a Domain Topic 74 scheduled reports 34 W Widgets Pro 29 wizards Add New Domain 118 Choose Ad Hoc Data 67. 66 sorting reports 42. See Domain Topics. 74 filters 150 principal expressions 156 row-level security 157 structure 155 select fields for Domain-based reports 71 showing detail rows 49 Simple Domain 117 Simple Domain Topic 117 single v. Simple Domain Topic 117 uploading 76 Topics and Domains page 67 TrueType fonts 88 U undo 42. 99 version attribute in design files 141 viewing dashboards 16 fields and data in a Domain 68. 69. screen sizes 24 search expression 13 search field 11 security files column-level security 159 effect of access grants 68. multiple controls in dashboard 17 slice 52. access grants and scheduled reports 34 as JRXML files 73. 61 T table reports adding fields 46 adjusting column width 49 and dashboards 24 and dataset size 42 column groups 46 compared with crosstab and chart 43. unsummarized charts 63 SuperMart 16 switch to column group 51. 20 subtract function 57 summarized vs. 76 creating 76 defined 76 field names in 77 JRXML files 73 localization 77 parametrized queries 59 saving Domains as Topics.

Sign up to vote on this title
UsefulNot useful