Copyright and Disclaimer Notice

InetSoft Technology Corporation ("InetSoft") and its licensors retain all ownership rights to the programs offered by InetSoft (referred to herein as "Software") and related documentation. Use of the Software and related documentation is governed by the license agreement accompanying the Software and applicable copyright law.

Your right to copy this documentation is limited by copyright law. Making unauthorized copies, adaptations, or compilation works is prohibited and constitutes a punishable violation of the law. InetSoft may revise this documentation from time to time without notice.

THIS DOCUMENTATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN NO EVENT SHALL INETSOFT BE LIABLE FOR INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY KIND ARISING FROM ANY ERROR IN THIS DOCUMENTATION, INCLUDING WITHOUT LIMITATION ANY LOSS OR INTERRUPTION OF BUSINESS, PROFITS, USE, OR DATA.

The Software and documentation are copyright ©1996-2007 InetSoft Technology Corporation. All rights reserved. InetSoft™, Style Report™, Insight Scope™, InetSuite™ and the ‘pages overlaying the i’ logo are trademarks or registered trademarks of InetSoft Technology Corporation in the United States and other countries. Other InetSoft logos, product names, and service names are also trademarks of InetSoft Technology Corporation, which may be registered in other countries.

All other products or name brands are the trademarks of their respective holders.

The downloading, exporting, or re-exporting of InetSoft software or any underlying information or technology must be in full compliance with all United States and other applicable laws and regulations. Any provision of InetSoft software or documentation to the U.S. Government is with restricted rights as described in the license agreement accompanying InetSoft software.

Contact Information

Our primary goal is to help our customers. In addition to being your Java tools provider, we want to be your extended team member. All customer suggestions and requests are carefully examined, and we will attempt to satisfy our customers to the maximum degree possible. Your feedback is greatly appreciated.

