TIBCO Jaspersoft Studio User Guide
Total Page:16
File Type:pdf, Size:1020Kb
TIBCO JASPERSOFT STUDIO® USER GUIDE RELEASE 6.1 http://www.jaspersoft.com Copyright ©2005-2015, TIBCO Software Inc. All rights reserved. Printed in the U.S.A. TIBCO, the TIBCO logo, TIBCO Jaspersoft, the TIBCO Jaspersoft logo, TIBCO Jaspersoft iReport Designer, TIBCO JasperReports Library, TIBCO JasperReports Server, TIBCO Jaspersoft OLAP, TIBCO Jaspersoft Studio, and TIBCO Jaspersoft ETL are trademarks and/or registered trademarks of TIBCO Software Inc. 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 0915-JSS61-08 of the Jaspersoft Studio User Guide. TABLE OF CONTENTS Chapter 1 Getting Started with Jaspersoft Studio 9 1.1 Introduction to Jaspersoft Studio 9 1.2 User Interface 10 1.2.1 User Interface Components 11 1.3 Hardware Requirements 13 1.4 Software Requirements 13 1.5 Compatibility Between Versions 13 1.6 Accessing the Source Code 14 1.7 Understanding the Design tab 14 1.7.1 The Report Lifecycle 14 1.7.2 Understanding Bands 15 1.7.3 Band Types 15 1.7.4 Specifying Report Properties 16 1.7.5 Columns 18 1.7.6 Advanced Options 19 1.8 Units of Measure in Jaspersoft Studio 19 1.8.1 Configuration 19 1.8.2 Changing the Field Unit of Measure 20 1.8.3 Alias and Auto-complete 20 1.8.4 Approximations 21 1.9 Exporting Reports with Jaspersoft Studio 21 1.9.1 Compiling the Report 21 1.9.2 Preview and Exporting 21 1.9.3 Choosing Report Templates for PDF 21 Chapter 2 Concepts of JasperReports 23 2.1 JRXML Sources and Jasper Files 23 2.2 Data Sources and Print Formats 28 2.3 Expressions 28 2.3.1 Expression Types 29 2.3.2 Expression Operators and Object Methods 29 2.3.3 Using an If-Else Construct in an Expression 32 2.4 Using Java as a Language for Expressions 32 TIBCO Software Inc. 3 Jaspersoft Studio User Guide 2.5 Using Groovy as a Language for Expressions 33 2.6 Using JavaScript as a Language for Expressions 34 2.7 Using JasperReports Extensions in Jaspersoft Studio 35 2.8 A Simple Program 35 Chapter 3 Report Elements 37 3.1 Basic Element Properties 38 3.2 Inserting, Selecting, and Positioning Elements 39 3.2.1 Inserting Elements 39 3.2.2 Selecting Elements 39 3.2.3 Positioning Elements 39 3.3 Formatting Elements 40 3.4 Graphic Elements 42 3.4.1 Line 42 3.4.2 Rectangle and Ellipse 42 3.4.3 Images 42 3.4.4 Padding and Borders 43 3.5 Text Elements 43 3.5.1 Static Text 43 3.5.2 Text Fields 44 3.6 Using Frames 45 3.7 Composite Elements 45 3.7.1 Inserting Page and Column Breaks 45 3.7.2 Creating and Editing Composite Elements 46 3.8 Anchors, Bookmarks, and Hyperlinks 48 3.8.1 Anchors and Bookmarks 49 3.8.2 Overview of Hyperlink Configuration 49 3.8.3 Hyperlink Types 51 3.8.4 Defining Hyperlinks 52 3.8.5 Hyperlink Parameters 52 3.8.6 Hyperlink Tooltips 52 3.8.7 Working with Report Units 52 3.9 Advanced Elements and Custom Components 53 3.10 Hyperlinks in HTML5 Charts 54 3.10.1 Creating Hyperlinks in HTML5 Charts 54 3.10.2 Working with Bucket Properties and Hidden Measures 57 3.11 Subreports 62 3.12 Custom Visualization Component 66 Chapter 4 Creating a Simple Report 69 4.1 Creating a New Report 69 4.2 Adding and Deleting Report Elements 73 4.2.1 Adding Fields to a Report 73 4.2.2 Deleting Fields 76 4.2.3 Adding Other Elements 76 4.3 Previewing a Report 77 4.4 Creating a Project Folder 78 4 TIBCO Software Inc. Chapter 5 Accessing JasperReports Server from Jaspersoft Studio 81 5.1 Connecting to JasperReports Server 81 5.2 Publishing a Report to JasperReports Server 83 5.3 Publishing a Report Template 86 5.3.1 Creating a Report Template based on a Template in the Server 86 5.3.2 Report Template Styles in Jaspersoft Studio 89 5.4 Creating and Uploading a Topic for Ad Hoc Views 91 5.5 Managing Repository Objects through Jaspersoft Studio 92 5.5.1 Adding, Modifying and Deleting Resources 93 5.5.2 Running a Report 94 5.5.3 Editing a Report 94 5.6 Creating and Uploading Chart Themes 95 5.7 Working with Domains 97 5.7.1 Understanding the repo: Syntax 98 5.8 Adding a Date/Time Stamp to Scheduled Output in JasperReports Server 99 Chapter 6 Working with Fields 103 6.1 Understanding Fields 103 6.2 Registration of Fields from a SQL Query 105 6.3 Registration of JavaBean Fields 106 6.4 Fields and Textfields 108 6.5 Data Centric Exporters 108 6.5.1 Configuring a Report's Metadata for Use With the JSON Data Exporter 108 Chapter 7 Report Templates 111 7.1 Template Structure 111 7.2 Creating and Customizing Templates 113 7.2.1 Creating a New Template 113 7.2.2 Customizing a Template 115 7.3 Saving Templates 116 7.3.1 Creating a Template Directory 116 7.3.2 Exporting a Template 117 7.3.3 Creating a Template Thumbnail 119 7.4 Adding Templates to Jaspersoft Studio 119 Chapter 8 Using Parameters 121 8.1 Managing Parameters 121 8.2 Default Parameters 123 8.3 Using Parameters in Queries 124 8.3.1 Using Parameters in a SQL Query 125 8.3.2 Using Parameters with Null Values 125 8.3.3 IN and NOTIN Clauses 126 8.3.4 Relative Dates 126 8.3.5 Passing Parameters from a Program 129 8.4 Parameters Prompt 130 Chapter 9 Variables 133 9.1 Defining or Editing a Variable 133 TIBCO Software Inc. 5 Jaspersoft Studio User Guide 9.2 Base Properties of a Variable 133 9.3 Other Properties of a Variable 134 9.3.1 Evaluation Time 134 9.3.2 Calculation Function 135 9.3.3 Increment Type 135 9.3.4 Reset Type 136 9.3.5 Incrementer Factory Class Name 136 9.4 Built-In Variables 136 9.5 Tips & Tricks 137 Chapter 10 Data Adapters 139 10.1 zaCreating and Editing Data Adapters 140 10.1.1 Creating a Data Adapter 140 10.1.2 Importing and Exporting Data Adapters 142 10.1.3 Copying a Data Adapter 143 10.2 Using Data Adapters in Reports and Datasets 143 10.2.1 Data Adapter For a Report 143 10.2.2 Data Adapters and Report Deployment 144 10.2.3 Default Data Adapter 144 10.3 Working with Database JDBC Connections 146 10.3.1 Creating a Database JDBC Connection 146 10.3.2 Troubleshooting a Database JDBC Connection 149 10.3.3 Using a Database JDBC Connection 150 10.4 Working with a Collection of JavaBeans Data Adapter 153 10.4.1 Implementing the Factory Class for a Collection of JavaBeans 154 10.4.2 Creating a Data Adapter from a Factory Class 155 10.4.3 Registering the Fields 156 10.5 Working with XML Data Adapters 157 10.5.1 Creating a Node Set for an XML Document 157 10.5.2 Creating an XML Data Adapter 158 10.5.3 Registration of Fields for an XML Data Adapter 160 10.5.4 XML Data Adapters and Subreports 161 10.6 Using XML/A Data Adapters 163 10.6.1 Registration of fields in XML/A Providers 164 10.7 Working with CSV Data Adapters 164 10.7.1 Registration of the Fields for a CSV Data Adapter 167 10.8 Using the Empty Record Data Adapter 167 10.8.1 Understanding the Empty Record Implementation 168 10.9 Working with the JRDataSource Interface 168 10.9.1 Understanding the JRDataSource Interface 169 10.9.2 Implementing a New JRDataSource 169 10.9.3 Using a Custom JasperReports Data Source with Jaspersoft Studio 171 10.10 A Look at TIBCO Spotfire Information Links 172 Chapter 11 Using Tables 177 11.1 Creating a Table 177 11.2 Editing a Table 183 6 TIBCO Software Inc. 11.2.1 Editing Table Styles 183 11.2.2 Editing Cell Contents 184 11.2.3 Editing Table Data 186 11.3 Table Structure 187 11.3.1 Table Elements 187 11.3.2 Table Cells 188 11.4 Working with Columns 189 11.4.1 Column Groups 189 Chapter 12 Working with Charts 191 12.1 Datasets 191 12.1.1 Creating a Dataset 192 12.2 Creating a Simple Chart 193 12.3 Setting Chart Properties 198 12.4 Spider Charts 199 12.5 Chart Themes 202 12.5.1 Using the Chart Theme Designer 202 12.5.2 Editing Chart Theme XML 203 12.5.3 Creating a JasperReports Extension for a Chart Theme 203 12.5.4 Applying a Chart Theme 204 Chapter 13 HTML5 Charts in Commercial Editions 205 13.1 Overview of HTML5 Charts 205 13.2 Simple HTML5 Charts 210 13.2.1 Creating an HTML5 chart 211 13.2.2 Editing HTML5 Charts 213 13.2.3 Creating Hyperlinks 216 13.2.4 Setting Advanced Options for HTML5 Charts 217 13.3 Scatter Charts 218 13.4 Dual-Axis, Multi-Axis, and Combination Charts 222 Chapter 14 Working with TIBCO GeoAnalytics Maps 227 14.1 Configuring a Basic Map 228 14.2 Using Expressions for Properties 230 14.3 Understanding Layers 231 14.4 Working with Markers 232 14.4.1 Static Markers 232 14.4.2 Dynamic Markers 235 14.5 Working with Paths 238 Chapter 15 Creating Queries 241 15.1 Using the Dataset and Query Dialog 241 15.2 Working with the Query Builder 243 15.2.1 Query Outline View and Diagram View 243 15.2.2 Selecting Columns 245 15.2.3 Joining Tables 246 15.2.4 Data Selection Criteria (WHERE Conditions) 247 15.2.5 Acquiring Fields 248 TIBCO Software Inc.