TIBCO Jaspersoft Studio User Guide
Total Page:16
File Type:pdf, Size:1020Kb
TIBCO JASPERSOFT® STUDIO USER GUIDE RELEASE 6.3 http://www.jaspersoft.com Copyright ©2005-2016, 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 0616-JSP63-11 of the TIBCO Jaspersoft Studio User Guide. TABLE OF CONTENTS Chapter 1 Getting Started with Jaspersoft Studio 11 1.1 Introduction to Jaspersoft Studio 11 1.2 Installing Jaspersoft Studio 12 1.2.1 Software Requirements 12 1.2.2 Hardware Requirements 13 1.2.3 Available Packages 13 1.2.4 Updating Your Workspace to Jaspersoft Studio 6.2 and Higher 13 1.2.5 Compatibility Between Versions 17 1.2.6 Accessing the Source Code 18 Chapter 2 Creating a Simple Report 19 2.1 Creating a New Report 19 2.2 Adding and Deleting Report Elements 23 2.2.1 Adding Fields to a Report 23 2.2.2 Deleting Fields 24 2.2.3 Adding Other Elements 24 2.3 Previewing a Report 24 2.4 Creating a Project Folder 25 Chapter 3 User Interface and Design View 27 3.1 Eclipse Interface 28 3.1.1 Learning More About Eclipse 28 3.2 User Interface Components 28 3.3 The Design Tab 29 3.4 Understanding Bands 30 3.4.1 Band Types 30 3.5 Specifying Report Properties 31 3.5.1 Columns 33 3.5.2 Advanced Options 33 3.6 Exporting Reports with Jaspersoft Studio 34 3.6.1 Compiling the Report 34 3.6.2 Preview and Exporting 34 3.6.3 Choosing Report Templates for PDF 35 TIBCO Software Inc. 3 TIBCO Jaspersoft Studio User Guide Chapter 4 Report Elements 37 4.1 Common Element Properties 38 4.1.1 The Palette 38 4.1.2 Element Properties 38 4.2 Inserting, Selecting, and Positioning Elements 39 4.2.1 Inserting Elements 39 4.2.2 Selecting Elements 40 4.2.3 Positioning Elements 40 4.2.4 Positioning Elements in Containers 41 4.3 Formatting Elements 45 4.4 Graphic Elements 48 4.4.1 Line 48 4.4.2 Rectangle and Ellipse 48 4.4.3 Images 48 4.4.4 Padding and Borders 48 4.5 Text Elements 49 4.5.1 Static Text 49 4.5.2 Text Fields 49 4.6 Frames 50 4.7 Inserting Page and Column Breaks 51 4.8 Working with Composite Elements 51 4.8.1 Creating and Editing Composite Elements 51 4.8.2 Exporting and Importing Composite Elements 54 4.9 Anchors, Bookmarks, and Hyperlinks 55 4.9.1 Anchors and Bookmarks 56 4.9.2 Hyperlinks 57 4.9.3 Hyperlink Types 59 4.9.4 Creating a Hyperlink 60 4.10 Advanced Elements and Custom Components 60 4.11 Custom Visualization Component 61 Chapter 5 Fields 63 5.1 Understanding Fields 63 5.2 Registration of Fields from a SQL Query 65 5.3 Registration of JavaBean Fields 66 5.4 Fields and Text Fields 68 5.5 Data Centric Exporters 68 5.5.1 Configuring a Report's Metadata for PDF 508 Tags 68 5.5.2 Configuring a Report's Metadata for Use With the JSON Data Exporter 71 Chapter 6 Parameters 75 6.1 Managing Parameters 75 6.2 Default Parameters 77 6.3 Using Parameters in Queries 79 6.3.1 Using Parameters in a SQL Query 79 6.3.2 Using Parameters with Null Values 79 4 TIBCO Software Inc. 6.3.3 IN and NOTIN Clauses 80 6.3.4 Relative Dates 80 6.3.5 Passing Parameters from a Program 83 6.4 Parameters Prompt 84 Chapter 7 Variables 87 7.1 Defining or Editing a Variable 87 7.2 Base Properties of a Variable 87 7.3 Other Properties of a Variable 88 7.3.1 Evaluation Time 88 7.3.2 Calculation Function 89 7.3.3 Increment Type 89 7.3.4 Reset Type 90 7.3.5 Incrementer Factory Class Name 90 7.4 Built-In Variables 90 7.5 Tips & Tricks 91 Chapter 8 Expressions 93 8.1 Expression Types 93 8.2 Expression Operators and Object Methods 94 8.3 Using an If-Else Construct in an Expression 96 8.4 Using Unicode Characters in Expressions 97 8.5 Using Java as a Language for Expressions 97 8.6 Using Groovy as a Language for Expressions 98 8.7 Using JavaScript as a Language for Expressions 99 Chapter 9 Fonts 101 9.1 Font Extensions Reference 101 9.1.1 The Fonts Page 101 9.1.2 The Font Family Dialog 103 9.1.3 Font Sets 106 9.2 Example of Using Font Extensions 107 9.2.1 Creating Font Extensions and Font Sets 108 9.2.2 Using Font Extensions in a Report 112 9.3 Deploying Font Extensions to JasperReports Server 115 Chapter 10 Data Adapters 119 10.1 Creating and Editing Data Adapters 120 10.1.1 Creating a Data Adapter 120 10.1.2 Importing and Exporting Data Adapters 121 10.1.3 Copying a Data Adapter 122 10.2 Using Data Adapters in Reports and Datasets 122 10.2.1 Data Adapter For a Report 122 10.2.2 Data Adapters and Report Deployment 123 10.2.3 Default Data Adapter 123 10.3 Working with Database JDBC Connections 125 10.3.1 Creating a Database JDBC Connection 125 10.3.2 Troubleshooting a Database JDBC Connection 127 TIBCO Software Inc. 5 TIBCO Jaspersoft Studio User Guide 10.3.3 Using a Database JDBC Connection 129 10.4 Working with a MongoDB Data Adapter 131 10.4.1 Creating a Native MongoDB Connection 132 10.4.2 Creating a MongoDB JDBC Data Source 134 10.5 Working with a Native Cassandra Connection 136 10.5.1 Creating a Native Cassandra Data Adapter 136 10.5.2 Using a Cassandra Connection 138 10.6 Working with a Collection of JavaBeans Data Adapter 138 10.6.1 Implementing the Factory Class for a Collection of JavaBeans 139 10.6.2 Creating a Data Adapter from a Factory Class 140 10.6.3 Registering the Fields 141 10.7 Working with XML Data Adapters 141 10.7.1 Creating a Node Set for an XML Document 141 10.7.2 Creating an XML Data Adapter 143 10.7.3 Registration of Fields for an XML Data Adapter 145 10.7.4 XML Data Adapters and Subreports 146 10.8 Working with XML/A Data Adapters 148 10.8.1 Registration of fields in XML/A Providers 149 10.9 Working with CSV Data Adapters 149 10.9.1 Registration of the Fields for a CSV Data Adapter 152 10.10 Using the Empty Record Data Adapter 152 10.10.1 Understanding the Empty Record Implementation 153 10.11 Working with the JRDataSource Interface 153 10.11.1 Understanding the JRDataSource Interface 154 10.11.2 Implementing a New JRDataSource 154 10.11.3 Using a Custom JasperReports Data Source with Jaspersoft Studio 156 10.12 A Look at TIBCO Spotfire Information Links 157 Chapter 11 Creating Queries 161 11.1 Using the Dataset and Query Dialog 161 11.2 Working with the Query Builder 163 11.2.1 Query Outline View and Diagram View 163 11.2.2 Selecting Columns 165 11.2.3 Joining Tables 166 11.2.4 Data Selection Criteria (WHERE Conditions) 167 11.2.5 Acquiring Fields 168 11.2.6 Data Preview 168 Chapter 12 Accessing JasperReports Server from Jaspersoft Studio 169 12.1 Connecting to JasperReports Server 170 12.1.1 Advanced Connection Settings 171 12.1.2 Using Single Sign-on with JasperReports Server 172 12.2 Publishing a Report to JasperReports Server 174 12.2.1 Publishing Report Resources 174 12.2.2 Choosing a Data Source for a Published Report 174 12.2.3 Example of Publishing a Report 177 12.3 Working with JasperReports Server Templates 179 6 TIBCO Software Inc. 12.3.1 Creating a Custom JasperReports Server Template 179 12.3.2 Report Template Styles in Jaspersoft Studio 182 12.4 Creating and Uploading a Topic for Ad Hoc Views 183 12.5 Managing Repository Objects through Jaspersoft Studio 184 12.5.1 Adding, Modifying and Deleting Resources 185 12.5.2 Running a Report 186 12.5.3 Editing a Report 186 12.6 Creating and Uploading Chart Themes 187 12.7 Working with Domains 189 12.8 Understanding the repo: Syntax 190 12.9 Adding a Date/Time Stamp to Scheduled Output in JasperReports Server 191 Chapter 13 Working with Tables 195 13.1 Creating a Table 195 13.2 Editing a Table 201 13.2.1 Editing Table Properties 201 13.2.2 Editing Table Styles 201 13.2.3 Editing Cell Contents 202 13.2.4 Editing Table Data 203 13.2.5 Editing Table Source 204 13.3 Table Structure 204 13.3.1 Table Elements 204 13.3.2 Table Cells 205 13.4 Working with Columns 206 13.4.1 Table Properties for Managing Columns 206 13.4.2 Working with Individual Columns 206 13.4.3 Column Groups 207 Chapter 14 Working with Charts 209 14.1 Creating a Simple Chart 209 14.2 Setting Chart Properties 214 14.3 Spider Charts 214 14.4 Chart Themes 218 14.4.1 Using the Chart Theme Designer 218 14.4.2 Editing Chart Theme XML 218 14.4.3 Creating a JasperReports Extension for a Chart Theme 218 14.4.4 Applying a Chart Theme 219 Chapter 15 HTML5 Charts in Commercial Editions 221 15.1 Overview of HTML5 Charts 221 15.2 Simple HTML5 Charts 227 15.2.1 Creating an HTML5 chart 227 15.2.2 Editing HTML5 Charts 230 15.2.3 Creating Hyperlinks 232 15.2.4 Setting Advanced Options for HTML5 Charts 233 15.3 Scatter Charts 234 15.4 Dual-Axis, Multi-Axis, and Combination Charts 238 TIBCO Software Inc.