Address InetSoft Technology 4500 New Brunswick Ave Suite 201 Piscataway, NJ 08854 Phone +1 (732) 424-0400 Fax +1 (732) 424-5593 Sales Team [email protected] Customer Service (Non-technical) [email protected] Technical Support Please to go to our web site (http://www.inetsoft.com/) and choose either subscriber support or presales support to open cases. General Information [email protected] Web Site http://www.inetsoft.com/ GETTING STARTED GUIDE

1 DOCUMENTATION ROADMAP ...... 4

2 OPTIONAL COMPONENTS...... 6

3 ABOUT THIS DOCUMENT ...... 7

3.1 Prerequisites ...... 7

3.2 Document Conventions...... 7

4 TOUR OF STYLE REPORT ...... 8

4.1 Introduction ...... 8

4.2 Installation Overview ...... 8 4.2.1 Configuration...... 10 4.2.2 Designer Interface...... 10

4.3 Data Source and Query Design ...... 11 4.3.1 Defining a Data Source...... 12 4.3.2 Defining a Query ...... 14

4.4 Report Layout...... 17 4.4.1 Choosing a Report Type ...... 17 4.4.2 Sample Report ...... 18 4.4.3 Creating the Layout...... 19

4.5 Report Elements...... 21 4.5.1 Adding Text and Presentation Elements...... 22 4.5.2 Adding Data Elements ...... 26

4.6 Data Binding ...... 28 4.6.1 Data Formatting and Presentation ...... 32

4.7 Previewing and Distributing the Report...... 37

4.8 Deploying the Report from the Report Designer ...... 38

4.9 Viewing and Modifying Deployed Reports ...... 40 4.9.1 Viewing the Report...... 40 4.9.2 Report Parameters and Hyperlinks (Drilldown)...... 41

5 CONCLUSION...... 45

3 of 46 GETTING STARTED GUIDE

1 Documentation Roadmap

For complete coverage of the professional tools and features in InetSoft software, please refer to the following documents:

I REFERENCE MANUALS Administration Reference This document describes the web based administration interface for InetSoft business intelligence server environment. Server environment controls functional module access, user security, report deployment and performance tuning.

II PROFESSIONAL GUIDES AND TUTORIALS Data Modeler Guide Data Modeler is the professional desktop tool to build the meta- data layer that forms the data access foundation for all InetSoft business intelligence front end tools. Data objects designed can be used directly by InetSoft front-ends or serve as atomic building blocks for InetSoft Data BlockTM technology.

Data Worksheet Guide Data Worksheet is InetSoft’s user interface for the dynamic Data BlockTM technology. This technology allows IT professionals and power users to assemble data objects in Lego like fashion in real time. Data objects from Data Modeler becomes much more flexible through this technology. Data Worksheet is available as a desktop application and a web application.

Viewsheet Guide Viewsheet is a zero client web user interface built upon InetSoft’s Data BlockTM technology. This is a business intelligence tool for mainstream executives and business users. Familiar visual objects are utilized for presentation and interaction to ensure maximum ease of use in data exploration and analysis.

User Guide The User Guide discusses the InetSoft Portal, the usage of various components in the InetSoft Portal and provides a good overview of user capabilities.

Report Designer Guide Report Designer is a desktop application designed for professionals to develop production reports and dashboard elements. Typically, professionals must use this application, due to the complexity of business logic in reports, and the high demand for information compactness and formatting.

4 of 46 GETTING STARTED GUIDE

Scripting Guide This document provides thorough coverage of the scripting environment in the Report Designer. Scripting can be used as simple formulas or as a full ECMAScript/JavaScript environment.

Programming Guide This document contains detailed descriptions of InetSoft’s Java API and programming environment. Java Web applications and Java desktop applications can use InetSoft software independent of InetSoft business intelligence servers.

Integration Guide This document describes integration techniques and integration points built into InetSoft products. Integrating InetSoft products on user interfaces, server deployment, security and many others is covered.

III API DOCUMENTATION API Reference Documents This is the most authoritative definition document for the classes and methods in InetSoft products. The API reference documents are in JavaDoc format.

5 of 46 GETTING STARTED GUIDE

2 Optional Components

InetSoft business intelligence software is packaged for different applications with various components. The following table identifies the available components for different packages.

Component Style Report Insight Scope InetSuite Data Modeler Yes Yes Yes Asset Composer Desktop Yes Yes Report Designer Yes No Yes Server Administration Enterprise Edition Yes Yes Integration Some aspects EE only Some aspects Yes OLAP, Scorecard No No Yes

6 of 46 GETTING STARTED GUIDE

3 About this Document

3.1 Prerequisites Before working through this document please ensure that InetSoft business intelligence software is correctly installed.

3.2 Document Conventions • Throughout the document key words and key concepts are in italics, while key points are isolated in a bullet list.

• An important concept or assumption is usually shown using a fixed width font as follows:

The alignments of consecutive elements affect the element placed on a new line. When the alignment changes from one element... Tip: After entering a • Tips and less important information are presented in a sidebar. new tab stop, pressing the ‘Enter’ key adds • the value to the list. Procedure descriptions are illustrated using screenshots or source code This has the same listings with explanation of each step in a numbered list. For example: effect as clicking the ‘Set’ button but is 1. To create a new template, click ‘Blank Tabular Report’ and then ‘OK’. faster to enter.

• Source code and operating systems commands are expressed using a fixed width font and indented as follows:

java inetsoft.report.design.Designer • Longer source code examples are usually identified using a listing heading and are printed in a fixed width font as follows:

Listing 1. Report Template

7 of 46 GETTING STARTED GUIDE

4 Tour of Style Report

As the name implies, this document’s primary aim is to be a quick start guide for report designers. It provides a brief tour of basic Style Report features and functionality and will demonstrate basic report creation. This guide also touches upon server side reporting features such as the Enterprise Manager (a remote administration tool for the server side reporting environment) and the User Portal (a ready-made, customizable portal for web based report viewing). This document also demonstrates some useful end user features (report linking and drill down). If you are an end user, we recommend using the User Guide to get started.

4.1 Introduction Style Report is a general purpose reporting tool with a high level of programmability. Data can be extracted from diverse sources, manipulated, and presented in a specific layout and format. Reports can be created programmatically, using the InetSoft API, or with the Report Designer, using report templates. The Report Designer offers the same functionality as the API, but makes most tasks, such as report layout, much simpler. It can also be used to attach scripts in order to embed business logic into a report. Therefore, it is recommended that developers primarily use the Designer for report creation, and utilize the API only if the Designer fails to provide the desired functionality.

The Report Designer provides an easy-to-use visual design environment for report layout and data binding. Reports can be generated directly from templates created with the Designer or from a Java program, which will usually load a report template. With Style Report, templates can be used to generate server-side reports with no additional programming.

In this chapter we cover an introduction to Style Report. In later chapters we will cover the tasks required to utilize Style Report; how to use the design tool to connect to our data source and create queries, and how to create and deploy a simple report.

4.2 Installation Overview Your Style Report installation is comprised of two modules, the Developer module and the Server module.

8 of 45 GETTING STARTED GUIDE

Installation Root

Developer Module Server Module

-bin (design.exe) -Tomcat/webapps/sree/ -lib (design_pro.jar, WEB-INF sree_pro.jar/ -lib sree_pro.jar/ bisuite_pro.jar, bisuite_pro.jar etools_pro.jar) etools_pro.jar -classes -doc (documentation PDFs) datasource.xml query.xml repository.xml stylereport.srl asset.dat

The Developer module contains the bin folder {Installation Root}/bin (which contains your executable files; i.e. designer.exe), a set of JAR files in the lib folder {Installation Root}/lib, and the documentation PDFs in the doc folder {Installation Root}/doc.

The Server module also contains a set of JAR files, in a different lib folder, {Installation Root}/Tomcat/webapps/sree/WEB-INF/lib, as well as your data source connection information, query definitions, logical report listing with physical mapping, all your reusable library components, and your server configuration and settings in the classes folder {Installation Root}/Tomcat/ webapps/sree/WEB-INF/classes.

In Windows, it is possible to start the Designer from the Start Menu by going to the Style Report menu and selecting ‘Report Designer’.

9 of 45 GETTING STARTED GUIDE

4.2.1 Configuration The registry files The first time that the Designer is started after your first installation, a dialog include the data source registry, the query reg- will open asking you to specify the location of the registry files. After the initial istry, and the Style setup, you can change the location of the registry files by going to ‘File → Report library files. Configure...’. (Make sure the ‘Local Repository’ radio button is selected, on the The datasource.xml and query.xml registry Registry tab of the ‘Designer Configuration’ dialog.) files store the defined data sources and que- ries. The Style Report library file stores a vari- ety of constructs such as table styles and report beans.

4.2.2 Designer Interface The Report Designer has a menu and a horizontal toolbar, both of which can be used to perform for various reporting and text-editing functions. A toolbar on the left side contains buttons which add various elements to the report.

10 of 45 GETTING STARTED GUIDE

The ‘Preferences’ dialog (‘Tools → Preference...’ from the top menu) contains global report settings such as default font, element properties, and previewing options.

4.3 Data Source and Query Design The Designer has a built-in module for specifying data sources and designing queries, called the Data Modeler. Traditional query builders only support relational databases, but the Data Modeler supports multiple data source types, including XML, JDBC, CORBA, EJB, text, and SOAP.

Queries are stored independent of all reports in a separate XML file. For our example report, we will use a JDBC data source.

11 of 45 GETTING STARTED GUIDE

4.3.1 Defining a Data Source The classpath is a list of Prior to building any queries, we must define the data source, from which the the folders and JAR files that the JVM uses data will be retrieved. Each data source requires a JDBC driver (provided by to locate Java pro- the database vendor). The driver, included in one or more JAR files, must be grams. added to the classpath of the Report Designer.

The following example illustrates the steps to define a JDBC data source using the ODBC driver. The procedure to connect to other types of databases (i.e. MS Sql Server, DB2, and MySql) is similar to the steps that follow:

Note that the data source utilized in this example is pre-defined in the default installation. Example 1. In the Report Designer, open the Data Modeler by selecting the ‘Data Modeler’ button in the top toolbar.

2. Select the ‘New Data Source Wizard’ button in the top toolbar of the Data Modeler.

3. Enter “Orders” as the name and select ‘jdbc’ from the drop-down list of the ‘New Data Source’ pop-up dialog. Click ‘OK’.

12 of 45 GETTING STARTED GUIDE

4. Select ‘ODBC’ from the drop-down list for the ‘JDBC Type’. The correct driver, ‘sun.jdbc.odbc.JdbcOdbcDriver’, should appear. Click ‘Next>>’ to continue.

5. Each ‘JDBC Driver’ has a unique connection ‘JDBC URL’ which can be obtained from the database vendor. For the ODBC datasource in this example, the ‘JDBC URL’ should be jdbc:odbc:Orders. Leave the ‘User’ and the ‘Password’ textboxes empty, and click on ‘Finish’.

6. In the ‘Data Source’ pane, make sure to deselect the ‘Requires Login’ option, otherwise you will be prompted for a username and password. To ensure that there is no problem using the JDBC driver, click the ‘Test Data Source’ button in the top toolbar of the Data Modeler.

13 of 45 GETTING STARTED GUIDE

Be aware that the query builder will save the settings, whether it locates the JDBC driver or not.

A pop-up message will inform you if the connection was successful or not.

4.3.2 Defining a Query Once a data source is defined, we can proceed to build queries. For the following example we will be utilizing the pre-defined ‘Orders’ database. We will create a new query that will show the sales data for a few particular products.

With InetSoft software, it is possible to create logical abstractions of database schemas called Data Models (similar to Entity Relation Models). Data Models are used to implement powerful end user features like Ad Hoc Report creation and data level security. For more information, please refer to the Data Modeler Guide. Example 1. In the Designer, open the Data Modeler.

2. Select the ‘New Query’ button or right-click on the ‘Orders’ data source and select ‘New Query’.

3. Enter “product sales” for the query name and choose ‘Orders’ from the drop-down list for the data source. Click ‘OK’.

14 of 45 GETTING STARTED GUIDE

4. Drag the ‘categories’, ‘products’, ‘order_details’, and ‘orders’ tables to the right. Alternatively, you can use the arrow buttons.

5. Go to the Fields tab. Drag ‘categories.category_name’, ‘products. product_name’, and ‘orders.order_date’ to the right, or use the arrows.

6. Select ‘Add Expression’ and enter the formula: “(1-orders.discount)* products.price*order_details.quantity”. Click ‘OK’.

15 of 45 GETTING STARTED GUIDE

7. To enter a field alias for each field, select it from the report field list. Then enter the following names respectively under the Field Alias: “Category”, “Product”, “Order Date”, and “Sale Total”. In addition, select the column type of ‘Sale Total’ to be ‘double’.

8. Click on ‘Finish’.

16 of 45 GETTING STARTED GUIDE

4.4 Report Layout Before creating a new report, it is necessary to choose one of the two layout types, flow layout or tabular layout. If the new report is going to be one of a series of similar reports with many common features, it is more efficient to first create a meta-template, which can then be used to create the new report. Otherwise, a report can be created as a stand-alone report from a blank template file. An example of this will be shown later with the drill down report.

4.4.1 Choosing a Report Type Traditional reporting The flow layout is similar to that used in a word processor, so that report tools use bands to for- mat all the data in a elements are placed in order from left to right, top to bottom. A flow report report. Style Report can also use a page layout containing a series of specified areas where elements allows for much more are placed. The elements flow from one page area to the next, as space flexible layout than banded reports. permits, according to a specified order (like the columns in a newspaper). When all the areas on one page are filled, the flow continues on to the next page.

The tabular layout is best utilized for a report that has rectangular partitions on the output and each partition/region has its own set of elements. The report page is divided into grid cells. Unlike page areas, elements are placed directly into a specific cell, and each cell has an independent flow of elements. The cells expand lengthwise to fit the contents, so a single cell can span multiple pages.

17 of 45 GETTING STARTED GUIDE

4.4.2 Sample Report Style Report comes We will now create a sample sales report from scratch starting with a ‘Blank with a few predefined meta-templates: Mail- Tabular Report’. We will follow the recommended report creation steps: page ing Label, Simple setup, setting the layout, adding report elements, binding data to the elements, Report, and Standard and adding styles and formatting. Report. For basic reporting needs, these meta-templates may Note: Since many reports have a similar layout and common report provide a good starting elements, creating a meta-template for a group of reports can save point. time and make updating reports easier. A meta-template is like a regular report in that it uses one of the two report layouts and contains elements. However, a meta-template would not be used as a stand-alone report. Instead, the meta-template contains a basic layout and set of report elements that will be used as the basis for a report template. Example 1. Click on the ‘New Report’ button.

2. Go to the Create From Wizard tab.

3. Select ‘Blank Tabular Report’ and click ‘OK’.

Report beans are simi- lar to meta-templates in that they can be used in multiple reports. However, beans encapsulate a small group of local- ized elements rather than an overall report layout with dispersed elements.

4. Once the blank report sheet opens in the designer, go to ‘File → Page Setup...’ to open the ‘Page Properties’ dialog. On the Page Layout tab choose ‘Landscape’ from the ‘Orientation’ options.

18 of 45 GETTING STARTED GUIDE

4.4.3 Creating the Layout The Designer can operate in either the design view or the layout view. In the design view, elements can be added and manipulated, but the layout is fixed. The layout can be edited in the layout view, although most other report functions are disabled. Additionally, in the layout view the element buttons in the left toolbar are replaced with shape buttons, used to add different shapes.

Since our sample report uses the tabular layout, we will add grid cells to divide the report into distinct regions. The initial layout consists of a single grid cell. Cells can be divided into multiple rows or columns, or new rows and columns can be added next to existing ones to create a layout. It is also possible to merge cells and delete rows or columns. The same layout can be created in different ways, so the steps below are not definitive. Example 1. Select the ‘Layout View’ button to switch into layout view.

2. Right-click on the top cell, and select ‘Split Cell...’.

19 of 45 GETTING STARTED GUIDE

3. Choose two ‘Columns’ and select ‘OK’.

4. Right-click again and select ‘Insert Rows/Columns...’. This dialog will permit you to designate where to insert the new row(s)/column(s). Select the ‘Rows’ and ‘After the Selection’ radio options, then click ‘OK’.

5. Now, select the left-hand cell of the row you just inserted. While holding the left mouse button down, move the mouse across to the right-hand cell of the row, selecting it as well.

6. Right-click and select ‘Merge Cells’ from the menu that appears.

20 of 45 GETTING STARTED GUIDE

The row and column 7. Select the row again, right-click and select ‘Insert Row’. You may size can also be changed by right-click- resize the bottom row by passing the cursor over the line until you see ing and selecting a double pointed arrow, then holding the left mouse button down ‘Properties...’. In addi- while dragging the line to the desired height for the row. (Columns tion, other cell proper- ties such as cell borders can be resized in similar fashion.) We set our row to approximately and background are double the size of the other row. editable in the Proper- ties dialog.

4.5 Report Elements Report elements contain the visual presentation aspects of the report. Text elements are used to add text to a report and spacing elements are used to add white spaces. Chart, table, and section elements are used for data. These elements are initially empty until queries are associated with them. In this way, a template can be used for multiple reports with similar formats but different data.

21 of 45 GETTING STARTED GUIDE

There are four pre- Elements can be placed in the report body and in multiple header and footer existing header and footer types: default, types. They can be added through the Insert menu or through the toolbar on first page, even page, the left hand side of the designer. and odd page. 4.5.1 Adding Text and Presentation Elements For our report we want to add a report title, as well as page numbering and a date stamp. Example 1. Switch back to Design View by toggling the ‘Layout View’ button.

2. Click on the ‘Header’ button in the top toolbar. The element insertion point indicator, in the shape of a triangle, should appear at the top left edge of the header.

3. Select the ‘Text’ button. An editable gray box should appear in the header. Type “Product Sales Report” and click to the side of the box to finish.

4. Select the new Text element by clicking on it. Using the controls on the toolbar, change the font to Tahoma 24 point ‘Bold’, and ‘Underline’ it. Then select the ‘Center’ alignment button.

22 of 45 GETTING STARTED GUIDE

5. Click on the ‘Footer’ button in the top toolbar. The element insertion point indicator will appear at the top left edge of the footer.

Page numbers, page totals and date/time stamps are generated by the report engine during the report generation. They are dynamic and cannot be hardcoded into the template. Inserting a runtime element into the header or footer requires the use of tags. The following steps will demonstrate the use of tags to display both page numbering and a date in the footer.

6. Select the ‘Text’ button, and type “{P} of {N}” in the box. Then click to the right side of the box to finish.

Other auto-replace header and footer tags are {P} for page num- ber, {N} for page total, and {T} for time. 7. Next, we want to include the date to the right of the footer. Select the ‘Text’ button, and type “{D}” in the box. This will appear as the current date when the report is generated. (Add “{D, MM-dd-yy}” or any valid format string to format the date.) Click outside the box to finish.

23 of 45 GETTING STARTED GUIDE

8. The element insertion point should now be between the page numbering and the date, and the date should be selected. To place the date on the right side of the footer click the ‘Right’ alignment button in the top toolbar.

Click anywhere outside of the footer to deselect it. Now, the header and footer are complete.

9. Click inside the upper left-hand grid cell to begin adding elements in that cell. Insert a Text element with the text “Sales By State”. With the cursor placed just after the Text element, hit the ‘Enter’ key once to create a newline character. Follow the same procedure for the upper right-hand cell and the bottom row/cell, using the text “Employee Sales” and “Order Details”.

24 of 45 GETTING STARTED GUIDE

10. Select all three Text elements from the last step by holding down the control key while clicking on each element with the mouse. Using the toolbar, change the font to Tahoma 14 point ‘Bold’, and ‘Center’ the elements.

11. Select the top row, so that the element insertion point is in the top left corner of the row. Add a Separator element to the row by selecting the ‘Separator’ button. You can edit the look of the Separator in the ‘Separator Properties’ dialog. Open the dialog by right-clicking and selecting ‘Properties’. For our example, we used a double line separator.

25 of 45 GETTING STARTED GUIDE

4.5.2 Adding Data Elements In this report, we will use Chart and Table elements. A Table element automatically creates rows and columns according to the data. The user has a lot of control over the presentation of the table but little control over the positioning of the data within it. Charts are one of the most common elements in reports. Because they are visual, the type and format of the chart is very important to the report. There are over 30 built-in chart types covering a wide range of styles, including bar, pie, line, Pareto, and Gantt to name a few. Example 1. Click inside the upper left-hand cell to select it. Insert a Table element in the upper left-hand cell by selecting the Table button in the left toolbar. Drag the mouse to select any number of cells. The actual number is not important since the table will resize automatically to fit the query that will be bound to it.

26 of 45 GETTING STARTED GUIDE

2. Now click in the upper right-hand cell to select it. Select the ‘Chart’ button on the left toolbar to add a Chart element. Choose ‘3D Pie’ from the drop-down list.

3. Insert another Table element into the editable region in the bottom row/cell by selecting the row so that the position of the element insertion point is on the left edge, below the title ‘Order Details’. Then, select the ‘Table’ button and any number of cells.

27 of 45 GETTING STARTED GUIDE

4.6 Data Binding Every element in a Data binding is the process of associating a query or other data with a report report has a unique Element ID. You can element. When the report is generated, the data retrieved by the query will be modify the Element placed into the element. It is possible to modify the query to some extent ID from the ‘Proper- during data binding by hiding certain fields, adding conditions, grouping, and ties’ dialog of the ele- ment. The ‘Properties’ so forth. The same query can be bound to multiple elements on the same dialog is accessed by report or across multiple reports, or each element could use a different query. right-clicking > ‘Prop- erties’. For this example, we are going to bind data to the data elements inside the report template, using the data binding tool. Data binding can also be done dynamically at the time of report creation through JavaScript or Java code. Example 1. Click on the Table element in the top left cell to select it. The status bar on the bottom of the designer will display the element id (‘Table1’).

2. Click the ‘Data Binding’ button to open the ‘Data Binding’ dialog.

28 of 45 GETTING STARTED GUIDE

3. Expand the ‘Orders’ data source and select the ‘sales by state’ query. Click ‘Finish’ to create the binding.

4. Select the Chart element in the top right cell. You can make the element larger by dragging the bottom border of the element with the mouse. Then select Edit → Undo (Report Designer features unlimited undo and redo capabilities). Now click on the ‘Data Binding’ button to open the ‘Data Binding’ dialog. Expand the ‘Orders’ data source and select the ‘Sales by Employee’ query, then click on the Chart Data tab.

5. From the ‘Available Columns’ pane on the left side, select ‘Last Name’ and drag-and-drop it into the ‘label -> name(x axis)’ pane on the right

29 of 45 GETTING STARTED GUIDE

side. Then select ‘Total Sales’ on the left and drag-and-drop it in the ‘data -> value(y axis)’ pane on the right side. Click ‘Finish’.

6. Now, click on the bottom table to select it, and then click on the ‘Data Binding’ button to open the ‘Data Binding’ dialog. Expand the ‘Orders’ data source and select the ‘Order Details’ query, then click on ‘Next>>’ three times to open the Grouping and Summary tab.

30 of 45 GETTING STARTED GUIDE

7. In the Grouping and Summary tab select ‘Company’ and ‘Product’ from the ‘Available Columns’ tree, and use the right arrow to place them in the ‘Grouping’ pane. Now select ‘Total’ from the tree and place it in the ‘Summary’ pane with the right arrow. Click ‘Finish’.

8. Note that the tables and the pie chart only display meta-data in the Design view.

31 of 45 GETTING STARTED GUIDE

Click the ‘Preview’ button in the top toolbar to preview the report.

4.6.1 Data Formatting and Presentation Although the report now shows the data clearly, the formatting and presentation can still be improved. Specifically, all the prices and sales totals are currently displayed as numbers instead of currency. The tables can be enhanced with a table style and highlighting for the top performers. These are just a few examples of the improvements that can be made in the presentation. Many of these types of changes are made through the ‘Properties’ dialog, which displays many of the element properties for editing. To

32 of 45 GETTING STARTED GUIDE

open the dialog, select the element, then right-click and select ‘Properties...’ from the pop-up menu. Example 1. Click on the Table element in the top left cell to select it, then right- click and select ‘Format’. This will open the Format tab in the bot- tom of the Designer. With the sales detail cell selected in the table, select the ‘Currency’ radio button. Click ‘Apply’

2. Now open the properties dialog for the same Table element by right- clicking on the Table and selecting ‘Properties’.

33 of 45 GETTING STARTED GUIDE

A Table style defines a 3. On the Table tab of the ‘Table Properties’ dialog, click the ‘Select set of pre-defined for- mats that can be Style’ button to open the ‘Style Viewer’ dialog. In the ‘Style’ tree, directly applied to one expand the ‘Grid’ node, select ‘Grid5’, click ‘Confirm’, and ‘OK’. or more Tables.

A custom table style can be created by selecting the ‘New’ button instead of choosing a style from the list. Certain aspects of pre-existing styles may be eliminated by deselecting the corre- sponding check boxes.

You can see the changes in the report template.

4. Click on the Table element in the bottom cell to select it, then right- click and select ‘Format’. This will open the Format tab in the bottom of the Designer. Select the ‘Price’ detail cell in the table, and then select the ‘Currency’ radio button. Do the same for the ‘Total’ detail cells in the table. Click ‘Apply’

5. Now, select the detail cell for the ‘Discount’ column, and select the ‘Percent’ radio button in the Format tab. Click ‘Apply’

34 of 45 GETTING STARTED GUIDE

6. Right-click on the bottom Table element, select ‘Properties’, then click ‘Select Style’ in the ‘Table Properties’ dialog. In the ‘Style’ tree, expand ‘Grid’ and select ‘Grid8’. Click ‘Confirm’ and ‘OK’.

7. We want to identify which products are our top sellers and highlight them in the report. Select the cell just above ‘Total’ in the bottom Table element. This cell contains the name of the product in the report. Click on the Highlight tab in the ‘Formatting’ pane.

8. Select the ‘New’ button and type “top performers” as the ‘Highlight Name’. Click ‘OK’.

35 of 45 GETTING STARTED GUIDE

9. The named highlight is now listed in the ‘Highlights’ pane. Check the box next to ‘Background’ and select yellow from the color selector.

10. Click on the ‘Edit Condition’ button to create a condition. Select ‘Total’ from the drop-down column list.

11. Create the condition ‘Total’ ‘is’ ‘greater than’ ‘400000’ and click on the ‘Append’ button. The condition will be added to the list of clauses. Click ‘OK’.

12. We can now see the specifications for the new highlight.

Note: It is possible to assign more than one highlight for the same text.

Go to ‘File’ → ‘Save As...’ to save your report with the name “Quick Start Report”. ‘Preview’ the report.

36 of 45 GETTING STARTED GUIDE

4.7 Previewing and Distributing the Report Once the report design is complete, we can view the finished product directly in the Designer. First, there is a ‘Preview’ view (accessed with the ‘Preview’ button), which will often be used during the report design phase to check the layout. In Style Report EE, the preview may be set to show server features such as hyperlinks by selecting ‘Tools → Preferences...’ from the top menu, going to the Misc tab, and checking the box labeled ‘Preview server features’.

37 of 45 GETTING STARTED GUIDE

In either case, the ‘Preview’ will execute data binding and scripts. It is also possible to export the report to a distributable format such as PDF. Example 1. Select the ‘Preview’ button. Keep the preview window open to export to PDF. Select ‘File → Export → PDF...’ from the menu. A save dia- log will open.

4.8 Deploying the Report from the Report Designer With Style Report, reports can be deployed to the internet easily using the live deploy option in the Report Designer. This option lets you register the template directly as a report in the ‘Report Repository’ without any additional programming. Once a report is registered, it can be viewed in the User Portal,

38 of 45 GETTING STARTED GUIDE

a servlet implementation of the report repository which comes pre-deployed with the Style Report installation. This option must first be enabled in the Enterprise Manager.

Example 1. I Microsoft Windows environments, click ‘Start → All Programs → {InetSoft product name}→ Enterprise Manager’. In Unix environ- ments, run the binary file em.bin, which is located in the bin directory for the Style Report installation. A browser window should open with the login screen for the Enterprise Manager (http://localhost:8080/ sree/EnterpriseManager).

2. Log in with default username “admin” and password “admin”.

3. Select ‘Deployment’ from the navigation tree on the left, and select the checkbox next to ‘Enable live report deployment’.

39 of 45 GETTING STARTED GUIDE

4. Click ‘Apply’, and you should see a message showing it was successful.

5. Return to the Designer and click the ‘Deploy’ button.

6. Enter “http://localhost:8080/sree/Examples” for the server URL, “admin” for both the administrator name and password, and “Quick Start Report” for the report name. Click ‘Deploy’. You will get a confirmation message if your deployment is successful.

4.9 Viewing and Modifying Deployed Reports The report repository servlet will display the reports in any web browser.

4.9.1 Viewing the Report There is no additional work needed to run a report. Once the report repository (Style Report server) is properly setup, it can be accessed using any web browser. Reports can be accessed directly using a URL or through the report repository tree. Example 1. Open a new browser window and enter the URL “http://local- host:8080/sree/Examples”. In Microsoft Windows environments,

40 of 45 GETTING STARTED GUIDE

click ‘Start → All Programs → {InetSoft product name}→ Exam- ples’.

The web portal is fully 2. The browser will display the User Portal inside the InetSoft web customizable within the Enterprise Man- portal. Expand the ‘Repository’ tree in the left-hand pane, then click ager. Go to ‘Presenta- ‘Quick Start Report’. tion’ → ‘Portal’ to edit existing themes or to create new ones.

4.9.2 Report Parameters and Hyperlinks (Drilldown) For a detailed descrip- Reports in Style Report have the ability to accept parameters. These tion of all the user interactive features that parameters can be input by the user (from a parameter dialog) or be passed by can be embedded in another report through hyperlinks. This functionality is very useful for reports, refer to the implementing report drill downs, wherein we link one report to another and Report Designer Guide. the second report displays the same data as the first but at a more granular level. For example, in the ‘Quick Start Report’ we just created, the table displays sales totals by state. We could add a hyperlink to this table such that, when the user clicks on a state, another report showing detailed sales information for that particular state would be displayed.

To demonstrate report parameters and drill downs, we will modify the sales report we just created and deployed by linking its table to another report called ‘DrilldownDocExample’, which will accept a parameter called ‘state’. When the user clicks on a state in the ‘Sales By State’ table, we will display the ‘DrilldownDocExample’ report and pass to it a parameter with a value equal to the state selected. Example 1. In the Report Designer, right-click on the ‘State’ detail cell of the ‘Sales By State’ table. Select ‘Hyperlink’ from the drop-down window, opening the Hyperlink tab in the ‘Formatting’ pane.

41 of 45 GETTING STARTED GUIDE

2. Select the report ‘DrilldownDocExample’ from the drop-down list for the ‘Link’, and select the ‘Report Link’ radio option.

3. Select ‘State’ from the ‘Value’ list and click on the left arrow to add it to the ‘Parameters’ list. The ‘Input’ dialog will open. Enter the name “state” into the textbox, click ‘OK’, then ‘Apply’.

42 of 45 GETTING STARTED GUIDE

4. Save and redeploy this report using the ‘Deploy’ button described in chapter 4.8, Deploying the Report from the Report Designer.

5. You can test the hyperlink (drill down) in the ‘Preview’ mode of the Report Designer. Click on a state in the ‘Sales By State’ table and the linked report with only the specified state data will display. Click on ‘CT’.

It is possible to create a custom parameter prompt in the Designer using the parameter sheet report component. See the Report Designer Guide for more details.

6. Next, we will test our new drill down (hyperlink), when we view the report in the User Portal. In the Portal, unlike the Designer, each state will display the trademark underlining that signifies a hyperlink. To open the Portal, follow the directions in chapter 4.9.1, Viewing the Report.

43 of 45 GETTING STARTED GUIDE

7. We will test the drill down (hyperlink) by clicking on ‘NV’.

44 of 45 GETTING STARTED GUIDE

5 Conclusion

The Report Designer provides a visual design environment for report layout and data binding. Templates can be used directly to generate a complete report. They can also be loaded into a Java program so that data binding can occur. We demonstrated this with an example using a purely template-based report.

In this guide we have also discussed introductory concepts regarding the Style Report server-side environment for creating web-based reports. We have described the steps required to deploy the Enterprise Manager servlet and the repository servlet in a web application server using Tomcat. We have also described how to create a simple server side report (Replet) and deploy this report into the Repository using the Enterprise Manager. More advanced features are described in the Report Designer Guide.

45 of 45 End of Document

If you have any suggestions on how we may improve our product, or any comments regarding the existing features, please send them to [email protected]. You can visit our web site at www.inetsoft.com for technical support, software updates, and new releases. Thank you for your interest in this product.

Style ReportTM, Insight ScopeTM,, and InetSuiteTM are owned and licensed exclusively by InetSoft Technology Corp Copyright © 1996-2007. InetSoft Technology Corp. All rights reserved.

All other products, names, or brands are the trademarks of their respective holders.

46 of 46