Welcome to the JReport Tutorial

Size: px
Start display at page:

Download "Welcome to the JReport Tutorial"

Transcription

1 Welcome to the JReport Tutorial Thank you for your interest in JReport, the leading Embedded Reporting Solution for Java Applications. With JReport, intuitive and sophisticated reporting can be customized and integrated as a natural extension of any application. This guide is intended to provide an overview of the JReport solution, embedded reporting concepts, and detailed step-by-step lessons on using JReport. To allow for lessons to be completed in a reasonable time frame, not all of the features of JReport are covered. Lessons are grouped into the following tracks: Track 1: JReport Overview and Setup Track 2: Creating New Reports Track 3: Creating Business Cubes and Report Cubes Track 4: Creating Business Views and Web Reports Track 5: Creating Library Components Track 6: Publishing, Running and Administering Resources Track 7: Integrating Reports with JSP Track 8: Creating and Analyzing Ad Hoc Reports Track 9: Creating Dashboards You can read through the tracks in sequential order, or after reading Track 1, skip to a particular track that interests you. Unix platform This version of the JReport Tutorial is developed and written for Windows. File names and paths, sample JSP code, and screen shots in this guide are based on the Windows XP operating system. However, you can get a Unix version of the JReport Tutorial by changing the paths to the Unix format. How to contact us If you encounter any technical issues that prevent completion of the tasks outlined in this guide, please do one of the following: Contact our technical support department via at available 24 hours a day, seven days a week. This service is available free of charge to registered evaluators for up to 30 days after you receive the JReport Evaluation package. Search the JReport Knowledge Base in the Customer Care Portal at

2 for issue resolution. You will need to create a user account as described on the main page of the Customer Care Portal. Other JReport documentation This guide is one in the complete JReport documentation set. The documentation set includes the following: Getting Started with JReport JReport Tutorial JReport Server User's Guide JReport Designer User's Guide JReport Server Monitor User's Guide JReport Desktop Viewer User's Guide JReport API Javadoc Click the right arrow ( ) below to begin reading the first track.

3 Track 1: JReport Overview and Setup This track provides an overview of JReport. This track contains the following sections: Who uses JReport? What is a report? Lifecycle of a report JReport product overview JReport sample reports Setting up JReport on your system The tutorial scenario Click the right arrow ( ) below to begin reading the track.

4 Who uses JReport? JReport delivers an enterprise-wide solution. Therefore different types of users throughout your organization will use JReport. Each type of user will be able to understand the features and find value in JReport as it relates to their job function or reporting requirements. There are five general types of JReport users. Each type of user can focus on specific areas of this tutorial as described below: Report Developer If you are a report developer, you will use JReport Designer, JReport's visual design environment. This intuitive desktop design tool uses familiar conventions such as property panels, toolbars, style sheets, and drag and drop placement to support every aspect of the report design process. You will quickly become proficient in using the design environment and be able to create professional reports. Focus on Track 2, Track 3, Track 4 and Track 5. Application Developer If you are a Java application developer, you should understand that both JReport Designer and JReport Server are 100% Java-based tools that run on almost any platform. By offering a robust set of Java APIs, JReport can be seamlessly embedded as a natural extension of your application. In addition to being directly accessed from any Java program via APIs, all reports and functionality can be accessed through HTTP. Focus on Track 2 and then Track 7. Systems Analyst or Application Server Administrator If you are a systems analyst or application server administrator, you should know that the JReport solution is managed from a single access point, a web-based console. The JReport solution offers many different deployment options, enabling existing architecture to be leveraged. It can be embedded in a web application via a self-contained WAR/EAR file to provide a reporting service or it can operate as a standalone server. Focus on Track 6. End User If you are an end user of reports, you should understand the many different presentation strategies that are available. You can decide which format best delivers the information that you need to make timely and critical business decisions. With JReport, reports can be viewed and exported to a variety of formats including HTML, DHTML, PDF, Excel, XML, RTF, CSV, and PostScript. JReport's DHTML output enables you to interact with and customize report views to obtain exactly the information needed. See JReport sample reports in Track 1. Business Analyst If you are a business analyst, you should understand how JReport Web allows you to create a special category of reports called ad hoc reports. Unlike the predefined reports in JReport, you build these reports in the runtime environment based on a data model built and published by a report developer.

5 Focus on Track 8. You can also create a user portal user interface rather than a web report or page report, using predefined data components. Focus on Track 9.

6 What is a report? A report is comprised of a report layout and a dataset. JReport Designer is used to create report templates that JReport Server combines with the data retrieved from the data source to render report results at runtime. Reports can be classified into three categories: Predefined - Report results that cannot be modified by the end user. The layout and data to be included can only be defined at report design time. The dataset used to populate the report can change each time the report is run. Dynamic - Report results that can be modified by the end user. The layout and data to be included is defined at report design time but can also be modified at runtime. Dynamic reports can be modified using parameters, DHTML functionality, or web controls. Ad Hoc - Reports are built and can be modified at runtime by the end user via the JReport Web technology. Other than building the business/report cubes and business views to be used as the data source for ad hoc reports, no design work is required. Ad hoc reports can be built from scratch using a wizard or drag & drop. Report template A report template contains static text and graphics as well as placeholders for data. When a report is in the runtime environment, it connects to the data source associated with the report, executes the query, and applies the fetched data to the template thereby creating a report result file: Therefore, each report result represents a unique data set; the one that exists at the time the query is run. Data sources and datasets Reports pull data from data sources via queries, and then expose the query results to the report designer. JReport supports the following types of data sources: Relational databases through JDBC connections Data warehouses Java objects XML data Metadata layers User-defined data sources Hierarchical data sources A dataset is the data that the JReport Server returns at runtime from a JReport query. A JReport query is comprised of one of the following: Imported SQL query file JReport defined query

7 Stored Procedure call User-defined data source query Hierarchical data source query Multiple data source connections can be used to generate multiple datasets. A report can use one or more datasets. Datasets can be used at design time, or at runtime for ad hoc report creation.

8 Lifecycle of a report Just like an application, a report has a distinct life cycle. The life cycle contains the following phases: Phase 1: Determine requirements (report developer) The first fundamental requirement comes from the intended end users of the report. First, determine who will be the end user of the report and then identify the general purpose of the report. Ask what decisions those users need to make and how often they need to make them (daily, monthly, or other). Second, you should determine the specific pieces of data that need to be presented in the report and how the pieces map to the data source. Look for common data elements that span multiple reports these are candidates for subreports. Third, you need to determine the security implications associated with the report. Are there pieces of data that need restricted access? Are there regulatory drivers of the report? Fourth, determine the expected demand of the report result. Will on-demand report results be necessary or can the report be scheduled? Will report results need to be saved, and for how long? Fifth, determine the desired report output format. For most Java applications delivery via the Web is the preferred method to present information. However, there may be other end users who don't need or want Web-based information. Perhaps they require the report be delivered in a standard business format or printed. Phase 2: Develop report template (report developer) A template can be thought of as a report blueprint that contains static text and graphical objects as well as placeholders to display the data pieces needed on the report. The template definition includes the query that needs to execute to provide the data, as well as the database connection on which to execute it. Share a report prototype that includes sample data with the end users to see if it meets their requirements and also to obtain feedback on the scope and layout of the report. Phase 3: Publish report results (system administrator) Publishing a report template executes the query and merges the resulting data set with the template. The result is a report instance that is available in the context of JReport Server. Report results can be saved to other locations, and in various formats such as HTML, PDF, RTF, and others. Communicate with the end users regarding how they can access the report and then provide training, as needed. Include a way for the end users to provide feedback; acknowledge feedback and build release schedule. As report production scales up, the system administrator should monitor performance and apply the appropriate load balancing and security measures. Phase 4: Access report results (end user and business analyst) and administer (system administrator)

9 After a report is generated, end users can access it in a variety of ways. A report can be viewed through the JReport Console, through a Java application, or routed to a delivery target such as an address, printer, or Web site. The business analyst can also build ad hoc reports as needed. The system administer monitors the report access environment through the JReport Administration Console. Phase 5: Update report template (report developer) Collect feedback from the end users to determine any needed improvements to the layout or behavior of the report. Also, modify security as needed (add/drop users) and update data source connections.

10 JReport product overview The JReport solution spans a 3-tier architecture. JReport Designer is a Swing-based Integrated Development Environment (IDE) that enables sophisticated report design and presentation of critical business data. It provides an intuitive interface, reusable report components, flexible layout, and a toolset for designing and testing reports. With JReport Designer, you can build reports using simple drag and drop techniques or by using the Report Wizard. Data can be accessed from any data source to design and preview reports in order to deliver

11 information to end users in the most relevant and intuitive manner. Rapid creation and modification of report templates is accomplished by toggling between design mode and view mode where the report will be displayed with the actual dataset. Once report design is complete, the template is published to JReport Server for generation, delivery, and management. JReport Server is a 100% Java report generation and management tool. It enables efficient management, sharing, scheduling, versioning, and delivery of reports and enables reporting to be integrated into the workflow of any Java application. The high-performance engine can scale to any workload. Report results can be saved to a versioning system, sent to enterprise/workgroup printers, or ed. With JReport Server, reports can be viewed in any modern enterprise format including DHTML, HTML and standard business documents, such as PDF, Excel, and RTF. JDashboard delivers information using a user portal user interface rather than a report. Users can freely choose the objects they want to display in the dashboard, without having to know how these objects were created, what data sources to use, what styles to set, etc. A dashboard can hold multiple data components so that when browsing the dashboard users are able to see multiple data aspects. Within a dashboard, data components are able to communicate with each other via the message mechanism. This allows actions such as common filters to be applied to all the components of a dashboard even when coming from different data sources. JReport Viewer and JReport Studio enable reports to be accessed through a web browser via Dynamic HTML, or AJAX. With JReport Viewer and JReport Studio, reports can be modified using dynamic filter, sort, and drill capabilities. Using JReport Viewer and JReport Studio's advanced capabilities, users can drag and drop columns to and from an existing report, dynamically change chart types, pivot crosstabs, add groups, convert report components or create an entirely new report.

12 JReport sample reports JReport Designer comes with over 20 pre-built sample reports. You can open and edit these reports with JReport Designer, and run them with JReport Server. This document describes a few of the sample reports, so that you can see how your own reports may look. The reports that you will be building in this tutorial are simpler than the sample reports. Report sample 1: Invoice report This is a typical invoice report, on which end users can perform the filtering, sorting and going functions on key columns by right-click functionality:

13 Report sample 2: Stock chart End users can use this report to track performance indices over time. By using the mouse over, end users can instantly view specific metrics for a designated point in time: Report sample 3: Shipment details report By using web controls in the report, end users can dynamically change the results of the report.

14 To see more sample reports, visit

15 Setting up JReport on your system The JReport Tutorial assumes that you have downloaded and installed both JReport Designer and JReport Server on a Windows XP machine. The JReport Tutorial also assumes that you are performing the lessons on a Windows XP and therefore operating system specific commands and screen shots reflect this. However JReport can run on multiple platforms. JReport Designer has the following system requirements: JReport Designer System Requirements Recommended Requirements Minimum Requirements OS: Windows, Unix, Linux Windows, Unix, Linux CPU: Intel Dual Core Xeon 2.8GHz Intel P4 Xeon 3.0GHz Memory: 3 GB 2 GB Disk: 1 GB free 1 GB free JDK: 6 or above 6 or above Client Requirements Recommended Internet Explorer 6, Firefox 3, and higher versions, or Google Chrome 5. JReport Server has the following system requirements: JReport Server System Requirements Recommended Requirements Minimum Requirements OS: Windows, Unix, Linux, z/linux Windows, Unix, Linux, z/linux CPU: Intel Dual Core Xeon 2.8GHz Intel P4 Xeon 3.0GHz Memory: 3 GB 2 GB Disk: 1 GB free 1 GB free (500 MB free for a slave server) JDK: 6 or above 6 or above Client Requirements Recommended Internet Explorer 6, Firefox 3, and higher versions, or Google Chrome 5. You can download a JDK version at Notes: JReport supports Java VMs from Sun and IBM. You can try using other Java VMs, but their compatibility cannot be guaranteed. Jinfonet technical support welcomes any feedback on the use of other Java VMs. If you want to use JReport Server on a z/linux system, you must download the JDK specially used for IBM from and the version should be at least V6.

16 The tutorial scenario The reports we build in this tutorial are related to a fictional, mid-size retail coffee chain named Jinfonet Gourmet Java. All documents needed to run the business and drive decision-making are reports generated by JReport. The business questions that our reports can answer include: What were the Sales totals last month? Last year? Which regions had the highest sales? Which sales representative? Which product was the best selling last month? Last year? Reports deliver real-time data By integrating sophisticated reporting functionality in enterprise applications, organizations can access, analyze and deliver real-time data as well as unlock critical business data hidden within applications. The reports access the same data storage as the applications of Jinfonet Gourmet Java:

17 Data sources used in the tracks The data store for the company is an RDBMS and XML files. The applications of the company inventory management system, store operations, supply chain management, and order tracking access and update the data store. For the reports that you will be creating and managing in this tutorial, the data sources are predefined in a built-in HyperSonic DBMS database and an XML data source. The table below shows the tables in the DBMS and XML data sources. The DBMS Name/XML Name is the name of the table as it is known in the DBMS or XML data itself; the Table Name is the table name that is shown in the JReport Designer: DBMS database DBMS Name Table Name Table Description ACCOUNTMANAGERS Account Jinfonet Gourmet Coffee employees Managers CONTACTS Contacts Customer contact information CUSTOMERS Customers Customer name, contact, and address ORDERS Orders Customer orders ORDERSDETAIL Orders Detail Orders line items

18 PRODUCTS Products Product information STOCKMARKET Stock Market Stock information XML data source XML Name Table Name Table Description _Jinfonet Jinfonet _Jinfonet_Employee Employee Jinfonet Gourmet Coffee employees _Jinfonet_CompanyInfo CompanyInfo Company information _Jinfonet_StockMarket StockMarket Stock information _Jinfonet_Customer Customer Customer name, contact, and address _Jinfonet_Customer_Order Order Customer orders _Jinfonet_Customer_Order_OrderDetail OrdersDetail Orders line items _Jinfonet_Catalog Catalog Product number and description for catalog _Jinfonet_Catalog_Product Product Product information By mapping the actual data source names to JReport Designer names, report designers can work with more intuitive or customized names. Where to go next Choose any of the following tracks for a step-by-step walk through of the JReport solution: Track 2: Creating New Reports Track 3: Creating Business Cubes and Report Cubes Track 4: Creating Business Views and Web Reports Track 5: Creating Library Components Track 6: Publishing, Running and Administering Reports Track 7: Integrating Reports with JSP Track 8: Creating and Analyzing Ad Hoc Reports

19 Track 2: Creating New Reports In this track, assume that you are a report developer working for the Jinfonet Gourmet Java (JGJ) company. You have been asked to write a set of reports based on the data in the company's existing database. For a description of the tables in this database, see Data sources used in the tracks in Track 1. JReport reports can pull data from any type of JDBC-accessible database, including Oracle and SQL Server, as well as XML data sources. To simplify the lessons, we'll use the built-in Hypersonic database and XML files which contain the sample data we need. This track introduces JReport Designer, a Swing-based Integrated Development Environment (IDE), for designing and testing of reports. This track contains a lesson for each type of predefined report: Lesson 1: Creating a standard banded report Lesson 2: Creating a horizontal banded report Lesson 3: Creating a mailing label report Lesson 4: Creating a chart report Lesson 5: Creating a table report Lesson 6: Creating a crosstab report Lesson 7: Creating a tabular report Lesson 8: Creating a report that contains a subreport Lesson 9: Creating a parameter-based report You will be developing a set of new reports based on the procedures in this track. JReport provides finished versions of these reports if you would like to reference them. See the Note at the end of each lesson for information about how to access the JReport-provided tutorial reports. Click the right arrow ( ) below to begin reading the track.

20 Lesson 1: Creating a standard banded report A report of monthly sales from 2009 to the present has been requested by the Vice President of Sales at Jinfonet Gourmet Java. In this report, totals for sales need to be broken down by each order and each month, as well as presented for a grand total of all months. Here's a draft of the report the vice president has given to you: You immediately recognize the repetitive, columnar data in the center of the report and associated subtotals as a candidate for a standard banded report. This type of report has horizontal "bands" or panels that are geared for either detailed record display or calculations, such as subtotals, that apply to a preceding group or the entire report. In this lesson, we perform the following tasks: Task 1: Create the initial report and query to populate it Task 2: Add summaries and a print date to the report Task 3: Fine tune the report layout Task 1: Create the initial report and query to populate it In this task, the report wizard collects the necessary information and then creates the standard banded report as well as the OrderListbyDate query. 1. Click Start > All Programs > JReport 11.1 > Designer to start JReport Designer. The JReport Designer window and the Welcome to JReport Designer dialog appear. Close the welcome dialog. 2. On the JReport Designer menu bar, click File > Catalog Management > Open Catalog to bring out the Open Catalog File dialog. 3. Browse to select the JinfonetGourmetJava.cat catalog file in <install_root>\demo\reports\jinfonetgourmetjava, then click the Open button. 4. Choose File > New > Page Report on the menu bar, or click the New Page Report button on the Standard toolbar. 5. In the New Page Report dialog, clear the text in the Report Title text box, select Banded from the layout box, then click OK. In all lessons in this track, we will create the report titles in other ways, so in the New Page Report dialog, we need to clear the

21 report title first, otherwise, a default report title will be added. A page report is a container which holds multiple report tabs. Report tabs in the same report can share the same parameters and dataset, and generally, have been designed for the same purpose, or related purposes. You can design, maintain and schedule them together. A page report file has a.cls extension. 6. In the Data screen of the Banded Wizard, select the New radio button. 7. Expand the Queries node in Data Source 1, click <Add Query...>, enter OrderListbyDate in the Input Query Name dialog and then click OK.

22 8. In the Query Editor window, click Query > Add Table on the menu bar. 9. In the Add Table dialog, select the tables Orders, Orders Detail, and Products and click the Add button to add the tables to the query, then click Done to close the dialog.

23 10. Select all the columns in the three tables by selecting the * checkbox, then uncheck the Inventory and Reorder Level columns in the Products table:

24 By default, the auto join options for queries are enabled (you can find the options on the sub menu of Query > Auto Join in the Query Editor), which means tables will be automatically joined in queries based on the join criteria. So, the three tables are automatically joined because JReport Designer recognizes the matching rows in each table. You can modify the join if desired or customize a different join for set of tables. However, when you add tables to a query, if you exit the Add Table dialog by directly clicking the close button of the dialog instead of clicking the Done button, tables you add will not be automatically joined based on the auto join criteria. JReport creates the SQL SELECT statement based on the columns, tables, and joins you specify. Click the SQL button to see the SQL SELECT statement if necessary. 11. Click OK at the bottom of the Query Editor window to create the query. 12. Click Next button in the Banded Wizard to show the Display screen. The Display screen determines which fields returned by the dataset are visible in the report. 13. From the Resources box, add the following fields in the Products table to the right-hand box one by one: Product Type Name, Products_Product ID, Product Name and Category, then change the display name of Products_Product ID to Product ID.

25 14. Click Next to display the Group screen. The Group screen specifies the grouping criteria to be applied to the selected records. There are two levels of grouping in this report: first by Order Date and second by Orders_Order ID. 15. From the Resources box, add the fields Order Date and Orders_Order ID in the Orders table as the group by fields one by one. You can choose the sorting sequence of the groups in the Sort column. Specify it in descending order (c,b,a), ascending order (a,b,c) or a special ordering criteria. By default the order is Ascend. 16. Select For each month from the Special Function drop-down list for the Order Date group.

26 By selecting the for each month special function, the records, of which the field values are in the same month, will be grouped together. 17. Switch to the Style screen and select Simple from the Style list. By default, when you create a banded, table, crosstab or chart report via the report wizard, a default style Neutral will be applied to it. However, in this lesson, we want to customize the report style by ourselves, so here we select the Simple style which has very little formatting. 18. Click Finish to create the report. The Summary, Chart, and Filter screens are skipped. The report with banded object is created. The panels in the banded object are identified on the left side by their abbreviations: a BandedHeader (BH) panel, a BandedPageHeader (BPH) panel, a Detail (DT) panel, a BandedPageFooter (BPF) panel, a BandedFooter (BF) panel, and two GroupHeader (GH) and GroupFooter (GF) panels for the two levels of grouping:

27 19. Click the View tab to run the report and view it. Task 2: Add summaries and a print date to the report As it is described in the first paragraph of this lesson, you need to calculate the totals of sales per order and per month, and then the total of all months. These types of calculations are accomplished by defining a formula that performs the computation and then placing the formula in the group footer panel directly. Summary is a special type formula that uses the built-in Sum function of JReport. A print date is a predefined field that is calculated at runtime by JReport. To add the summaries to the report, follow these steps: 1. From the Resource View panel, drag the Total formula in the Formulas node and drop it next to the Category DBField. The label of the formula is then placed in the second GroupHeader panel as follows: Next, we will create a dynamic summary based on the Total formula, so as to compute total of product sales by order, by month and also to calculate the grand total. 2. In the Resource View panel, select <Add Summary...>. 3. In the New Summary dialog, choose Sum from the Function drop-down list, select the Total formula from the Resource panel and click to add it to the Sum On field, check the Dynamic Summary radio button and keep its default settings, then click OK. 4. Enter Sum_ProductSales_DynamicSummary in the Summary Name dialog and click OK to create the summary. Then when we insert this summary into a group, JReport will do the calculation based on the group. If the summary is inserted into the BandedHeader or BandedFooter panel, it will compute based on the whole banded report. 5. Drag the summary Sum_ProductSales_DynamicSummary from the Resource View panel to both of the two GroupFooter panels

28 as well as the BandedFooter panel: 6. Resize the BandedPageHeader panel and then click Insert > Label to add a label in it. 7. Resize the newly-added label and double-click it to edit its text to Order List by Date. 8. Click Insert > Special Fields > Print Date and then place the special field in the BandedPageHeader Panel, next to the Order List by Date label. 9. Insert the Print Time special field in the same way. 10. Edit the text of the Print Date and Print Time labels to Date and Time, respectively. 11. Adjust the position of the two groups by fields, add two labels ahead of them for identification and edit their text as Order Date and Order ID as follows: Task 3: Fine tune the report layout To make the report easier to read, we need to make some adjustments to the report layout. 1. Resize the second GroupHeader panel. Select the Product Type Name, Products_Product ID, Product Name and Category name labels in the BandedPageHeader panel and move them to the second GroupHeader panel, so that they can be closer to the actual data they describe. 2. Resize the Product Type Name, Product ID, Product Name, Category and Total name labels, as well as their corresponding DBFields, manually drag and align them as follows, so that it can be shown more clearly:

29 3. Select the DBField Product ID in the Detail panel and its name label, set their Horizontal Alignment property to left so as to improve the report layout. 4. Select the five labels Product Type Name, Product ID, Product Name, Category and Total, then in the Report Inspector, set their properties Background and Foreground to Lightgray and White. 5. Select the three summaries in the two GroupFooter panels and the BandedFooter panel and make them right aligned with the Total formula, then edit the summary labels to Total by Order, Total by Month and Grand Total. 6. Select the Total by Order and Total by Month summaries, then change their Foreground property to Gray in the Report Inspector. 7. Select the Grand Total summary in the BandedFooter panel, then change the Foreground property to Red. 8. Select the Order ID group by field in the second GroupHeader panel and change its Foreground property to Red. 9. Select the Date and Time special fields in the BandedPageHeader panel and the Order Date group by field in the first GroupHeader panel, then change their Foreground property to Gray. 10. Resize the Order List by Date label, change its Font Size property to 18, and Foreground property to Red. 11. Resize the Date and Time special fields and change their position in the BandedPageHeader panel to make them look tidy in the report. 12. Select the two GroupFooter panels and the BandedFooter panel, then set their Background property to Transparent. 13. Right-click the BandedHeader panel and select Hide from the shortcut menu to hide it from view. Repeat to hide the BandedPageFooter panel in the same way. After editing, the report looks somewhat like below in design view:

30 Next, we will give the report tab a meaningful name and save the report. 16. On the report tab bar, right-click the report tab and select Rename from the shortcut menu. 17. In the Input Report Tab Name dialog, enter OrderDetails and click OK. 18. Click File > Save in the menu bar to save the report as OrderListbyDate.cls. 19. Click the View tab to run the report and view it. The report should look similar to the following one:

31 Note: If the report does not look correct, you can compare it to the final versions of the tutorial reports provided by JReport. To do so, you will need to save and close this catalog and open the TutorialReports.cat catalog file instead, which is located at <install_root>\demo\reports\tutorialreports. Lesson 1 summary In this lesson, we created a standard banded report to build a simple yet very effective sales report. The detail area of the banded object displays a line for every sales order; the group and report footers are used to display the respective cumulative sales totals. We used a single dynamic summary to present three different totals: total by order, total by month and also a grand total.

32 Lesson 2: Creating a horizontal banded report Your new reporting assignment is to create a summary of each Jinfonet Gourmet Java employee. The report will also need to communicate the ranking of the employee's salary, that is, whether it is on the upper or lower end, or somewhere in between, relative to all employees. The following prototype of the report has been given to you: This lesson contains the following tasks: Task 1: Create the initial report Task 2: Adjust the layout of the report and add the Photo DBField Task 3: Rank the employees Task 4: Fine tune the report layout Task 1: Create the initial report Again the report has repeated rows of information, but this time they are repeated left to right instead of top down. A horizontal banded report is offered to support this format. To create the initial report with a horizontal banded object, follow these steps: 1. From the JReport Designer toolbar, click the New Page Report button. 2. In the New Page Report dialog, clear the text in the Report Title text box, select Horizontal Banded from the layout box, then click OK. Be sure that JinfonetGourmetJava.cat is specified as the current catalog because it is the catalog we use in this track. For information about specifying this catalog, see Task 1, Step 2 of Lesson In the Data screen of the Horizontal Banded Wizard, check the New radio button. 4. Expand the Queries node in Data Source 1, click <Add Query...>, enter EmployeeInformation in the Input Query Name dialog and click OK. 5. In the Query Editor, click Query > Add Table to add the Account Managers table. 6. Select * in the Account Managers table to add all the columns in it and then click OK at the bottom of the Query Editor to create the query. 7. Click Next in the Horizontal Banded Wizard to go to the Display screen. 8. In the Display screen, add the Name, Employee Position, Notes, HireDate, Birthday and Home Phone DBFields to the report one by one, edit the display names HireDate and Birthday to Hire Date and Birth Date, then click Next.

33 9. In the Group screen, add Account Manager ID as the group by field. 10. Switch to the Style screen and select Simple as the report style. Click Finish to create the report and the report appears as follows: Task 2: Adjust the layout of the report and add the Photo DBField To improve the appearance of the report, we will do some adjustments to the report's layout. In addition, we will add a Photo field to the report which allows the report to be used to identify the employee. 1. Widen the Detail panel, then resize the Employee Position and Notes DBFields horizontally so that the data won't get truncated.

34 2. Select the Hire Date and Birth Date DBFields, then in the Report Inspector, set their Format property to MM/dd/yy. 3. Select the Name, Employee Position and Notes labels in the BandedPageHeader panel and press the Delete button on the keyboard to remove them from the report. 4. Adjust the space between fields in the Detail panel, move the Hire Date, Birth Date, and Home Phone name labels from the BandedPageHeader panel and place them above their fields as follows: 5. Hide the BandedHeader, BandedPageHeader, GroupFooter, BandedPageFooter, BandedFooter panels that don't hold any data by rightclicking the panel and select Hide from the shortcut menu. 6. Resize the GroupHeader panel, click Insert > Label to add a label before the group field in the panel, edit its text as "Employee ID:" and adjust the position like the following:

35 7. From the Resource View panel, drag the Photo DBField in the Employee table to the GroupHeader panel. 8. Remove the name label of the Photo DBField and resize the field as follows: 9. Click Insert > Drawing Object to insert a Line object above the Employee Position DBField, and insert a Box object in the same way to enclose all the objects in the reports.

36 Task 3: Rank the employees As required at the beginning of the report design, the manager wants to rank the employees by their salaries, so we will add a rank object to the report. 1. Select the Detail panel of the report and click Insert > Rank on the menu to display the Rank Expert dialog. 2. In the Rank Expert dialog, first select Salary from the Rank Resources box. 3. Click the Browse button and choose Rank5.gif in the JinfonetGourmetJava folder as the default image for all value ranges. 4. In the Value Range box, input in the Minimum cell, in the Maximum cell, then click the Image cell and select <Browse...> to choose Rank3.gif as the image of this range. 5. Click the add button twice to add two ranges and define them as follows:

37 6. Click the Insert button to insert the rank to the Detail panel, below the Home Phone field. 7. Move the name label of the rank from the bottom of GroupHeader panel and place it above the rank, then edit its text to Salary Ranking and resize the label to full display the text. Task 4: Fine tune the report layout 1. Select the Employee ID label and the group by field in the GroupHeader panel, then change their Font Face property to Arial, and Font Size property to 10 in the Report Inspector. 2. Select all the objects except the Line and Rank objects in the Detail panel and change their Font Face property to Arial.

38 3. Select the Saraly Ranking label and the rank, then change their Horizontal Alignment property to left so as to make them aligned the same with other objects in the detail panel. 4. Select the Name DBField, change its properties in the Report Inspector as follows, then resize it to make sure the names can be fully displayed. Font Size: 12 Bold: true Foreground: 0xcc Right-click the Photo DBField and select Display Type from the shortcut menu. 6. In the Display Type dialog, select Image in the Display As box, choose GIF or JPG from the Decode Type drop-down list, then click OK. 7. In the Report Inspector, select the Line object and change its Line Color property to Lightgray, Line Thickness to 0.02.

39 8. Select the Box object and change its Border Color property to Lightgray too. Next, we will add a title to the report. 9. Click View > Page Header to display the page header. 10. In the Report Inspector, select the PageHeaderPanel node and change its Height property to Drag Label from the Toolbox panel and drop it in the PageHeader panel. 12. Resize the label, modify its text as Employee Information List, and change its Font Face property to Arial, Font Size to 14, Foreground to 0xcc0000. After editing, the report looks somewhat like below in design view:

40 13. On the report tab bar, right-click the report tab and select Rename from the shortcut menu to rename the report tab as EmployeeDetails. 14. Click File > Save to save the report as EmployeeInformation.cls. 15. Click the View tab to preview the report. The report appears similar to the below one: Note: If the report does not look correct, you can compare it to the final versions of the tutorial reports provided by JReport. To do so, you will need to save and close this catalog and open the TutorialReports.cat catalog file instead, which is located at <install_root>\demo\reports\tutorialreports. Lesson 2 summary In this lesson, we created a horizontal banded report to present a summary of each employee. We added drawing objects to improve the readability, and a rank graphic to communicate the relative salaries of the employees.

41 Lesson 3: Creating a mailing label report In this lesson, we develop a Customer Contact Card report using the mailing label layout. This report can be used to print rolodex cards as well as mailing labels. On each card, the following information needs to be shown: The data source for this report is our built-in XML data, predefined as Data Source 2 in the catalog. This lesson contains the following tasks: Task 1: Define the query that the report uses Task 2: Add objects to the report Task 3: Edit object properties and print the report Task 1: Define the query that the report uses 1. From the JReport Designer toolbar, click the New Page Report button. 2. In the New Page Report dialog, clear the text in the Report Title text box, select Mailing Label from the layout box, then click OK. Be sure that JinfonetGourmetJava.cat is specified as the current catalog because it is the catalog we use in this track. For information about specifying this catalog, see Task 1, Step 2 of Lesson In the Data screen of the Mailing Label Wizard, check the New radio button. 4. Scroll down to Data Source 2 and expand the Queries node. 5. Click <Add Query...>, enter CustomerContactCard in the Input Query Name dialog and then click OK. 6. In the Query Editor, click Query > Add Table to add the Customer table to the query, select all columns in the table by choosing *, and then uncheck the NodePrimaryKey and NodeForeignKey columns.

42 7. Click OK at the bottom of the Query Editor to create the query. 8. Switch to the Style screen in the Mailing Label Wizard and select Simple as the report style, then click Finish to create the report. The wizard is dismissed and the empty report with an empty banded object appears. Task 2: Add objects to the report 1. Select and resize the Detail panel of the banded object, to make it similar to the below one: We will use a simple formula to create a single value out of the customer's last and first names, and similarly to the address. 2. In the Resource View panel, select <Add Formula...> in the Formulas node.

43 3. Enter the formula name as CustomerContactName in the Input Formula Name dialog and define the formula in the Formula Editor + " " 4. Create another formula named CustomerContactAddress using the same way and define it as + ", " + ", " + " " Now we will use one of the JReport Designer's customizations that can simplify the creation of this report. 5. Click File > Options on the menu bar. 6. In the Options dialog, select Component, clear the Insert field name label with field checkbox and click OK. We don't want to show the name labels of the DBFields in this report. Now we can add our formulas and DBFields to the report. 7. From the Resource View panel, drag the CustomerContactName formula to the Detail panel of the banded object, and then the ContactPosition DBField to the right of it.

44 8. Use the same way to add the following fields: 9. Add two labels to identify the Phone and Fax DBFields and edit their text to "Phone:" and "Fax:" as follows. 10. Insert a Line drawing object just above the CustomerName DBField by clicking Insert > Drawing Objects > Line.

45 11. Select the Detail panel of the banded object and add a Box drawing object to enclose all the objects in the panel. 12. Resize the BandedPageHeader panel, add a label to it, then resize the label and edit its text to Customer Contact Card as the title of the report. Task 3: Edit object properties and print the report 1. Select the label in the BandedPageHeader panel and change its properties in the Report Inspector as follows: Bold: false Font Face: Arial Font Size: 14 Foreground: Red 2. Select all the objects in the Detail panel except the Line and the Box drawing objects, change their Font Face property to Arial and Font Size to Select the CustomerContactName formula and set its Bold property to true. 4. In the Report Inspector, select the Box object and change its Border Color property to Lightgray.

46 5. Select the Line object and edit its Line Color property to Lightgray and Link Thinkness to Resize the fields horizontally if data is truncated. 7. Hide the BandedHeader and BandedPageFooter and BandedFooter panels that don't hold any data by right-clicking the panel and select Hide from the shortcut menu. 8. On the report tab bar, right-click the report tab and select Rename from the shortcut menu to rename the report tab as CustomerInformation. 9. Click File > Save to save the report as CustomerContactCard.cls. 10. Click the View tab to preview the report. The report appears similar as follows:

47 Now, the report is ready to be printed. 11. Click File > Print and then specify the settings in the Print dialog according to your requirements. Notes: It is recommended that you click File > Options again to enable the Insert field name label with field option in the Component category, so that later when you add fields to reports, their name labels will be added automatically. If the report does not look correct, you can compare it to the final versions of the tutorial reports provided by JReport. To do so, you will need to save and close this catalog and open the TutorialReports.cat catalog file instead, which is located at <install_root>\demo\reports \TutorialReports. Lesson 3 summary In this lesson, we created a customer information report with the mailing label layout. In the report, customer's information is enclosed in boxes so that later we can print the report and make contact cards out of it.

48 Lesson 4: Creating a chart report The fourth quarter of the year has just ended, and you have been asked to produce a chart that shows product annual sales for each sales region. The sales manager wants to compare the historical sales data with the current data. Here's a sketch of the report that the sales manager has given to you: You recognize that this is a bar chart. JReport supports 13 general chart types, and most of them have many sub-types or variations. After showing the sales manager the available bar chart types, he chooses the 2-dimensional clustered bar chart. For a summary of the JReport chart types, see Chart types in the Components chapter of the JReport Designer User's Guide. Additionally, the sales manager requests that the report output format should be Microsoft Excel. This is not a problem, because all pre-defined reports in JReport can be exported to HTML, PDF, Excel, RTF, XML, Text, Postscript, Mail and Fax. This lesson contains the following tasks: Task 1: Create the chart Task 2: Format the chart Task 3: Export the report to an Excel file Task 1: Create the chart 1. From the JReport Designer toolbar, click the New Page Report button. 2. In the New Page Report dialog, clear the text in the Report Title text box, select Chart from the layout box, then click OK. Be sure that JinfonetGourmetJava.cat is specified as the current catalog because it is the catalog we use in this track. For information about specifying this catalog, see Task 1, Step 2 of Lesson In the Data screen of Chart Wizard, check the New radio button, scroll down to the Queries node in Data Source 1, select the query AnnualSalesbyRegion and then click Next. 4. In the Type screen, check the Single chart radio button, select Bar as the chart type and Clustered Bar 2-D as the sub type, then click Next. In this chart, we want to display the region name in the Category(X) axis, and annual sales of each region in the Value(Y) axis. However, as the region names are too long to be displayed completely in the Category(X) axis, we will create a formula here to just get the abbreviations of the region names. 5. In the Display screen, scroll down to the Formulas node in the Resources panel, and then select <Add Formula...>. 6. Enter the formula name Region_AbbreviationName in the Input Formula Name dialog, click OK, define the formula in the Formula Editor window as follows, click File > Save to save the formula, and then close the dialog to finish editing.

49 if == "Asia-Pacific (APAC)") "APAC" else if == "Europe, Middle East, Africa (EMEA)") "EMEA" else if == "Latin America (LATAM)") "LATAM" else if == "North America (NA)") "NA" 7. Add the formula Region_AbbreviationName to the Category box, and YearofOrderDate to the Series box. In the Show Values box, a numerical value is required. In this lesson, we need to show the annual sales of each region, so a summary which is created on the column Annual Sales, and grouped by the formula Region_AbbreviationName is needed. 8. Scroll down to the Summaries node in the Resources panel of the Display screen and then select <Add Summary...>. 9. In the New Summary dialog, specify the function as Sum, add the field Annual Sales from the Customers table to the Sum On field, check the Static Summary radio button, specify the Group By field as Region_AbbreviationName from the Formulas node, then click OK. 10. Enter Sum_AnnualSalesbyRegion_AbbreviationName in the Summary Name dialog and click OK to create the summary. 11. Add the newly-created summary to the Show Values box. The Display screen appears as follows:

50 12. Switch to the Layout screen, select Title from the Options box, and then enter Annual Sales by Region as the Chart Title and Regions as Category(X) Axis Title. JReport provides a set of CSS styles that can be applied to reports to easily change the format and appearance of the report. We will apply the Classic style to the chart. 13. Go to the Style screen and select Classic from the style list. 14. Click Finish to create the chart report and the report shows as follows in the design view:

51 15. Click the View tab to view this chart, and it appears as follows: Task 2: Format the chart The chart is accurate, but a little simple. We can add some polish to it by setting some of the chart properties. 1. Click the Design tab to return to the design mode to do the adjustments. 2. Double-click a bar of the chart, and the Format Bar dialog appears. 3. In the General tab of the Format Bar dialog, set the Use Depth option to true, and specify Depth as 10px and Direction as 45deg. In the Format Bar dialog, you could also choose another sub-type for the chart in the Layout box if desired. In this lesson, we will continue using Clustered - 2D.

52 4. Switch to the Data Label tab, specify Font as Arial and Font Size to 10. The Data labels that charts contain can be either static or dynamic. You can check the Show Static Data Label option and specify the Position for data labels according to your requirements, so that the labels are displayed statically in the chart. But in this lesson, we will just use the labels as dynamic ones, which will appear when the cursor is placed on bars. 5. Click OK to apply these property settings to bars of the chart. 6. Right-click the legend and then select Format Legend from the shortcut menu. 7. In the Format Legend dialog, click the Font tab, set Font as Arial and Font Size to Switch to the Mark tab, select Item 0 from the Mark Items list, and select circle from the mark drop-down list.

53 9. Select Item 1, and apply upward triangle to it in the same way. 10. Click OK in the Format Legend dialog to apply these changes. 11. Right-click the chart and then select Format Axes > Format Value(Y) Axis from the shortcut menu. 12. In the Format tab of the Format Value(Y) Axis dialog, select $#,##0. in the Number category, and then click Add.

54 13. Click OK in the Format Value(Y) Axis dialog. 14. Double-click the Regions label. In the Format Label dialog, switch to the Font tab, specify Font as Arial and Font Size to 10, and then click OK. 15. On the report tab bar, right-click the report tab and select Rename from the shortcut menu to rename the report tab as AnnualSales. 16. Click File > Save to save the report as AnnualSalesbyRegion.cls. 17. Click the View tab to preview the report and it looks somewhat as follows:

55 Note: If the report does not look correct, you can compare it to the final versions of the tutorial reports provided by JReport. To do so, you will need to save and close this catalog and open the TutorialReports.cat catalog file instead, which is located at <install_root>\demo\reports\tutorialreports. Task 3: Export the report to an Excel file Now we can export the report to different formats as required. In this lesson, we will export it to an Excel file. 1. Click File > Export To > Excel on the menu bar. 2. In the Export to Excel dialog, check Report Format and keep the default settings of other options. Then click OK. 3. Open the file AnnualSalesbyRegion_AnnualSales.xls saved in <install_root>\demo\reports\jinfonetgourmetjava. It appears as follows:

56 Lesson 4 summary In this lesson, we created a chart report to represent the annual sales of four regions in both 2009 and 2010, formatted the chart by setting properties and then made a quick and effective change to its appearance by applying a CSS. Finally, we exported the chart to an Excel file, where the report layout and format are accurately represented. By reviewing the chart, the sales manager can easily compare the sales per region over a two-year period.

57 Lesson 5: Creating a table report The Jinfonet Gourmet Java company receives orders from customers in different territories around the world, and by reviewing this shipping information the Shipping department can receive bids from various shipping vendors. You are assigned the task of creating a shipment information report. In the report, the shipment details, including order ID, order date, ship date, shipping cost, whether the payment has been received, and the shipping vendor, need to be reported for each territory. The following prototype of the report has been given to you: This report will be run online, so an interactive report will work well. Interactive reports allow the end user to change the view of the report. They can filter the data on the report or change the sort order, as well as search the report. This lesson contains the following tasks: Task 1: Create the table Task 2: Add a web control to the report Task 3: Add objects and edit their properties Task 1: Create the report Before taking this task, make sure you have enabled the Insert field name label with field option in the Options dialog as noted at the end of Lesson 3. Otherwise, the name labels will not be inserted together with the fields when you add fields to the table. 1. From the JReport Designer toolbar, click the New Page Report button. 2. In the New Page Report dialog, clear the text in the Report Title text box, select Table (Group Above) from the layout box, then click OK. Be sure that JinfonetGourmetJava.cat is specified as the current catalog because it is the catalog we use in this track. For information about specifying this catalog, see Task 1, Step 2 of Lesson In the Data screen of the Table Wizard, check the New radio button. 4. Expand the Queries node in Data Source 1, click <Add Query...>, enter ShipmentDetailsbyCustomer in the Input Query Name dialog and click OK. 5. In the Query Editor, click Query > Add Table. In the Add Table dialog, add the tables Customers and Orders to the query, then click Done.

58 The two tables are then joined together automatically on the Customers_Customer ID and CustomerID_FK1 columns. 6. Check all the columns in the Orders table. For the Customers table, check the following columns: Customer Name, Customers_State, Customers_Country, Customers_Territory and Customers_Region. 7. Click OK at the bottom of the Query Editor to create the query. Then click Next in the Table Wizard. 8. In the Display screen, add the fields Orders_Order ID, Order Date, Ship Date, Ship Via, Payment Received and Shipping Cost to the table. By default, the records in a table are displayed randomly; they are displayed in the order they are returned from the fetch operation. You can specify that JReport sort the records in a table, and also within the groups in table if any, according to your requirement. In this lesson, we will make the records in the table sorted by order ID ascendingly. 9. Click the Sort Fields By button at the right bottom corner of the Display screen. In the Sort Fields By dialog, add the DBField Orders_Order ID as the sort by field, then click OK to return back to the table wizard.

59 10. Click Next in the Table Wizard to display the Group screen. Since the report is required to display shipment details of each customer in specific territory, we will add two groups to it: first group the report by territory and then by customer name. 11. In the Group screen, add the DBFields Customers_Territory as the first group by field and Customer Name the second one.

60 12. Switch to the Style screen and select to display the report in the Classic style vertically. 13. Click Finish to create the report. 14. Click the View tab to preview the report and it appears as follows:

61 The required report has been created, but it is cumbersome to locate the shipment details of specific territories. So our next task is to add web controls to the report so that the end user can easily filter the results of the report. Task 2: Add a web control to the report Web controls empower end users of interactive reports to easily modify the report results they are viewing, and are defined by a trigger event, such as click, and a resulting web action. In this task, we add a Drop-down List web control to the PageHeader panel of the report. It will be used to filter the report records by territory. 1. Click View > Page Header to display the PageHeader panel. 2. In the Report Inspector, select the PageHeaderPanel node and change its Height property to Click Insert > Web Controls > Drop-down List to insert a web control into the PageHeader panel. 4. Right-click the web control and select Display Type from the shortcut menu. 5. In the Display Type dialog, click the Value cell and then click in it to display the Insert Fields dialog. 6. Select Customers_Territory in the Customers table in the DBField List box and click the Insert button to add it as value of the drop-down list. 7. In the Web Behaviors box, click the Events cell and select Data Change from the drop-down list, then click in the Actions cell.

62 8. In the Web Action List dialog, select the Filter action and click OK. 9. In the Filter - Web Action Builder dialog, specify to apply the action to TableComp, click the Filter On cell and select CUSTOMERS_TERRITORY from the drop-down list, then click the Value cell and select MultiValueContainer. Click OK to apply the settings.

63 10. Click OK in the Display Type dialog to confirm the settings. 11. Resize the drop-down list horizontally to make sure the territory name can be displayed completely. In this lesson, we will not explain the web actions and their parameters in detail. You can refer to Applying web actions in the Components chapter of the JReport Designer User's Guide for assistance. By now, we have finished defining values of the web control. Next we will add a label ahead of it for identification, and a report title to the report. Task 3: Add objects and edit their properties 1. Drag and drop two Label objects from the Toolbox panel to the PageHeader panel. Resize them and edit their text as follows: 2. Select the two labels and set their Bold property to true in the Report Inspector. 3. Resize the Shipment Details by Customer label, set its Font Size property to 18 and Foreground property to Red. 4. Select the Order Date and the Ship Date DBFields and set their Format property to MM/dd/yy. 5. Resize the two group by fields, add two labels ahead of them and edit the text of the labels as "Territory:" for the first group by field and "Customer Name:" for the second. 6. Select the four objects in the two GroupHeader panels, set their Foreground property to 0xcc Double-click the Orders_Order ID label in the TableHeader panel and edit its text to Order ID. 8. Select the Ship Via label and resize it to make sure no data get truncated. Do the same to the Payment Received label. Next, we will apply a different background color to the GroupHeader panels to make them distinguished from the TableHeader panel and hide the second GroupFooter panel to improve the layout of the report. 9. Select the two GroupHeader panels in the Report Inspector and set their Backgroud property to 0xf3f3f Right-click on the second GroupFooter panel header and select Hide from the shortcut menu to hide the panel.

64 11. On the report tab bar, right-click the report tab and select Rename from the shortcut menu to rename the report tab as ShipmentDetails. 12. Click File > Save to save the report as ShipmentDetailsbyCustomer.cls. 13. Click the View tab to preview the report and it appears as follows: Note: If the report does not look correct, you can compare it to the final versions of the tutorial reports provided by JReport. To do so, you will need to save and close this catalog and open the TutorialReports.cat catalog file instead, which is located at <install_root>\demo\reports\tutorialreports. The web controls are powered by JReport Web and therefore cannot be previewed in JReport Designer. We can use the Preview in

65 DHTML command of JReport Designer to preview this report, however, this command is enabled only if the option Server for previewing reports in DHTML or Studio was specified when installing JReport Designer. Click View > Preview As > DHTML. The report will then be opened in a web browser. Now we can select values from the dropdown list to dynamically change the report results. In the report below, we choose to view records in the Mexico territory. Lesson 5 summary In this lesson, we created a shipment details report in the table report layout. In the report, we used a table container to format the data, and a web control to dynamically change the report results.

66 Lesson 6: Creating a crosstab report A report with quantities of different products that are sold in different regions and their sales totals is needed. You are required to create a report that can clearly represent the necessary information, which allows the sales manager to easily compare the sales of different products in different regions. Here is the sketch that is given to you: In this lesson, we learn to create a crosstab report from the following tasks: Task 1: Create the crosstab Task 2: Format the crosstab Task 3: Change the page layout of the report Task 4: Save the report style as a CSS file Task 1: Create the crosstab Before taking this task, make sure you have enabled the Insert field name label with field option in the Options dialog as noted at the end of Lesson 3. Otherwise, the name labels will not be inserted together with the fields when you add fields to the crosstab. 1. From the JReport Designer toolbar, click the New Page Report button. 2. In the New Page Report dialog, clear the text in the Report Title text box, select Crosstab from the layout box, then click OK. Be sure that JinfonetGourmetJava.cat is specified as the current catalog because it is the catalog we use in this track. For information about specifying this catalog, see Task 1, Step 2 of Lesson In the Data screen of the Crosstab Wizard, select the New radio button. 4. Expand the Queries node in Data Source 1, click <Add Query...>, enter ProductSalesAnalysis in the Input Query Name dialog and click OK. 5. In the Query Editor, click Query > Add Table. In the Add Table dialog, add the Customers, Orders, Orders Detail, and Products tables to the query, then click Done. 6. Check all the columns in the Orders Detail table, the following columns in the Customers table: Customer Name, Customers_City, Customers_State, Customers_Country, Customers_Territory and Customers_Region, and Products_Product ID, Product Name, Category, Product Type Name and Price in the Products table. You may notice that here we do not check any columns in the Orders table, that is because in this report, columns in this table are not needed but we need this table to create joins between tables in the query. 7. Click OK at the bottom of the Query Editor to create the query. 8. In the Display screen, add the DBField Category to the Columns box, Customers_Country to the Rows box, the Quantity DBField and Total formula to the Summaries box, and specify their aggregate function to Sum.

67 9. Switch to the Style screen and select Simple from the Style list, then click Finish to create the crosstab report. Task 2: Format the crosstab In this task, we will format the crosstab to make it look more professional. 1. Select the crosstab and change its Position property to absolute in the Report Inspector, then drag it to the following position: By setting the Position property of an object to absolute, the object will be located at the position specified by dragging and

68 dropping or by setting its X and Y coordinate property values. Meanwhile, when objects in a flow layout container have their Position property value set to absolute and are overlapped, we can set the display order of the objects by right-clicking the object and then selecting an item from the Move submenu. 2. From the Toolbox panel, drag three labels to the report, edit their text respectively to Units, Sales and Product Sales Analysis, and then adjust the crosstab and the three labels to align them as follows: Next, we will edit properties of the crosstab report objects in the Report Inspector to improve the appearance of the report. 3. Select the Units label and edit its Bold property to true, Background property to Gray and Foreground property to White. 4. Select the Sales label and edit its Bold property to true, Background property to 0x99ccff and Foreground property to White. 5. Select the Category field and edit its Background property to 0x99ccff and Foreground property to White. 6. Select the two Total cells, the Customers_Country field and the four #,### cells in the crosstab, and then specify their Foreground property to Gray.

69 7. Select the four #,###.00 cells, change their Foreground property to 0x99ccff, Bold property to true and Format property to $#, ### Select the Product Sales Analysis label, set its Bold property to true, Font Size property to 18, and Foreground property to Red, then resize it to make its text not be truncated. 9. On the report tab bar, right-click the report tab and select Rename from the shortcut menu to rename the report tab as ProductSales. 10. Click File > Save to save the report as ProductSalesAnalysis.cls. 11. Click the View tab, and the crosstab report appears somewhat like the following one:

70 Note: If the report does not look correct, you can compare it to the final versions of the tutorial reports provided by JReport. To do so, you will need to save and close this catalog and open the TutorialReports.cat catalog file instead, which is located at <install_root>\demo\reports\tutorialreports. Task 3: Change the page layout of the report When previewing the report, we can see that the crosstab is displayed in two pages. However, with JReport's page mode feature, we can decide how to view a report: in pagination mode or continuous mode. In pagination mode, the page shape and size can be specified in the page panel settings. In continuous mode, the whole report is laid out in a single page, and has no specific shape and size. You can refer to Designing a report page in the Page Reports chapter of the JReport Designer User's Guide for more details about other page related features. 1. Uncheck Page Layout on the View menu. 2. Click the View tab to view the report again. Now, the crosstab is displayed in a single page. We can drag the scroll bar to have a complete view of the crosstab. For a crosstab component, when it is in continuous page mode, we can further set another two properties to determine how many rows and columns we would like to view. 3. Select the crosstab, and set its Items per Row Block and Items per Column Block property values to 3 in the Report Inspector. 4. View the report. Now only three items are displayed in the row and column blocks. 5. Check Page Layout on the View menu to switch back to the pagination mode, then the two properties will not take effect. 6. Click File > Save to save the report again. Task 4: Save the report style as a CSS file After formatting the report step by step in the Task 2, we can then save the report style as a CSS file, which can be applied to other crosstab reports directly. 1. Right-click the crosstab and select Save Style from the shortcut menu.

71 2. Keep the default settings in the New CSS Style dialog and click OK. 3. In the Save CSS As dialog, enter Crosstab.css in the File Name field, then click Save to save the file to the default directory <install_root>\style. The CSS Style Definition for CTCrosstab dialog appears. 4. Add all the properties of the crosstab from the All Properties box to the Selected Properties box by clicking the button, then click Save to save these properties in the crosstab.css file. Now, the style of the crosstab report has been saved as a CSS file. Properties in the file can be applied to corresponding components of other reports directly by selecting the CSS file in the <Import CSS File...> drop-down list on the Format toolbar of JReport Designer. Lesson 6 summary In this lesson, we created a crosstab report to represent the product sales analysis of different regions, and then formatted it to improve its appearance. Then, we used the page mode feature to preview the report and edited some properties to reduce the records on the row and column blocks. And finally, we saved the style of the crosstab report as a CSS file so that the styles we defined here can easily be applied to another report.

72 Lesson 7: Creating a tabular report A report about performance of products is needed, in which the product ID is less than or equals to 10. The report includes annual sales of every product in every region, their unit price, the quantities that are sold, and the total of their annual sales of every product. The report should contain a crosstab, which is to represent annual sales of ten products in every region, a chart object, which is to represent quantities and total annual sales of these specified products, and a banded object, which is to represent the unit price and quantities. Here is a sketch of the report that you can refer to: In this lesson, we will create a tabular report and insert crosstab object, chart object and banded object respectively into different tabular cells, so that components in the report can be arranged easily with the tabular layout. Meanwhile, all the data resources we need for creating the report have been predefined in the JinfonetGourmetJava.cat catalog file, so in this lesson, we do not need to create them ourselves. Follow the tasks below to finish creating the report: Task 1: Create the tabular report Task 2: Add components to the tabular report Task 3: Format the report Task 1: Create the tabular report 1. From the File menu in JReport Designer, select New >Page Report. 2. In the New Page Report dialog, clear the text in the Report Title text box, select Tabular from the layout box, then click OK. Be sure that JinfonetGourmetJava.cat is specified as the current catalog because it is the catalog we use in this track. For information about specifying this catalog, see Task 1, Step 2 of Lesson In the Tabular Wizard, keep the default settings and then click Finish to create a 2*2 tabular.

73 4. A message dialog appears prompting you to drag and drop data fields and components to the blank report. Click OK in the message dialog to close it. Now a blank report with a 2*2 tabular is generated. In the Report Inspector, they are respectively named TabularCell and TabularCell1 (the two cells in the first row of the tabular); TabularCell2 and TabularCell3 (the two cells in the second row of the tabular). We can then insert different components into the cells, so that they can be easily aligned just by adjusting the tabular cells. The tabular fills the whole page panel, we can resize it by just dragging its cell borders. In this lesson, in order to make screen captures, we zoom out the tabular first. Task 2: Add components to the tabular report Before taking this task, make sure you have enabled the Insert field name label with field option in the Options dialog as noted at the end of Lesson 3. Otherwise, the name labels will not be inserted together with the fields when you add fields to the report. In this task, we will add three components - a crosstab, a chart and a banded object respectively to TabularCell, TabularCell2 and TabularCell3 and make them share the same dataset so as to improve performance. 1. Select TabularCell and TabularCell1 (the two cells in the first row of the tabular) by pressing the Ctrl button, right-click and then select Merge from the shortcut menu.

74 2. Select the merged tabular cell and click Insert > Crosstab. The Create Crosstab wizard appears. 3. In the Data screen of the wizard, check the New radio button, select the query ProductPerformance in Data Source 1, then click Next. 4. In the Display screen, add the Products_Product ID DBField to the Columns box, the Region_AbbreviationName formula to the Rows box, the Total formula to the Summaries box and specify its aggregate function as Sum. 5. Switch to the Style screen and apply the Classic style to the crosstab, then click Finish to close the Create Crosstab wizard and place the crosstab in the first tabular cell row. Next, we will insert the chart object to TabularCell2: 6. Select TabularCell2 (the left cell in the second row of the tabular) and click Insert > Chart. The Create Chart wizard appears. 7. In the Data screen of the wizard, check the Existing radio button, select the dataset ProductPerformance, then click Next. 8. In the Type screen, select the Bubble 2-D type and click Next. 9. In the Display screen, add the two summaries Count_QuantitybyProductID and Sum_ProductSalesbyProductID to the Y Axis and Radius respectively in the Show Values box. Then the DBField ProductID_FK1 will be added to the Category box automatically. Leave the Series box empty.

75 10. Switch to the Layout screen, select Title in the Options box, then specify Category(X) Axis Title as Product ID, and Value(Y) Axis Title as Quantity. Click Next. 11. In the Style screen, select Classic from the Style list. Click Finish to close the Create Chart wizard and drop the chart in TabularCell2. Next, we will insert the banded object to TabularCell3: 12. Select TabularCell3 (the right cell in the second row of the tabular), and then click Insert > Banded Object. The Create Banded Object wizard appears. 13. In the Data screen of the wizard, check the Existing radio button, select the dataset ProductPerformance, then click Next. 14. Switch to the Group screen and add the DBField ProductID_FK1 as the group by field. 15. Go to the Style screen and select the Classic style for the banded object. Click Finish to close the Create Banded Object wizard and then click in TabularCell3 to place the banded object in it. Now, the three objects look as follows in the tabular:

76 16. Delete the group by field in the GroupHeader panel of the banded object. 17. Drag the DBFields ProductID_FK1, Unit Price and the summary Count_QuantitybyProduct ID from the Resource View panel and drop them in the GroupHeader panel. 18. Adjust the added fields, move the three name labels to the BandedPageHeader panel, and then change the names of ProductID_FK1 and Count_QuantitybyProduct ID to Product ID and Quantity respectively. 19. Right-click in the BandedHeader panel and select Hide from the shortcut menu to hide it from view. Repeat this to hide all panels that do not hold data. Now the report shows as follows:

77 Next, we need a report title for the tabular report to make the report look professional. 20. Right-click the tabular cell that holds the crosstab, and then select Insert Row Above from the shortcut menu. 21. Double-click the newly-created tabular row, and enter the text Product Performance by Product ID as the report title, then select the text, right-click on it and select Font from the shortcut menu. 22. In the Font tab of the Format Text dialog, set Font to Arial, Font Size to 18, Font Color to Red and Bold to true, then click OK. The title appears as follows: In this lesson, we will use the Filter feature to limit data selected from the dataset to view the products performance from the Product ID 1 to 10. Since all the components in the report share the same dataset, the filter will be applied to all of them. 23. Click the Dataset Filter button on the toolbar of the Resource View panel. 24. In the Dataset Filter dialog, click the Add Condition button to add a filter line and specify the filter condition as ProductID_FK1 <= 10, then click OK.

78 Task 3: Format the report To improve the report appearance, we need to do some adjustments to the report, as well as the components in it: 1. Resize the tabular cells according to the components' sizes in every cell, so that they will not be truncated by the tabular and can display well. Next, we will further format to improve the appearances of the components. First, we will format the crosstab. 2. Select all the objects in the crosstab and then set their Font Face property to Arial and Font Size to Select the four DBFields in the crosstab, and specify their Height to 0.25, Width property to 0.59, and Format to #,###.# in the Report Inspector, so that their data can be displayed completely in the cells. Next, let's format the chart. 4. Double-click the label Quantity in the chart, then in the Font tab of the Format Label dialog, set Font Face to Arial, Font Size to 10pt and Font Color to Click OK to accept the settings. 5. Use the same way to format the label Product ID in the chart. 6. Right-click the chart and then click Hide Legend on the shortcut menu to hide the legend. Then, we will format the banded object. 7. Select all the objects in the banded object and then specify their Font Face property to Arial in the Report Inspector. 8. Select the three DBFields in the GroupHeader panel, set their Foreground property to Black and Bold to false. 9. Select the Unit Price DBField and then specify its Format property to $#,###.00.

79 After doing the adjustments, the report appears somewhat like follows in design view: According to the sketch, a line needs to be added below the report title. We can do this just by setting tabular cell properties. 10. Select the tabular cell holding the report title, then in the Report Inspector, specify its Top Line, Left Line and Right Line properties to none, Border Color to Gray and Border Thickness to When viewing the report, the crosstab object displays much closer to the line we just customzed and the other two components and looks too clumsy. We need to do some adjustments, which can be done easily by using the function of a tabular. 11. Right-click the tabular cell holding the crosstab, and then select Insert Row Above from the shortcut menu. Right-click the cell again and select Insert Row Below. Two rows are now added above and below the crosstab. 12. Resize the tabular rows to adjust the distances between the crosstab and the other components. 13. On the report tab bar, right-click the report tab and select Rename from the shortcut menu to rename the report tab as ProductPerformance. 14. Click File > Save to save the report as ProductPerformancebyProductID.cls. 15. Click the View tab, and the report appears as follows, depending on what formatting you have done to the components.

80 Note: If the report does not look correct, you can compare it to the final versions of the tutorial reports provided by JReport. To do so, you will need to save and close this catalog and open the TutorialReports.cat catalog file instead, which is located at <install_root>\demo\reports\tutorialreports. Lesson 7 summary In this lesson, we created a tabular report that contains a crosstab object, a chart object and a banded object. It represented the unit price, quantity and annual sales, and sales total in every region about the products, of which the product ID is less than or equals to 10. The category(x) axis of the chart showed the product ID, value(y) axis showed the quantities, and the size of bubbles showed the annual sales.

81 Lesson 8: Creating a report that contains a subreport Here we need to create a report that contains a subreport to show the order detail information, the related customers and employees information. This lesson shows a report combined with another report. When adding report A into report B, the report A is referred to as a subreport, while report B is considered as a primary report. We will first create a page report that contains two report tabs - one is about orders detail information, and the other is about a tabular report with two charts of different types. In this lesson, we take the first report tab in the page report as the primary report, and the second one as the subreport. So that we can insert the second report tab to the first one to show the sales total by orders in different order ID groups. Task 1: Create a page report that contains two report tabs Task 2: Insert a subreport to the report Task 1: Create a page report that contains two report tabs Before taking this task, make sure you have enabled the Insert field name label with field option in the Options dialog as noted at the end of Lesson 3. Otherwise, the name labels will not be inserted together with the fields when you add fields to the report. 1. Click File > New >Page Report on the menu bar. 2. In the New Page Report dialog, clear the text in the Report Title text box, select Banded from the layout box, then click OK. Be sure that JinfonetGourmetJava.cat is specified as the current catalog because this is the catalog we use in this track. For information about specifying this catalog, see Task 1, Step 2 of Lesson In the Data screen of the Banded Wizard, check the New radio button, select OrdersReport from the Imported SQLs node of Data Source Switch to the Style screen and select the Simple style for the report, then click Finish. A report with a blank standard banded object is created as follows: For users who wish to write their own SQL statement, JReport enables them to put the SQL statement into a file and then load them from this file. SQL files can work like queries in JReport. In this lesson, we need to group data by Order IDs, so we will add a group to the banded object. 5. Right-click the banded object and then select Banded Wizard from the shortcut menu. 6. In the Group screen of the Banded Object Wizard, add the DBField Orders_Order ID as the group by field, then click Finish.

82 7. Resize the GroupHeader panel of the banded object, drag the fields Customer_ Name, Orders_OrderDate, Contact_LastName and Orders_PaymentReceived from the Resource View panel and drop them into it. 8. Edit the Customer_ Name, Orders_OrderDate, Contact_LastName and Orders_PaymentReceived name labels to Customer Name, Order Date, Employee Last Name and Payment Received one by one. 9. Align the newly-added objects and resize them in the GroupHeader panel as follows: 10. Resize the group by field in the GroupHeader panel, add a label ahead of it and edit its text to "Order ID:".

83 11. Select the Order Date DBFields and set its Format property to MM/dd/yy. 12. Select the BandedPageHeader panel, click Insert > Label to add a label in it and edit its text to Order Details. The label will then be shown in every page as the report title. 13. Hide the BandedHeader, Detail, GroupFooter, BandedPageFooter and BandedFooter panels one by one by right-clicking the panel and selecting Hide from the shortcut menu. 14. Format labels and DBFields in the report to improve their appearance. Here, we will not describe the formatting process in detail, you can refer to Task 3 of Lesson 1 for assistance. Then the first report tab in the report is created to show the order detail information as follows in design mode: And the report looks as follows in view mode: 15. On the report tab bar, right-click the report tab and select Rename from the shortcut menu to rename the report tab as OrderDetailInformation.

84 Next, we will create the second report tab in the report. 16. Click File > New >Page Report Tab. 17. In the New Page Report Tab dialog, clear the text in the Report Title text box, select Tabular from the layout box, then click OK. 18. In the Tabular Wizard, keep the default settings and click Finish. A report tab with a blank 2*2 tabular is created. 19. Merge the tabular cells into two rows and adjust them in order to place the bar chart and pie chart vertically in the report tab. Next, we will insert the two charts into the tabular cells and have them share the same dataset as the OrdersDetailInformation report tab. 20. Select the first tabular cell and click Insert > Chart on the menu bar. 21. In Data screen of the Create Chart wizard, check the Existing radio button, select OrdersReport from the Imported SQLs node of Data Source 1, then click Next. 22. In the Type screen, select the Clustered Bar 2-D chart type and click Next. 23. In the Display screen, add the summary Sum_SQLProductSalesbyOrderID to the Show Values box, Orders_Order ID will then be added automatically to the Category box. 24. Switch to the Style screen and select Basic from the Style list. Click Finish to create the chart. 25. When a box attached to your mouse cursor, click the tabular cell to place the chart there. 26. Select the second tabular cell and insert a pie chart in it which uses the same dataset and displays the same data in the same style with the bar chart. 27. Right-click the bar chart and select Add Label from the shortcut menu. A label is then added to the chart.

85 28. Move the label to the top of the chart, then right-click it and choose Format Label from the shortcut menu to display the Format Label dialog. 29. In the General tab, change the label text to Current Orders for This Customer. 30. Switch to the Font tab, change Font to Arial, set Font Size to 12pt, Font Color to and click OK. 31. Add a label to the pie chart and format it using the same way and edit its text to Current Orders for This Employee. 32. Select ChartObject and ChartObject1 in the Report Inspector and change their Border Type properties to none; change the property Border Type to none for ChartLegendObject and ChartLegendObject1 as well. 33. Further format the two charts to improve their appearance if desired. For details about formatting chart, you can refer to Task 2 of Lesson 4. Now the second report tab in the report is created to show the sales total by orders.

86 34. On the report tab bar, right-click the report tab containing the charts and select Rename from the shortcut menu to rename the report tab as Sub_OrderDetails. 35. Click File > Save to save the report as OrdersReport.cls. Task 2: Insert a subreport to the report After creating the report, we can insert the subreport to the primary report by specifying relationships between them. In this lesson, we can specify different relationships between the primary report (the first one) and the two chart components in the second report tab by setting up different links between them. Then JReport will build a subreport for every order with the conditions, so that it is convenient to see the corresponding customer and employee information of every order. We want this subreport to be at the end of the existing reports, thus we need to add a second group header and add the subreport to the new header. 1. Click OrderDetailInformation on the report tab bar to switch to the report tab. 2. Right-click in the GroupHeader panel of the banded object and choose Insert Panel After from the shortcut menu. 3. Select the newly-added panel and click Insert > Subreport.

87 4. When a box attached to the mouse cursor, click the newly-added panel to place the subreport into it, and the Subreport dialog appears. 5. Click the Browse button, select OrdersReport.cls and then click Open. 6. Select Sub_OrderDetails from the Report Tab drop-down list. 7. Click the Add button beside the Component in Report Tab box in the Field tab, choose ChartObject in the Choose Component dialog, then click OK. 8. Build the relationship between the primary report and the selected chart object on the Orders_Customer ID field.

88 9. Click the Add button again, this time, choose ChartObject1 in the Choose Component dialog. 10. Build the relationship between the primary report and the second chart object on the Orders_Employee ID field. 11. Click OK in the Subreport dialog and the report tab will be inserted in the OrderDetails report tab as follows: Next, we will filter the dataset used by report tabs in the report so as to enhance the performance when running the report. 12. Click Report > Dataset Management on the menu bar to display the Dataset Management dialog. The Dataset Management dialog lists all the dataset used in the current report. In our report, all the components share the same dataset, so here only one dataset is shown. 13. Click the Filter tab, click the Add Condition button to add a filter line and set the filter condition as Orders_Order ID <= 3050, then click OK.

89 14. Click File > Save to save the report. 15. Click the View tab, the report tab that contains a subreport is displayed as follows: the primary report shows the orders detail information grouped by order ID, and the subreport shows the orders information by different customers and different employees respectively in the two charts.

90 Note: If the report does not look correct, you can compare it to the final versions of the tutorial reports provided by JReport. To do so, you will need to save and close this catalog and open the TutorialReports.cat catalog file instead, which is located at <install_root>\demo\reports\tutorialreports. Lesson 8 summary In this lesson, we created a report that contains a subreport. First we created a page report with two report tabs and the second report tab with two charts of different types. Then we inserted the second report tab as a subreport to the first report tab by setting up different links between them, so that we can see clearly how many orders the customer and the employee have respectively made. As you learned in this lesson, it is very convenient to build up a library of reports that act as components that you can add to various primary reports. Properly designed and used, subreports save a lot of time and effort in rapidly adapting your applications to changing user requirements and needs.

91

92 Lesson 9: Creating a parameter-based report In Lesson 1 of this track we created a page report that contains an order list report tab to show order lists of every month from 2009 to Now, the sales manager is asking for this same report but with different orders during a specified time. Instead of building a new report about orders in each order date, we will save the page report as a new one and then modify the dataset used by its report to meet the requirements. Task 1: Create the parameters Task 2: Modify the dataset of the report to use the parameters Task 3: Preview and test the report Task 1: Create the parameters 1. Click File > Open to open the report OrderListbyDate.cls created in the Lesson 1 in the JinfonetGourmetJava.cat catalog file. 2. Click File > Save As to save the report as OrderListbyDate_Parameter.cls. Then we begin to modify this report instead of the former one. 3. In the Resource View panel, click the <Add Parameter...> item in the Parameters node. 4. In the Create Parameter dialog, enter pstartdate in the Parameter Name field, specify Value Setting as Type-in Parameter and Value Type as DateTime, click the Add button to add a Value List field, enter "May 1, :00:00 AM" as the prompting value, and "Please input start date:" as the prompting text. Then click OK.

93 5. Repeat steps 3 to 4 to create another parameter with the following values: Parameter Name: penddate Value Setting: Type-in Parameter Value Type: DateTime Prompting Values: June 1, :00:00 AM Prompting Text: Please input end date: Task 2: Modify the dataset of the report to use the parameters In this task, we will apply the parameters created above to filter the dataset which is used by the report. Then when we view the new report, a message will prompt for us to specify the parameter values. In this way, we can get data that we need. 1. On the Resource View panel toolbar, click the Dataset Filter button. 2. In the Dataset Filter dialog, click the Add Condition button to add a filter line, select ORDER DATE from the field drop-down list, set >= as the operator, then click. 3. In the Expressions dialog, double-click the pstartdate parameter to use it as value of the filter condition. Then close the Expressions dialog.

94 4. Click Add Condition button to add another filter line. The relationship between the two filters will be And. 5. Specify condition of the newly added filter as follows:

95 6. Click OK in the dialog to apply the settings. Parameters can also be used to filter queries to limit their data. However, in this task, we cannot set the filter on the report's query. If we do that, all datasets based on the query will be affected, that is to say, the filter will also be applied to the report created in Lesson 1. Task 3: Preview and test the report After the steps above, the parameters will take effect when viewing the report by entering values in the Enter Parameter Values dialog. 1. Click the View tab to preview the report. JReport recognizes that the query is based on the value of two parameters, and therefore prompts for them as follows:

96 You may find that in the dialog, the parameter for specifying the end date is displayed ahead of the one for specifying the start date, which is not very professional, however, JReport allows you to customize the parameter order in the way you want. So next, we will change the parameter order to make the start date displayed at the beginning. 2. Click the Design tab to go back to design mode. 3. Click Edit > Parameter Order on the menu bar. In the Parameter Order dialog, select PStartDate and click Move Up, then click OK. 4. View the report again, then specify the start date and end date as required in the combo boxes or click the calendar button to select the date. 5. Click the Default button to generate the report output based on the default values for the parameters. The report is displayed as follows, showing information for orders from May 1, :00:00 AM to June 1, :00:00 AM only:

97 Note: If the report does not look correct, you can compare it to the final versions of the tutorial reports provided by JReport. To do so, you will need to save and close this catalog and open the TutorialReports.cat catalog file instead, which is located in <install_root>\demo\reports\tutorialreports. Readers of this report can now input any date to get orders with the time they need by using the parameters. Lesson 9 summary In this lesson we learned how to use parameters to change the dataset of a report dynamically. Parameters collected at runtime determine which records are selected and ultimately displayed in the report results.

98 Track 3: Creating Business Cubes and Report Cubes Report and business cubes provide a business intelligence OLAP style interface to data without requiring costly OLAP cubes. These cubes offer end users very powerful ad hoc capabilities, enabling them to slice and dice data at runtime using dimensions, measures and hierarchies (levels). For example, a simple date can be broken out into year, quarter, month, week and day dimensions that can be dragged onto the report. The end users that use business and report cubes to build ad hoc reports are referred to as business analysts, because, unlike a regular report end user, a business analyst will have to understand how to analyze the data and present it in an ad hoc report rather than just read or interact with the report. Report cubes and business cubes are built in JReport Designer and are maintained within catalogs. At runtime, report and business cubes appear the same. However, report cubes work on predefined static queries while business cubes dynamically generate queries at runtime as the user adds elements to the report. A business or report cube is built from four kinds of elements: categories, dimensions, measures, and detail information. Dimension objects are typical DBFields by which you want to group data. They present the availability and key performance of data, and characteristically return text data or dates, and answer the following question: who, when, what, where and which. Measure objects are typically numeric DBFields to which an aggregate function, such as Sum, is applied or they can be an existing summary from the catalog. Detail information objects are any DBField, typically they are values that you would want to display in the Detail section of a banded object. But they can be any type of DBField. Categories are simply folders for organizing the other three elements, and can be used to present a hierarchy to the business analyst. Meanwhile, to provide flexibility and convenience to business analyst playing with ad hoc reports, JReport provides two options to narrow down the records: Built-in filter: It is defined in JReport Designer for business cubes only and transparent to the business analyst running the business cube reports. Predefined filter: It is defined at the Designer side for both business and report cubes. Business analyst can apply the filters when designing/modifying reports based on the business/report cube. The business cube and the report cube created in this track are the basis for Track 8: Creating and Analyzing Ad Hoc Reports. It may be helpful to view the types of ad hoc reports that the business and report cube support, before you begin this track. You can read through Track 8 and then return to this track if desired. Lesson 1: Creating a business cube Lesson 2: Creating a report cube Note: A JReport Live license for JReport Designer is required in order to perform this track. If you do

99 not have a Live license please contact your Jinfonet Software account manager to obtain a license. Click the right arrow ( ) below to begin reading the track.

100 Lesson 1: Creating a business cube Business cubes are created from tables, views, formulas and summaries in a data source. In this lesson, we will create a business cube based on data in Data Source 1 of the JinfonetGourmetJava.cat catalog. This lesson contains the following tasks: Task 1: Add cube elements Task 2: Set up joins Task 3: Define hierarchies Task 4: Define built-in filters Task 5: Add predefined filters Task 1: Add cube elements 1. Click Start > All Programs > JReport 11.1 > Designer to start JReport Designer. The JReport Designer window and the Welcome to JReport Designer dialog appear. 2. In the Welcome to JReport Designer dialog, click the Catalog link in the Open category. 3. Browse to select the JinfonetGourmetJava.cat catalog file in <install_root>\reports\jinfonetgourmetjava, then click the Open button. The Catalog Browser displays. 4. In the Data tab of the Catalog Browser, expand the Data Source 1 > Relational > JDBC connection node, then rightclick the Business Cubes node and click Add Business Cube on the shortcut menu. 5. Enter BusinessCubeDemo in the Input Business Cube Name dialog and click OK. The Business Cube Editor displays.

101 Our business cube will have three categories: one for dimension objects, one for measures objects and another for detail information objects. 6. Click Insert > Category, then in the Category Property dialog, enter Dimensions in the Display Name text field and click OK. The Dimensions category is added to BusinessCubeDemo in the Business Cube panel. 7. Expand the Customers table in the Resources Objects panel, drag the fields Customers_City, Customers_State, Customers_Country, Customers_Territory and Customers_Region from the table and drop them on the Dimensions category.

102 By default, these fields are converted to dimension objects. Later we can define hierarchies on them. To have more control over the type of cube elements, the Edit Cube Element dialog can be used. 8. Right-click the Customers_City object and choose Edit from the shortcut menu. 9. In the Edit Cube Element dialog, change the display name of the object to City, and then click OK. 10. Repeat the above two steps to edit the display name of the objects Customers_State, Customers_Country, Customers_Territory and Customers_Region to State, Country, Territory and Region. 11. Drag and drop the fields Order Date from the Orders table, Product Name, Category and Product Type Name from the Products table, Employee Position from the Account Managers table onto the Dimensions category.

103 12. Edit the display name of the objects Product Type Name, Employee Position and Order Date to Product Type, Job Position and Sales Date as explained above. Besides dragging and dropping fields from tables onto category, the other way to add cube elements is by using the Add Cube Element dialog. Next, we will add more elements to the Dimension category via dialog. 13. Right-click the Dimensions category and select Add Cube Element from the shortcut menu. The Add Cube Element dialog appears. The default cube element type is Dimension chosen from the Type drop-down list. 14. Click the chooser button next to the Mapping Name field, then double-click Name in the Account Managers table in the Cube Element Resources dialog. 15. The display name of the dimension object is then automatically set as Name. Change it to Employee Name, then click OK in the Add Cube Element dialog to add the element. 16. Repeat Step 13 to 15 to add the dimension objects Sales Year, Sales Quarter, Sales Month and Sales Day from the formulas YearOfOrderDate, QuarterOfOrderDate, MonthOfOrderDate, and DayOfOrderDate. Next, we will create another category to hold the detail information objects we need. 17. Select the BusinessCubeDemo node in the Business Cube panel, click Insert > Category. 18. In the Category Property dialog, enter Detail Information in the Display Name text field and click OK. 19. Drag and drop Customer Name, Annual Sales, Address1, Customers_Phone and Customers_Fax from the Customers table onto the Detail Information category. 20. Right-click the Address1 object, select Rename from the shortcut menu to rename it as Customer Address. 21. Rename the Customers_Phone and Customers_Fax objects to Phone and Fax. 22. Expand the Orders table, drag and drop the fields Order Date, Required Date, Ship Date, Ship Via, Shipped and Payment Received onto the Detail Information category. 23. Drag and drop the field Products_Product ID from the Products table onto the Detail Information category, and then rename it to Product ID. 24. Expand the Formulas node, drag and drop CustomerCityStateZip and Total to the Detail Information category. 25. Rename the Total object to LineItemTotal. The fields are added as dimension objects by default, so we need to change their types to detail information.

104 26. Select all objects in this category by pressing the Ctrl or Shift key on the keyboard, then right-click them and select Edit from the shortcut menu. 27. In the Edit Cube Element dialog, change their types to Detail Info and click OK. Now that we have the detail elements exposed in our business cube, we need to add some related measures. 28. Select the BusinessCubeDemo node in the Business Cube panel, click Insert > Category, then in the Category Property dialog, enter Measures in the Display Name text field and click OK. 29. Right-click the Measures category and choose Add Cube Element. 30. In the Add Cube Element dialog, select Measure from the Type drop-down list, select the field Quantity from the Orders Detail table as the mapping field, choose Sum from the Aggregate Function drop-down list, edit the display name as Total Quantity, then click OK to add the element. 31. Repeat Step 29 to 30 to add the following measure objects: Display name: Total Discount Mapping field: Discount in the Orders Detail table Aggregate function: Sum Display name: Total Sales Mapping field: the Total formula Aggregate function: Sum Display name: Total Shipping Cost Mapping field: Shipping Cost in the Orders table Aggregate function: Sum Display name: Average Price Mapping field: Unit Price in the Orders Detail table Aggregate function: Average By now, the business cube is created and it consists of objects from tables and formulas, while the fields in the tables are independent of each other, so our next task is to set up some relationships between different tables. Task 2: Set up joins A business cube is based on tables (including views). By default, there is no relationship among the tables. In order to make them correlated, you need to define joins between them. In this task, we will build several joins between the tables we have added to the business cube.

105 1. In the Business Cube Editor, choose Tools > Join Editor to open the Business Cube - Join Editor window. All the tables that are added to the business cube are listed in the join panel. First, we will create a join between the Account Managers and Orders tables based on manager IDs. 2. Resize the two tables to make all column names in them fully displayed. 3. Scroll down the Orders table to make the AccountManagerID_FK1 column shown. 4. Position the mouse pointer over the column Account Manager ID in the Account Managers table, click and hold the left mouse button, move the mouse pointer to the AccountManagerID_FK1 column in the Orders table, then release the mouse button.

106 The join relationship is then established between the two tables, and a join named Join1 is automatically added to the All Joins panel in the Join Editor. 5. Repeat the above steps to set up the following joins: Join2, which joins the Customers and Orders tables based on customer IDs Join3, which joins the Orders and Orders Detail tables based on order IDs Join4, which joins the Products and Orders Detail tables based on product IDs After done, we will have four joins between tables in the business cube as follows:

107 6. Click Join > Save to save the joins and then close the Business Cube - Join Editor window. Task 3: Define hierarchies In this task, we define some hierarchies in the business cube. Hierarchies support drilling in the ad hoc report, that is, allowing measures to be calculated based on different levels. 1. In the Business Cube Editor window, choose Tools > Hierarchy Management. 2. In the Hierarchy Editor, click <Add Hierarchy...> in the Hierarchy list, then right-click the newly added hierarchy and select Rename from the shortcut menu to name it as Geography.

108 3. Select the Geography hierarchy and add the dimensions Region, Territory, State and City to it one by one. 4. Add a new hierarchy named Products, then add the dimensions Product Type, Category and Product Name one by one to the hierarchy. 5. Create another hierarchy named Time, and add the dimensions Sales Year, Sales Quarter, Sales Month and Sales Date one by one to it. 6. Add one more hierarchy named Employee, then add the dimensions Job Position and Employee Name one by one to the hierarchy. Now, four hierarchies have been defined in the business cube.

109 7. Click OK in the dialog to save the hierarchies and close the editor. Task 4: Define built-in filters In this task, we add a built-in filter to the business cube so as to discard some unwanted data. 1. Click the Filter button on the toolbar of the Business Cube Editor, and the Filter dialog displays. We only want the data of employees who are sales representatives or marketing staff. 2. In the Filter dialog, click the Add Condition button to add a filter line. 3. Click next to the field text box, then in the Cube Element Resources dialog, expand BusinessCubeDemo and then Account Managers, select Employee Position and click OK to return to the Filter dialog.

110 4. Select = as the operator. 5. Click next to the value text box. 6. In the Values dialog, select Employee Position in the Fields tab, then switch to the Value tab and double-click Sales Representative.

111 7. Close the Values dialog to return to the Filter dialog again. 8. Click the Add Condition button to add another filter line and specify the relationship between the two lines as Or from the logic drop-down list. 9. Set the condition of the newly added filter to be Employee Position = Marketing as explained above. 10. Click OK in the Filter dialog to save the built-in filter settings.

112 Task 5: Add predefined filters Built-in filter takes effect anytime when the business cube is adopted. However, predefined filter can be applied or not at runtime. 1. Click the Predefined Filter button on the toolbar of the Business Cube Editor, and the Predefined Filter dialog displays. We can add one or more predefined filters to the business cube. Here we will add two filters; one focuses on the sales information on the country USA in the year 2006 and the other discards data of products which is in the Seasonal category. 2. In the Predefined Filter dialog, click the New button to add a filter. 3. Double-click the filter name in the Name cell to rename it to USA2006, and provide a short description to the filter: Sales of 2006 in USA. 4. In the Condition panel, set the condition of the filter as Country = USA AND Sales Year = 2006.

113 The Condition panel is similar to the Filter dialog. We can set conditions to predefined filters as we do to built-in filters. 5. Click the New button again to add a new filter. 6. Name the filter NotMild and give a short description to the filter: Product category is not Mild. 7. Set the condition of the filter to be Category!= Mild.

114 8. Click OK in the Predefined Filter dialog to save the predefined filter settings. 9. Click File > Save in the Business Cube Editor window to save the business cube. Lesson 1 summary In this lesson, we created a business cube and added some cube elements in it, including categories, dimension objects, measure objects and detail information objects. Then, we set some hierarchies on the measure objects so as to enable drilling in ad hoc report. At last, we defined some filters on the business cube to narrow down the data scope.

115 Lesson 2: Creating a report cube Report cubes are based on queries, stored procedures, imported SQL files, or user defined data sources, and thus we cannot define joins or built-in filters in report cubes as we do for business cubes. Except that, the way to add cube elements, define hierarchies and set predefined filters in report cubes is the same as in business cubes. When the catalog is published to JReport Server, the business cubes and report cubes created in JReport Designer work the same in JReport Web. In this lesson, we will not explain the process for creating a report cube in detail. If you like, you can take the report cube created on the OrdersReport imported SQL file in Data Source 1 of the JinfonetGourmetJava.cat catalog for reference.

116 Track 4: Creating Business Views and Web Reports JReport provides the web reporting solution that is aimed at easier and faster report creation and design, faster report execution, easier customization, and better presentation style using a newer Rich Internet Application (RIA) Web 2.0 interface. Web reports are viewed using a new interactive viewer called JReport Studio. JReport Studio provides a much nicer end user experience with many powerful features for interfacing with a report such as changing parameters without re-running the report. The data sources that can be used to create web reports are business views that are resources built on top of queries. Business views are created and managed in JReport Designer. JReport Designer supports creating, opening, and editing of web reports. JReport Designer also allows for web reports created on JReport Server to be downloaded to Designer and further edited. In this track we will create a business view and a web report based on the business view. Lesson 1: Creating a business view Lesson 2: Creating a web report using JReport Designer Note: A JReport Live license for both JReport Designer and JReport Server is required in order to perform this track. If you do not have the licenses, please contact your Jinfonet Software account manager to obtain them first. Click the right arrow ( ) below to begin reading the track.

117 Lesson 1: Creating a business view A business view is similar to a report cube. Report cube dimensions are business view groups and report cube measures are business view aggregations. Create business views when your end users are primarily interested in higher quality presentation style reports. Use report cubes when users are primarily interested in analyzing the data from many dimensions. Both business views and report cubes can be built on top of the same query to support both types of users. Business views are created and managed in JReport Designer. A business view is built from four kinds of elements: Group objects are typical DBFields by which you want to group data. They present the availability and key performance of data, and characteristically return text data or dates, and answer the following question: who, when, what, where and which. Aggregation objects are typically numeric DBFields to which an aggregate function, such as Sum, is applied or they can be an existing aggregation from the catalog. Detail objects are any DBField, typically they are values that you would want to display in the Detail section of a table. But they can be any type of DBField. Categories are simply folders for organizing the other three elements. In this lesson, we will create a business view based on data in Data Source 1 of the JinfonetGourmetJava.cat catalog. This lesson contains the following tasks: Task 1: Create the query Task 2: Create the business view Task 1: Create the query In this lesson we will create a business view based on a query, so creating a query is our first step. The business view will provide data information about customers, orders, orders detail, and products, therefore we will make the query contain these tables and set up relationship among the tables. 1. Click Start > All Programs > JReport 11.1 > Designer to start JReport Designer. The JReport Designer window and the Welcome to JReport Designer dialog appear. 2. In the Welcome to JReport Designer dialog, click the Catalog link in the Open category. 3. Browse to select the JinfonetGourmetJava.cat catalog file in <install_root>\demo\reports \JinfonetGourmetJava, then click the Open button. The Catalog Browser displays. 4. In the Data tab of the Catalog Browser, expand the Data Source 1 > Relational > JDBC connection node, then right-click the Queries node and click Add Query on the shortcut menu. 5. Enter WorldWideSales in the Input Query Name dialog and click OK. 6. In the Query Editor window, click Query > Add Table on the menu bar. 7. In the Add Table dialog, select the tables Customers, Orders, Orders Detail and Products and click Add to add them to the query, then click Done to exit the dialog. The four added tables are displayed with their columns and automatically joined based on the auto join criteria.

118 8. In the Customers table, check the * checkbox to select all columns in the table, then uncheck these columns: Address2, Customers_Fax, and Annual Sales. In the Orders table, select Orders_Order ID, Order Date, and Payment Received. In the Orders Detail table, select Unit Price, Quantity, and Discount. In the Products table, select all its columns first by checking *, then unselect Inventory and Reorder Level. 9. Click OK at the bottom of the Query Editor window to create the query. Task 2: Create the business view 1. Right-click the Business View node in the newly created WorldWideSales query and select Add Business View from the shortcut menu.

119 2. Type in WorldWideSalesBV in the Input Business View Name dialog and click OK. The Business View Editor displays. We will create three categories in the business view to hold customer, order and product information respectively. 3. In the Business View panel of the editor, select WorldWideSalesBV and right-click, then select Add Category from the shortcut menu. 4. In the Category Property dialog, input Customers as the Display Name, then click OK. 5. Expand the Customers table in the Resource Objects panel, select the fields Customer Name,

120 Customers_City, Customers_Country, Customers_Region, Customers_State, and Customers_Territory in the table, then drag them into the Customers category in the Business View panel. 6. Change their display names using the shortcut menu option Rename to City, Country, Region, State, and Territory, by removing "Customers_". Then select the Customer Name object and click move it below Country. twice to 7. Create a sub category Address in the Customers category to hold address information. Move it above the

121 City group object by using the button. 8. From the Customers table in the Resource Objects panel, select Address1, Customers_Country, Customer Name, and Customers_Phone and add them into the Address category. 9. Select Customers_Country and right-click, then select Edit on the shortcut menu. In the Edit View Element dialog, edit its display name to Country and its type to Detail, then click OK. Edit the display name of Customers_Phone to Phone and its type to Detail using the same way. Also edit the type of Address1 and Customer Name to Detail.

122 By now the Customers category is finished. Next, we are going to create the Order Detail category. 12. Create a category Orders Detail in WorldWideSalesBV. Add these fields from the Resource Objects panel into the category: all the fields from the Orders and Orders Detail tables, Cost from the Products table. Modify the display name of Orders_Order ID to Order ID. Change the type of Cost, Discount, Order Date, Quantity and Unit Price to Detail. Arrange the order of the view elements: move Cost to the top, move Discount below Cost. See the result:

123 View elements can also be added into a business view by using dialog instead of dragging and dropping. Next, we are going to add more objects to the Order Detail category using dialog. 13. Select the Orders Detail category and right-click, then select Add View Element from the shortcut menu. 14. In the Add View Element dialog, type Total Cost in the Display Name text field, click next to the Mapping Name text field to select Cost from the Products table, set Type to Aggregation, select Sum from the Aggregate Function drop-down list, then click OK.

124 15. Create another two aggregation objects Total Quantity which sums on Quantity and Total Sales which sums on the formula Total, and a detail object Total which is mapped to the formula Total using the same way. 16. Arrange the objects in the Orders Detail category in alphabetical order:

125 Next, we will create the Products category to hold product related information. 17. Create a category Products in WorldWideSalesBV, add Category, Product Name, Product Type Name, and Products_Product ID from the Products table in the Resource Objects panel to it, modify the display names of Product Type Name to Product Type and Products_Product ID to Product ID, then arrange the objects in alphabetical order.

126 18. Save the business view and exit the editor. Lesson 1 summary In this lesson, we created a query and then a business view based on the query. Besides this, there is simpler and faster way to create a business view: if there is already a report cube that contains the data for your business view, right-click the report cube, then select Create Business View from the shortcut menu. A business view following the structure of the report cube will be created.

127 Lesson 2: Creating a web report using JReport Designer In this lesson we will create a web report as the role of a report developer, based on the business view WorldWideSalesBV created in the previous lesson. The report will show each product's sales information, including order ID, order date, quantity, unit price, discount, and the total sales for each order. We will use a table to display the information, plus a chart to demonstrate the total sales of each product. In order for end users to see sales information within a specific range, such as region, country, category, product name, or product type, we will add filter controls for dynamically filtering the data according to their requirements. This lesson contains the following tasks: Task 1: Create the initial report Task 2: Format the web report Task 3: Preview the web report Task 1: Create the initial report 1. On the JReport Designer menu bar, click File > New > Web Report. A blank report is created. Be sure that JinfonetGourmetJava.cat is the current catalog because it is the catalog where WorldWideSalesBV is created. For information about specifying this catalog, see Task 1, Step 2 of Lesson 1 in Track Right-click the report body, select Split from the shortcut menu. 3. In the Split Cell dialog, set both numbers to 2, then click OK. The report body will be hosted by four tabular cells. We will put the filter controls in the left cells, a chart and a table in the right cells. First we create a chart to demonstrate the total sales of each product. 4. Drag Chart from the Toolbox panel to the right cell in the first tabular row. The Create Chart wizard appears. 5. In the Data screen, select WorldWideSalesBV in Data Source 1. Click Next. 6. In the Type screen, check the Single chart radio button, select Bar as the chart type and Clustered Bar 2-D as the sub type, then click Next. 7. In the Display Screen, add Product Name to the Category box and Total Sales to the Show Values box. 8. Switch to the Style Screen, select ClassicBlue as the chart style, then click Finish to create the chart. Next, we will create a table to display the sales information just below the chart. 9. Drag Table from the Toolbox panel to the right cell in the second tabular row. The Table Type dialog appears.

128 10. Keep the default selection in the Table Type dialog and click OK. The Create Table wizard is displayed. 11. In the Data screen of the wizard, select WorldWideSalesBV in Data Source 1, then click Next. 12. In the Display Screen, add the following fields to be displayed in the table: Order ID, Order Date, Quantity, Unit Price, Discount, and Total. Click Next. 13. In the Group screen, add Product Name as the group by field. 14. Switch to the Style Screen, then select Neutral as the table style. 15. Click Finish to create the table. 16. Resize the cell the table is in to make all columns in the table shown. The report displays as follows:

129 We will add two filter controls for end users to dynamically filter data according to their requirements. 19. Drag Filter Control from the Toolbox panel to the first tabular cell, then in the Insert Filter Control dialog, select Country and click OK. The filter control will be inserted. End users will be able to select one or more countries in it, the selected values will be applied to the previously created table and chart to show data based on the values. 20. Insert another filter control in the below tabular cell, based on the field Product Type using the same way. We will add a navigation control which helps end users deal with the filter applying status in all the filter controls in the report: go back to the previous filter applying status, go forward to the next, or clear all the filter applying histories. We will create the navigation control above the chart in the report. 21. Select the cell the chart is in, right-click and select Insert Row Above from the shortcut menu. 22. Select the right cell in the newly added tabular row, then in the Report Inspector, set its Height property to Drag Navigation Control from the Toolbox panel to the right cell in the newly added tabular row, that is the cell above the chart. Lastly, we will insert an image to show the title of the report in the report page header. 24. Select the tabular cell in the report page header, in the Report Inspector, set its Height property to Drag Image from the Toolbox panel to the page header, in the Select an Image dialog, select ProductSalesHeader.gif, then click Open. Then select PageHeaderPanel in the Report Inspector to move the focus out of the image so as to cancel the scrollbars around the image. The report now appears as follows in design view:

130 Task 2: Format the web report To improve the report appearance, we need to do some adjustments to the components in the report. First, we will format the chart. 1. Select the chart, or the ChartObject node in the Report Inspector, then resize it to make it fully occupy the cell that holds it. 2. Keep the chart selected, in the Properties panel of the Report Inspector, set the Show Legend property in the Platform category to false. 3. Right-click on the chart, select Format Axes > Format Category(X) Axis from the shortcut menu. 4. In the Format Category(X) Axis dialog, switch to the Orientation tab, check the Angle radio button, set the value to -35 deg, then click OK. By doing this, we can make the tick mark labels on the category axis displayed completely. 5. Right-click on the chart again and click Format Axes > Format Value(Y) Axis on the shortcut menu. 6. In the Format Value(Y) Axis dialog, go to the Format tab, select Number from the Category box, select $#,##0 from the Format box, then click Add to add the format in the Stack box. Click OK to exit the dialog. Next, we will format the table: 7. Select the table header (TH) row, then in the Properties panel, set its Background property to 0x7da1d1.

131 8. Select the group header (GH) row and set its Background property to 0xeeeeee. 9. Select the group by field in the group header, resize it horizontally to make sure the product names won't get truncated, then in the Report Inspector, set its Foreground property to 0x7da1d Select the Order Date DBField in the detail row, set its Format property in the Text Format category to MM/dd/yyyy. 11. Select the Unit Price and Total DBFields in the detail row and set their Format property to $#,###.00. Modify Discount's Format property to #,##0.00. The chart and table now look as follows: Next, we will format the two filter controls and the navigation control: 12. Select the Country filter control, resize it to make it the same size as the tabular cell that holds it. Resize the other filter control too. 13. Select the nodes that represent the two filter controls in the Report Inspector, then in the Properties panel, set their Border Color property in the Border category to 0x7ca2cf, and Background in the Title category to 0x7ca2cf. 14. Select the three buttons in the navigation control, in the Report Inspector, set their Bold property to true, Background to 0x7ca2cf, and Foreground to White. The cell above the Country filter control is empty, to improve the report layout, we will make the cell merged with the cell that holds the Country filter control. 15. Select the empty cell and the cell the Country filter control is in by pressing the Ctrl button, right-click and select Merge from the shortcut menu. If you find it difficult to select the cell that holds the Country filter control, you can first select the filter control, then go to the Report Inspector, select the parent node of the filter control which represents the tabular cell. 16. Resize the Country filter control once again to make it fully occupies the merged cell. After doing the adjustments, the report appears somewhat like follows:

132 17. Click File > Save to save the report as Products.wls. Task 3: Preview the web report In this task we will preview the web report and perform some operations on it in JReport Designer. End users can also do the same thing on the web report after it is published to JReport Server. 1. Click View > Preview As > Web Report on the menu bar. The report is opened in JReport Studio.

133 First, we will change the chart type to area. 2. Click Edit Mode on the toolbar to switch JReport Studio to the edit mode. 3. Select the chart platform, you will find the button available on the toolbar. Click the button, go to select Area > Area 2- D from the drop-down menu. The chart now looks as follows:

134 The table contains a lot of data. However, we would like to view data about total orders larger than $5000. So next, we will apply a filter to the table to narrow down data displayed on it. 4. Click the Filter button on the toolbar. 5. In the Filter dialog, select TableComp from the Apply to drop-down list, compose the condition as Total >= '5000', then click OK. The table is now displays as follows: Next, we will apply a conditional formatting to the table to highlight the order IDs with the order quantity more than Right-click in the Order ID column, and select Conditional Formatting from the shortcut menu. 7. In the Conditional Formatting dialog, click to open the Edit Conditions dialog, set the filter condition to Quantity >= '1000', then click OK to return to the Conditional Formatting dialog. In the Format box, set Background Color to #ffcc00, then click OK. The order IDs meeting the condition will be highlighted:

135 Now, we want to use the filter controls to dynamically change data displayed in the report. Since the chart and table are based on the same business view, the filters created via the filter controls will be applied to them both at the same time. First, we want to view the sales in Canada. 8. Click Canada in the Country filter control, then the chart and table is refreshed to display the data for Canada only.

136 9. To further view the product type Regular's sales in Canada, select Regular in the Product Type filter control. The report will be refreshed to show the corresponding data: 10. Now we would like to see Decaf's sales in all of the countries. Since the current report data is for Canada, we need to remove the Canada filter. There are two methods to do this: in the navigation control above the chart, click Back twice to undo what we have just done in steps 8 and 9, or click Clear to simply remove the filter conditions added via the filter controls in steps 8

137 and 9. After back to the full data, click Decaf in the Product Type filter control, and you will see the desired data. 11. Exit JReport Studio. Lesson 2 summary In this lesson, we created a web report from the view of a report developer in JReport Designer and previewed it. Filter controls and navigation control are applied so that end users can view data within various specific ranges.

138 Track 5: Creating Library Components Library components are used by end users to build dashboards using JDashboard. JDashboard is a separately licensed product in JReport Server. Library components are created and edited in JReport Designer, and then published along with their catalog to the component library in JReport Server for use in dashboards. The data sources that can be used to create library components are business views that are resources built on top of queries, imported SQLs, stored procedures and all other data sources. Business views are created and managed in JReport Designer. For how to create a business view, see Lesson 1: Creating a business view in Track 4. In this track, we will create two library components in JReport Designer as the role of a report developer, based on the business view WorldWideSalesBV created in Track 4. One library component contains a table that shows each product's order details, including order ID, quantity, unit price, and the total sales for each order. Another library component contains a chart that demonstrates the total sales of each product. In order for end users to see sales information by order ID in the table, we will define to deliver a built-in message 0002-Sort between the two library components. We will also add a text field in the configuration panel of the table library component and use it to change the background color of the Quantity field in the table. In addition, we will add a slider to dynamically filter the data. Note: A JDashboard license for both JReport Designer and JReport Server is required in order to perform this track. If you do not have the licenses, please contact your Jinfonet Software account manager to obtain them first. This track contains the following tasks: Task 1: Create two library components Task 2: Deliver a message between the library components Task 3: Insert a slider to filter data Task 4: Use text field to change property value Task 1: Create two library components We will create two library components, including a table and a chart, then we can filter, sort, or change properties of them. 1. Click Start > All Programs > JReport 11.1 > Designer to start JReport Designer. The JReport Designer window and the Welcome to JReport Designer dialog appear. 2. In the Welcome to JReport Designer dialog, click the Catalog link in the Open category. 3. Browse to select the JinfonetGourmetJava.cat catalog file in <install_root>\demo\reports \JinfonetGourmetJava, then click the Open button. 4. On the menu bar, click File > New > Library Component to display the New Library Component dialog. 5. Input Product Order Details in the Library Component Title text field, select the Table (Group Above) component type, then click OK. The Table Wizard appears.

139 6. In the Data screen of the wizard, select WorldWideSalesBV in Data Source 1, then click Next. 7. In the Display Screen, add the following fields to be displayed in the table: Order ID, Quantity, Unit Price, and Total. Click Next. 8. In the Group screen, add Product Name as the group by field. 9. Switch to the Style screen and select Commercial from the style list, then click Finish to create the table. 10. Resize the group by field to make sure all the product names can be shown completely. The table displays as follows: 11. Click File > Save to display the Save Library Component As dialog, then input ProductOrderDetails.lc

140 into the Report Name text field and click Save. Next, we will create the second library component that contains the chart. 12. On the menu bar, click File > New > Library Component to display the New Library Component dialog. 13. Input Product Sales in the Library Component Title text field, select Chart from the component type box and click OK. The Chart Wizard is displayed. 14. In the Data screen of the wizard, select WorldWideSalesBV in Data Source 1, then click Next. 15. Keep the default selections in the Type screen, then click Next. 16. In the Display Screen, add Product Name to the Category box and Total Sales to the Show Values box. 17. Switch to the Style Screen, select ClassicBlue as the chart style. 18. Click Finish to create the chart. The chart displays as follows. 19. Click File > Save. In the Save Library Component As dialog, input ProductSales.lc into the Report Name text field and click Save. Task 2: Deliver a message between the library components In this task, we will define a sort message to be delivered between the two library components. We will use the chart to send the message, and the table to receive the message. 1. Right-click a bar in the chart and select Format 2D Bar from the shortcut menu to display the Format Bar dialog. 2. Switch to the Behaviors tab, select Click from the drop-down list in the Events column, then click in

141 the Actions column. 3. In the Web Action List dialog, select the *SendMessage action and click OK. 4. In the Send Message - Web Action Builder dialog, select the built in message Sort from the dropdown list, then in the Value column, select Descending from the drop-down list for the sort order.

142 5. Click OK to close the Send Message - Web Action Builder dialog. 6. Click OK in the Format Bar dialog to finish defining the message. 7. Click File > Save to save the library component. Next, we will define to make the table receive the sort message that will be sent out from the chart once the click action is triggered on the chart bars. 8. Click Window > ProductOrderDetails.lc on the menu bar to switch to the table library component. 9. Right-click the table and select Receive Message from the shortcut menu to display the Receive Message dialog. 10. In the dialog, click to add a message line, select the built-in message Sort from the dropdown list of the Message ID column, then click in the Actions column.

143 11. In the Sort dialog, select Order ID from the Sort On column and Descending from the Sort Value column, then click OK to close the dialog.

144 12. Click OK in the Receive Message dialog to finish defining the message. 13. Click File > Save to save the library component. Task 3: Insert a slider to filter data To see which products sell well, we can insert a slider to filter on the Quantity field for the table. 1. Drag Slider from the Toolbox panel to the blank area in the table library component. 2. In the Insert Slider dialog, select Range of Values as the slider type and Quantity from the resource list in the Select Fields box, then click OK.

145 You can also click the Customize button to customize the values you want to show on the slider. Here, we will use all the values in the Quantity field on the slider. The slider displays as follows in the library component: 3. Click File > Save to save the library component. Task 4: Use text field to change property value

146 In this task, we will insert a text field into the configuration panel of the table library component and use it to change the background color of the Quantity field in the table. 1. Check the Display Configuration Panel checkbox on the top-right corner to display the panel. 2. Drag Text Field from the Toolbox panel and drop it in the configuration panel. 3. Right-click the text field and select Web Behaviors > Change Property from the shortcut menu to display the Change Property - Web Behavior dialog. 4. In the dialog, select Quantity from the Apply Action To drop-down list, Background from the Properties drop-down list, and TextField from the Value drop-down list, then click OK. Then at runtime, end users can input a hexadecimal RGB value in the text field to change the background color of the Quantity field in JDashboard. Next we will add a label ahead of the text field to help end users identify what it is used for. 5. Drag Label from the Toolbox panel and place it ahead of the text field. 6. Double-click the label and edit its text to Background Color of Quantity. Resize the label to make the whole text in it shown. The label and text field display as follows in the configuration panel:

147 7. Click File > Save to save the library component. Track 5 summary In this track, we created two library components, defined a sort message to be delivered between the library components, added a slider to help end users filter data dynamically and used a web control to change object properties at runtime.

148 Track 6: Publishing, Running and Administering Resources In this track it is assumed that you are a report administrator. You need to receive the reports and library components which are designed in JReport Designer from the report developers and publish them to the JReport Server, so the end users can access them and view them. In this track you perform the following lessons: Lesson 1: Starting JReport Server Lesson 2: Publishing resources Lesson 3: Running reports Lesson 4: Scheduling reports Lesson 5: Administration of resources Lesson 6: Security Click the right arrow ( ) below to begin reading the track.

149 Lesson 1: Starting JReport Server In this lesson, you will learn how to start JReport Server, open the JReport Console, run a public report, and learn the other report control commands available from the JReport Console. Task 1: Start JReport Server Task 2: Access the JReport Console page Task 1: Start JReport Server The lesson assumes that you have installed JReport Server with its default configuration. If you changed the default locations or port numbers using Custom Installation, then you will need to adjust the instructions in this lesson accordingly. Start JReport Server in one of the following ways: Choose Start > All Programs > JReport 11.1 > Server > Start JReport Server. Double-click the JReport Server 11.1 shortcut on the Windows desktop. Run the JRServer.bat shell script in directory <install_root>\bin. These methods run the JReport Server in its default non-logging mode. The JReport Server can also be run in logging mode. In this mode, JReport Server writes key actions to a log file. This is useful when you encounter problems and need to see the actual SQL calls issued to the DBMS, performance issues when reports are taking too long to run or failures when a report does not run at all. To run with full logging, start JReport Server using DJRServer.bat in <install_root>\bin. After you issue the command to start JReport Server, a command window appears with various startup messages. When you see the message "JReport Server is ready for service.", you are ready to proceed to the next task. Do not close the command window. Task 2: Access the JReport Console page JReport Console page is an easy-to-use web-based interface of JReport Server for selecting, viewing and scheduling reports. To access the JReport Console page, follow these steps: 1. Click Start > All Programs > JReport 11.1 > Server > JReport Server Console, or open a web browser and set the URL to Internet Explorer, Firefox, and Google Chrome are browsers that have been certified to work with JReport products. However other browsers should also work fine. 2. On the Welcome to JReport User Console page, enter admin for the user name and admin for the password, then click Login. These are the initial user credentials built in to JReport Server. One of the first things an administrator should do is to set up the correct user credentials so that appropriate reports can be accessed by each user. The console window appears.

150 3. By default, the root folder is open when you log onto the JReport Console page. The User Directory panel is hidden on the left showing the folders of published reports that are available to this user (admin in our case). 4. Click Public Reports and then SampleReports. The report list, along with pertinent information, is displayed. 5. Focus on any of the report row, a floating toolbar is then displayed, which contains the following commands in the order from left to right:

151 Run Runs the report immediately using the default format. The default format is DHMTL. Advanced Run Runs the report immediately after collecting additional specifications from you, including which report tab to run for a page report, what output format to use, which style group to apply, and any encoding options. Schedule Runs the report based on a schedule. When you use Schedule to run a report, the request is placed into a queue and processed in order submitted. The size of the queue and priority of the queue can be configured to make the most efficient use of resources. Lesson 4 describes scheduled reports. Version Views report version and scheduled/advanced run result version information. Properties Does not run the report, but allows you to define the archive policy, security, and a description associated with the report. Lesson 6 describes security. Delete Deletes the report. Lesson 1 summary This lesson introduced the JReport Server and its web-based interface, JReport Console page. JReport Console page provides an intuitive way for end users to access the reports they need, run them on-demand or on a schedule, apply a different look and feel, and change the format in which they are output.

152 Lesson 2: Publishing resources JReport Server is only able to run reports and use library components that have been published to it. As you saw in the previous lesson, some reports are automatically published to JReport Server, in the Public Reports folder. In this lesson, we publish the reports and library components in the JinfonetGourmetJava.cat catalog. A report or library component must initially be published along with its catalog. Updates to the resource can be published independently, as long as the catalog associated with the resource remains published. This allows you to quickly and easily install a change to a resource in the runtime environment. In this lesson, you can publish the catalog, reports and library components that you developed in previous tracks. If you haven't complete those tracks or do not want to use your own, you can use the version of the JinfonetGourmetJava catalog offered by JReport Server, which is located at <install_root>\demo\jinfonetgourmetjava. This lesson contains the following tasks: Task 1: Publish reports Task 2: Publish library components Task 1: Publish reports 1. On the JReport Console > Resources page, open the My Reports folder. 2. Click Publish > To Local Server on the task bar of the Resources page. The Publish to Local Server page is displayed:

153 3. From the Resource Type drop-down list, select Folder with Contents if it is not already selected. The Resource Type list allows you to specify the resource, the catalog, report, or folder with these objects, to be published to the My Reports or Public Reports folder of JReport Server. 4. Click the Browse button next to the From Folder field, and then browse to select the <install_root>\demo \JinfonetGourmetJava directory. 5. In the Resource Node Name field enter JinfonetGourmetJava. 6. In the Resource Description field enter Jinfonet Gourmet Java catalog and reports. 7. Click OK to publish the resources. After the resources have been successfully published, the JinfonetGourmetJava folder is displayed in the resource tree. 8. Click the folder name JinfonetGourmetJava and the reports in the folder are listed:

154 Task 2: Publish library components 1. On the JReport Console > Resources page, open the My Components folder. 2. Click Publish > To Local Server on the task bar of the Resources page. The Publish to Local Server dialog will be displayed. From the Resource Type drop-down list, select Folder with Contents if it is not already selected. This type allows for a folder with library components, a catalog, and sub folders containing these objects to be published. 3. Click the Browse button next to the From Folder field, and then browse to select the <install_root>\demo \JinfonetGourmetJava directory. 4. In the Resource Node Name field enter JinfonetGourmetJava. 5. In the Resource Description field enter Jinfonet Gourmet Java catalog and library components. 6. Click OK to publish the resources. After the resources have been successfully published, the JinfonetGourmetJava folder is displayed in the resource tree. 7. Click the folder name JinfonetGourmetJava and the library components in the folder will be listed.

155 Lesson 2 summary This lesson described how resources, catalogs, reports, and library components, are published on JReport Server.

156 Lesson 3: Running reports This lesson describes how to run reports from JReport Console. This lesson represents one way that end users could access and run published reports. Reports that are embedded in a Java application would not be accessed from JReport Console, but instead from the Java application. The interaction with the report itself however would be the same as described here. The reports you view in this lesson are in the JinfonetGourmetJava folder, which is the folder you published them to in Lesson 2 > Task 1 of this track. Task 1: Run a DHTML report Task 2: Run a parameter-based report Task 3: Save a report in a different format Task 4: Navigate and search report Task 1: Run a DHTML report A DHTML report uses dynamic HTML to allow end users to interact with the report and change what is displayed. JReport provides a set of built-in commands that take advantage of DHTML functionality to provide a powerful way to interactive report such as refreshing the data (running the underlying queries), changing the sort order of the data on the report, or filtering the data so that only a subset of records are displayed. The DHTML interface benefits a lot. Each end user can customize his own report to his favorite. The report does not have to be redesigned or even re-run. The report template and future runs of the report template are not affected. 1. On the JReport Console page, go to the My Reports > JinfonetGourmetJava folder. 2. Click the ShipmentDetailsbyCustomer.cls link to run the report. A separate web browser window opens, with the report result for the ShipmentDetails report tab in the page report:

157 3. Click the Interactive View link on the toolbar to locate the full toolbar commands. Before we interact with the report to change how the data displays, review some of the basic and useful toolbar commands: The navigational commands: first page, previous page, next page and last page. The current page and total number of pages. Commands for analyzing reports. 4. On the toolbar, click the Sort button. This allows you to sort the results using any of the field values. The field values are automatically provided based on the DBField names but you can also reset these names to any that you want to use when creating the report in JReport Designer. For details, see Customizing the field display names in the DHTML Features chapter of the JReport Designer User's Guide. 5. In the Sort dialog, select SHIPPING COST from the field drop-down list, then click OK. The report appears with records in each group sorted by the SHIPPING COST values. By default, the sort order is set to Ascend. 6. On the toolbar, click the Filter button. 7. In the Filter dialog, set the filter condition to SHIP VIA = United Packing. Click OK to apply the filter.

158 The report now displays records shipped via United Packing only in each group, sorted by the SHIPPING COST value. It is easy and convenient for an end user who needs this specific information to view this report. The report format is quickly restructured, but the report template is not changed. It will not affect other people to run this report. 8. Click the close button of the browser window to close the report viewing window. On the DHTML menu, there is an important command that we will not step through in this lesson: the Refresh command. Refresh accesses the DBMS and re-selects all of the data. Refresh is useful when data is changing dynamically and you want to see the latest information from the DBMS. Task 2: Run a parameter-based report As you saw in Lesson 8 of Track 2, parameter-driven reports are another way to have a dynamic report. Unlike DHTML reports, parameter-driven reports allow the end users to specify the data that they want to see before the query is issued to the database. By only selecting the data that the report needs, the query is more efficient. When a parameter-based report is run, JReport Server automatically generates an HTML page to prompt the user for the expected values. Default values, if included in the report template definition, are also displayed. To run the parameter-based report: 1. In the JinfonetGourmetJava folder, click the OrderListbyDate_Parameter.cls link. A new web browser window opens for you to enter the parameter values. The report template includes start date of May 1, 2009 and end date of June 1, 2009 as default. You can click Submit button to admit these defaults, or you can type new values to view the report.

159 2. The requested report is displayed showing only order details from May 1, :00:00 AM to June 1, :00:00 AM. The DHTML toolbar is included, and the toolbar commands can again be used as they were in the previous task. Task 3: Save a report in a different format The Advanced Run command allows you to specify additional properties when running a report, for example you can specify a different report format instead of the default one. Options available include Applet, HTML, PDF, Text, Excel, Postscript, Rich Text Format (RTF), XML and DHTML. In this lesson we will run the report as PDF format. 1. In the JinfonetGourmetJava folder, click in the CustomerContactCard.cls row, right-click in the row and then select Advanced Run from the shortcut menu. 2. Click the Format tab and select PDF from the Select Format drop-down list, as shown below:

160 For this lesson, the additional options in the Advanced Run page are not used. However these options can be quite useful in real reporting scenarios. For example, you can specify database credentials under which the query should execute, or apply a style group so that the report has a different look and feel. 3. Click the Finish button. The report is displayed as a PDF file in your web browser. You can now browse the report, print it, it to a co-worker, or save it to your local disk using the Adobe Reader commands.

161 The PDF file is assigned a unique name and saved in \temp; by default is C:\JReport\Server. Task 4: Navigate and search report In this task, we return to the DHTML toolbar and explore two more of its powerful commands: TOC Browser and Search. 1. In the JinfonetGourmetJava folder, click the EmployeeInformation.cls link. The report tab EmloyeeDetails in the page report displays in a new web browser window. 2. Click the Interactive View link on the toolbar to locate the full toolbar commands. 3. Click Menu > View > TOC Browser to display the following TOC Browser panel: From the TOC Browser panel you can simply click on an entry to scroll the report display to that section. JReport Server also supports full text search of reports. 4. On the toolbar, click the Search button. 5. In the Search dialog, choose the field on which you'd like to search from the Search Field drop-down list, specify the value range and then enter any specific field values. For example, to search for the hire date 07/23/03, enter the values as follows:

162 6. Click Search to start the search. The report display moves to the correct location. Lesson 3 summary This lesson described the ways in which published reports can be run, including how the DHTML toolbar allows an end user to sort and filter data in the report. This lesson also showed a parameter-based report which allows an end user to choose the data displayed in the report. Lastly, this lesson showed how to export a report to PDF, search a report, and use the TOC Browser to navigate a report.

163 Lesson 4: Scheduling reports In Lesson 3 of this track we ran published reports by using the Run command in the JReport Console page. Reports run in this way are on-demand reports. By contrast, JReport Server allows reports to be scheduled, that is, automatically run at one or more designated dates and times. Scheduled reports can greatly improve the performance of the reporting service in an organization. For example, reports can be run during low network traffic times. Scheduled reports can capture a time period exactly, for example the last day of the quarter. A scheduled report is not delivered to an end user in the same way an on-demand report is. There are six destinations for scheduled reports: Publish to Versioning System Publish to File System Publish to Publish to Printer Publish to Fax Publish to FTP In this lesson, we explore three of these: Example 1: Publish a report to the versioning system Example 2: Publish a report to the file system Example 3: Publish a report to the printer Example 1: Publish a report to the versioning system The built-in JReport Server Versioning System is a virtual file system maintained by JReport Server. In this lesson we will set up a schedule to run a report immediately and specify that the generated result be kept for 30 days. Even though we run the task immediately, the result is scheduled to run through the JReport Server scheduling system. Another advantage of scheduling a report is that it can be saved in the versioning system while normally on-demand reports will not be saved unless explicitly saved by the user. 1. On the JReport Console page, go to the My Reports > JinfonetGourmetJava folder. 2. Select the row with the OrderListbyDate_Parameter.cls report, right-click in the row and then select Schedule from the shortcut menu. The General tab of the Schedule page appears. The report tab OrderDetails is selected by default to be scheduled. 3. Enter ToVersion in the Schedule Name text field. 4. If desired, you can enter new parameter values or keep the default values. 5. Expand the Report Information section. From both the Report Version and Catalog Version drop-down lists, choose the most recent report and catalog versions.

164 6. Expand the Advanced section, and select Use the DB user and password defined in catalog option if it is not selected. 7. Click Next to go to the Publish tab. 8. In the Publish tab, click To Version and then check Publish to Versioning System. The publishing options appear. 9. Select the DHTML format, check the Result Auto-delete checkbox and set Result Expires in 30 Days. 10. Switch to the Conditions tab to continue. 11. In the Time sub tab, choose Run this task immediately from the Time Type drop-down list. The Time Zone field should represent your current time zone. 12. Click Finish to submit the task. You can monitor the status of the report by viewing the My Tasks page (to access this page, click My Tasks on the system toolbar). Reports that are running are listed in the Running tab; when complete they will be moved to the Completed tab. Reports which are scheduled but have not yet run are listed in the Scheduled tab. Once you see that the report you scheduled is listed in the Completed tab, you can view the report results as follows: 1. Select the row that the report is in, right-click in the row and select Version from the shortcut menu. 2. In the Report Result Versions tab, click the DHTML link in the Result column. The full DHTML report is displayed.

165 Example 2: Publish a report to the file system In this lesson we set up a schedule to output a weekly sales report to the file system. The report is run every Sunday night so it will be available first thing on Monday morning. 1. On the JReport Console > Resources page, go to the My Reports > JinfonetGourmetJava folder. 2. Select the row with the CustomerContactCard.cls report, right-click in the row and select Schedule from the shortcut menu. 3. In the General tab, enter ToPDF as the schedule name and select the report tab CustomerInformation in the report. 4. Click the Publish > To Disk tab, and then check Publish to Disk. 5. Check PDF. The PDF options appear. 6. From the drop-down list, choose Publish to Server Resource Tree and directly below the list enter /CustomerContactCard.pdf. This publishes the report in the server resource tree under the name /CustomerContactCard.pdf. The Server Disk Path is set by default to <install_root>\jreports thus if we want to place the output file in the <install_root>\jreports folder the path must start with a /. Alternatively we could enter a full path on the server if we wanted the file to be created outside of the server resource tree. 7. Select the Conditions tab to specify the time when the task is to be performed. 8. In the Time sub-tab, choose Run this task periodically from the Time Type drop-down list. Select Weekly from the Date drop-down list and define to repeat every one week on Sunday. Select At from the Time drop-down list and specify the time as 9:00 PM.

166 Although we won't use it in this lesson, the Notification tab allows you to specify notifications to be sent automatically when the report is finished or if it was unable to complete successfully. 9. Click Finish to submit the scheduled report request. Since it isn't practical to wait until Sunday night to see the report in our lesson, we're going to cheat a bit and request an early version of the report. 1. Click My Tasks on the system toolbar. The report we requested above should appear as a scheduled task. 2. Select the task and click Run on the task bar of the My Tasks page to immediately schedule the report. You can find the report using Windows Explorer in <install_root>\jreports\customercontactcard.pdf. Example 3: Publish a report to the printer In this lesson we set up a schedule to output a form letter report to the printer on a monthly basis. The form letter is to be sent to delinquent customers. 1. On the JReport Console > Resources page, go to the My Reports > JinfonetGourmetJava folder. 2. Select the row with the ProductSalesAnalysis.cls report, right-click in the row and select Schedule from the shortcut menu. 3. In the General tab, enter ToPrinter as the schedule name and select the report tab ProductSales in the report. 4. Click the Publish > To Printer tab, then check Publish to Printer. 5. Fill out the tab according to your requirements and the printer settings.

167 6. Click the Conditions tab, and then click the Time sub tab to specify the time when the task is to be performed. 7. From the Time Type drop-down list, choose Run this task periodically, select Monthly from the Date drop-down list and select to run The 1st Day of every 1 month(s) and 7:00AM as the time. 8. Click Finish to enter the scheduled report request. 9. Click My Tasks on the system toolbar. When the task is running, you can see the record of this task in the Running table and it will be put into the Completed table when the task is finished by the server. You probably want to go to the Scheduled tab and delete this entry so it does not print to your printer every month! 10. Exit the JReport Console page by clicking the Logout link.

168 Lesson 5: Administration of resources JReport Server provides Administration pages that allow the system analyst, report administrator, or application server administrator to manage the resources and operations of JReport Server. This lesson describes the administrative tasks that you can perform through the Administrative pages. Task 1: Access the JReport Administration page Task 2: Review the Resources page Task 3: Review the Configuration page Task 4: Understand the Monitor page Task 5: Review the remaining pages Task 1: Access the JReport Administration page 1. Click Start > All Programs > JReport 11.1 > Server > JReport Server Administration, or open a web browser and set the URL to 2. In the Sign in dialog, enter admin for the user name and admin for the password, then click Login. These are the initial administrative user credentials built in to JReport Server. One of the first things an administrator should do is to set up the correct user credentials so that appropriate access to the reports is granted. The JReport Administration page is displayed:

169 Task 2: Review the Resources page The Resources panel of JReport Administration lists the resources that have been published to JReport Server. The User Directory is hidden on the left showing the folders of published resources. By default, the root folder is open when you first log onto JReport Administration page. The resource list shown in the Resources panel is similar to that in the JReport Console; however, the report name is not a link and there isn't an interface to run a report. The Versions button allows you to set the maximum number of versions of report results to keep in the JReport Version library. When reports are run, either in Advanced mode or scheduled, the report results are stored in the Version library. The report administrator can control how many versions to maintain for each report. The NLS Editor button allows you to translate a report into a different language from the original one. The Cube Security button allows you to update a catalog's report cube, business cube and business view permission settings without re-publishing the catalog. Another two buttons, Properties and Delete, are the same as described in Lesson 1 of this track. Task 3: Review the Configuration page The Configuration page allows you to control the operation of JReport Server as follows: The Service panel is used for setting attributes of the HTTP connection. The Log panel gives you fine grained control of what information is logged. The Performance panel allows you to specify preloading particular catalogs and reports in cache so they will be faster to access the first time they are used. The Advanced panel is a miscellaneous set of options and settings. The LDAP panel allows you to configure LDAP as a security provider for JReport Server. A large number of different LDAP products are supported. In order to use them, a detailed knowledge of how to talk to your LDAP product is required. The Export panel allows you to set up the linkage to your SMTP server to enable sending report results and notifications via , to configure your FAX hardware and software settings, and to define the precision level with which the report result will be exported. You cannot distribute reports via or fax until these settings are configured. The Connection panel allows you to reload the connection settings after datasource.xml file is modified when JReport Server is running. The Connection Pool panel is used to keep cached connection for reuse. The Upload panel allows you to specify the allowed image size and types for the images which are uploaded from the local file system when end users insert images into reports in JReport Viewer. The Custom Field panel allows you to define and manage user defined fields which can be used as resource properties in JReport Server. Task 4: Understand the Monitor page JReport Server Monitor allows system administrators to log, monitor and report on real-time system status and the performance of the JReport Server. It can be accessed via any web browser, enabling administrators to remotely monitor and manage JReport Servers. JReport Server Monitor allows you to track the status of JReport Server, see what reports are running or have run as well as which users are accessing the system. JReport Server Monitor is downloaded separately from JReport Server, and must be installed before this page can be used.

170 Task 5: Review the remaining pages Security Allows you to create and manage realms, users, groups, roles, privileges, and alias. This is required if you are going to use My Reports so that users will only see their own reports in the My Reports folder. For more details about security, see Lesson 6 in this track. Profile Allows you to customize general settings of JReport Server, JReport Viewer, JReport Studio and JDashboard. The Customize Profile panel is particularly useful to control the options that are displayed when users view reports in JReport Viewer, or dashboards in JDashboard. Cluster Allows you to set up groups of servers in a clustered environment. Triggers Allows you to create and manage triggers. Data JReport Server needs to read and write to a DBMS system to store information about the server and the available reports and report version. By default the DBMS is the 100% Java Apache Derby DBMS embedded in JReport. This can easily be changed to use your preferred DBMS such as Oracle or MySQL. Cache Allows you to cache data, reports, security objects, and images. These settings affect how quickly resources can be accessed; however, the more resources that are cached, the more memory is used and thus would harm performance rather than increase performance. Exit JReport Administration pages by clicking the Logout link in the upper right corner of the page. Lesson 4 summary This lesson briefly introduced the JReport Administrative page.

171 Lesson 6: Security JReport Server provides a security system that protects the resources on the server from inappropriate access by users. In addition to controlling resource-level access, the security system can control access to certain fields or certain information based on the user's role or group level information. As an alternative to the built-in security system, an LDAP Server can be used for JReport Security. JReport provides interfaces to synchronize with a variety of LDAP servers as well as directly authenticate to an LDAP directory. Conversely, a Security token can be passed to JReport for authentication. JReport provides an interface for authentication. Task 1: Create a new user Task 2: Enable auditing for the user Task 3: Assign permissions to the user Task 1: Create a new user To use JReport Server, you must have a user account, which consists of a unique user name and a password. JReport Server verifies your identity when you type your user name and your password and then log on. If your user account has been disabled or deleted, JReport Server prevents you from accessing the web services that JReport Server provides, in order to ensure that only valid users can access. JReport Server comes with two built-in user accounts, which are admin and guest. The built-in user accounts cannot be deleted. The admin user account can neither be deleted nor disabled. To create a user account: 1. On the JReport Administration page, click Security on the system toolbar, and then select User from the drop-down menu. 2. Click the Create a New User link.

172 3. Complete the New User fields with any user information you would like to use and click OK to create the user. Although it doesn't matter for this lesson, the Publish privilege is an important aspect of user definition. Users can either be granted or denied the ability to publish resources to the JReport Server based on the checkbox. Make a note of the user credentials you specified in this step so that you can access them in the remainder of this lesson. 4. The newly-created user is listed in the User panel. Users can be grouped. Often a set of users require the same security privileges. That is, everyone in the Sales organization can view the Sales reports. By creating a named group, you can efficiently manage the security of a set of users. Task 2: Enable auditing for the user JReport Server can record user access and management information in the log files by auditing the user. To audit the user: 1. Locate the user you created in Task 1, and click the corresponding Auditing link in the Control column of the user table. 2. In the Auditing dialog, click the OK button to accept the supplied defaults. Events are recorded in the log file. Task 3: Assign permissions to the user Permissions, associated with resources and folders which locate in the Public Reports folder, are the rules that are granted to users to control their access to resources and folders. The permissions include: Visible, Read, Write, Execute, Schedule, Delete, and Grant. After you set permissions on a parent folder, new resources and subfolders created in the folder inherit these permissions. If you do not want them to inherit permissions, enable their user permissions and set their permissions separately. The resources and folders will inherit permission from their parent folder if their user permissions are not enabled. To set, view, change, or remove resource permissions: 1. On the JReport Administration page click Resources > Resources on the system toolbar. 2. In the Resources panel, browser to the resource on which you want to set permissions. 3. Click the Properties button in the Control column of the resource. 4. In the Properties dialog, click the Set Permissions link. 5. In the Set Permissions dialog, set the permissions according to your own requirements, then click OK to confirm. Users must have certain user rights and permissions to perform tasks on certain resources. Roles help you efficiently assign those user rights and permissions to users. Assigning one or more roles to users gives the users all of the user rights and permissions the roles have to perform their jobs with. A role can also be assigned to other groups or roles, and hence the groups or roles will inherit the resource and folder permissions that the roles have. JReport Server comes with two built-in roles, which are administrators and everyone. The built-in roles cannot be deleted.

173 Track 7: Integrating Reports with JSP For this track, assume that you are a report developer working once again for the Jinfonet Gourmet Java company. You have been asked to integrate various JReport-developed reports into JSP pages that are part of a sales order application. The links to generate the reports should appear on the same JSP page that is the entry point to the application: Accessing reports from a JSP page is just one way that a report can be embedded. A report can also be accessed directly from a Java application, servlet or EJB by using the JReport Server API or the JReport RMI API. Reports can also be called by simple URL hyperlinks from HTML pages, as described in the next lesson. Note: The lessons in this track assume that the Jinfonet Gourmet Java catalog has been published as described in Track 6 > Lesson 2 > Task 1. In this track, you perform the following lessons: Lesson 1: Calling a DHTML report from HTML Lesson 2: Calling a DHTML report from JSP Lesson 3: Running a report with parameters Lesson 4: Exporting a report from JSP

174 Lesson 5: Scheduling a report from JSP Lesson 6: Application integration Click the right arrow ( ) below to begin reading the track.

175 Lesson 1: Calling a DHTML report from HTML You have been asked to embed AnnualSalesbyRegion.cls with the Jinfonet Gourmet Java Sales Orders application. This report shows annual sales information. The report will be called from a JSP page in the application. To access this report without being embedded, the user has to leave the application interface, open a new web browser window, point it to the JReport Console page, locate the report, and then run it. Embedding the report in the application is a more convenient way to present the report. By simply putting a link or a button in the application interface, users can run the report on demand. The report will be displayed in a new web browser window in DHTML format and not affect the state of the application. To access JReport functionality from a JSP page, you use the JReport JSP Tag Library. The JReport JSP Tag Library provides a collection of reusable embedded and component tags that can be incorporated into web applications. Using these tags, developers can easily embed JReport's entire DHTML interface or components of it directly into an application interface in minimal time without resource intensive efforts. Component tags can be used for: Specifying report outputs. Adding toolbars and menu bars to the report, providing easy access to commonly-used functions and commands. Adding an interactive table of contents to the report, providing dynamic navigation to any component or section. For complete information about the JReport JSP Tag Library, see Appendix 9: DHTML tag library in the JReport Server User's Guide. This lesson is a simplified version of integration. Extend what this lesson shows to see the full power of JReport Server running in either of its two modes: as an integrated part of your application or as a standalone report server independent of the application. Task 1: Access the JSP file that runs the report Task 2: Run the report using an HTML file that prepares the Tag lib parameters Task 1: Access the JSP file that runs the report Any JSP page can call the report. For this lesson, a simple JSP page is used. To view the.jsp file, follow these steps: 1. Create a new directory named jag in <install_root>\public_html. 2. Browse to and copy runreport.jsp in <install_root>\demo\source to <install_root>\public_html\jag. 3. In your favorite HTML editor, open runreport.jsp and review the JSP code. It contains: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>jreport DHTML</title> </head> <BODY> <iframe style="width:800px; height:600px; top:50px;; left:10px;" align="middle" frameborder="1" marginheight="10"; marginheight="10" scrolling="yes" src="../dhtmljsp/dhtml.jsp?jrs.cmd=jrs.try_vw&jrs.report=/userfolderpath/ admin/jinfonetgourmetjava/annualsalesbyregion.cls&jrs.catalog= /USERFOLDERPATH/admin/JinfonetGourmetJava/JinfonetGourmetJava.cat&"/> </BODY> </HTML> Note: The sc string value is broken for display purposes only in this document. In the actual.jsp file the value is continuous. 4. Start JReport Server by clicking Start > All Programs > JReport 11.1 > Server > Start JReport Server. 5. Open a web browser window and access The report is then displayed. Task 2: Run the report using an HTML file that prepares the Tag lib parameters This task provides an example of how the parameters to the main page tag interact with each other to control the report output. In this example, you enter values for each parameter into an HTML page before running the report. A more likely scenario for a real application is to have the to application code specify the parameters rather than prompt the user for them. 1. Copy setmain.html in <install_root>\demo\source to <install_root>\public_html\jag. Review the code if desired. This code creates a frame and prompts for the parameter values that the main page tag requires. When you click the submit button the parameters are passed to the JSP page and the report is run.

176 2. Copy demomain.jsp in <install_root>\demo\source to <install_root>\public_html\jag. Review the code if desired. This is very similar to the code from Task 1 except that the values are passed in from the HTML page and the report we run is the AnnualSalesbyRegion.cls. 3. Open a web browser and access The Set DHTML Main page tag properties page appears: 4. Click submit to run the report with the defaults.

177 If desired, repeat the steps in this task and experiment with different values on the Set DHTML Main page tag properties page to learn how they affect the way the report is displayed in the Frame (the Tag set ID must be a new one for each running). Lesson 1 summary In this task you have learned how to use HTML and JSP to run a report using the JReport JSP Tag Library.

178 Lesson 2: Calling a DHTML report from JSP This lesson assumes that you have been asked to integrate ProductSalesAnalysis.cls with a JSP page in the Sales Order application. However, you need more flexibility than the JReport mainpage tag provides. This lesson will display ProductSalesAnalysis.cls in DHTML format in a new web browser window. In this lesson you will use DHTML API to run the report instead of using the tag library. The JSP page that runs the report is provided as part of the lesson. 1. Browse to and copy the runproductsalesanalysis.jsp file in <install_root>\demo\source to <install_root>\public_html\jag. Create the jag directory if you did not already do so in Lesson Open runproductsalesanalysis.jsp in your favorite editor or an editor that recognizes JSP such as Eclipse or Dreamweaver. <%@ page import="jet.web.dhtml.*" %> <%@ page import="java.util.*" %> <!-- include the jsp for check user login --> <%@ include file="../dhtmljsp/authcheck.jsp" %> <% Hashtable htparams = new Hashtable(); //set report info htparams.put("jrs.cmd", "jrs.try_vw"); htparams.put("jrs.result_type", "8"); htparams.put("jrs.report ", "/USERFOLDERPATH/admJinfonetGourmetJavas/ProductSalesAnalysis.cls"); htparams.put("jrs.catalog ", "/USERFOLDERPATH/admin/JinfonetGourmetJava/JinfonetGourmetJava.cat"); Map tmpmap = DHTMLUtil.runReport(request, htparams); String targeturl = null; String errormsg = null; %> if(tmpmap!= null){ errormsg = (String)tmpmap.get(DHTMLConstant.ERROR_MSG); targeturl = (String)tmpmap.get(DHTMLConstant.TARGET_URI); if(errormsg!= null &&!errormsg.trim().equals("")){ PrintWriter jwout = response.getwriter(); jwout.print(errormsg); return; }else{ //forward to refresh jsp if(targeturl!= null &&!targeturl.trim().equals("")) { response.sendredirect(targeturl); } } }

179 3. Open your browser to The report is displayed according to the specifications provided. Lesson 2 summary In this task you have learned how to use JSP and DHTML API to run a report.

180 Lesson 3: Running a report with parameters You have been asked to run OrderListbyDate_Parameter.cls from your JSP application and this report requires parameters to run. You don't want JReport Server to display the default JSP page to enter the parameter value so you need to write a JSP page to request the parameter values, and then run the report with the specified values. In this lesson you will also need to use DHtml API to run the report without using the tag library. This lesson comes with an HTML file that requests the parameters and a JSP file that runs and displays OrderListbyDate_Parameter.cls in DHTML format in a new web browser window. 1. Copy the runwithparameter.html file in <install_root>\demo\source to <install_root>\public_html\jag. 2. Open runwithparameter.html in your favorite editor and review the code if desired. 3. Copy runwithparameter.jsp in <install_root>\demo\source to <install_root>\public_html\jag. 4. Open this file in an editor and review the code if desired. 5. Browse 6. Select the start date and end date and click Run report set. You may see the result generated with the specified parameter values, for example:

181 Lesson 3 summary In this task you have learned how to use JSP and DHTML API to run a report with parameter collected through the user interface. Often this information is known by your application so there is no need to prompt the user for the information, it can be provided directly from the application calling the report.

182 Lesson 4: Exporting a report from JSP You have been asked to run EmployeeInformation.cls from the Sales Order application and allow the user to choose the format of the report. The allowable formats are: PDF, Excel, RTF (Microsoft Word), HTML, Text, PostScript, and XML. In this lesson you again use DHTML API to run the report; however, we will use the One Step Export feature to export the DHTML report in the specified format without displaying it in a separate web browser window. Task 1: Review the JSP file to run the report Task 2: Export the report result Task 1: Review the JSP file to run the report The JSP page that runs the report is provided as part of the lesson. Follow these steps to review the JSP code: 1. Copy exportreport.jsp in <install_root>\demo\source to <install_root>\public_html\jag. 2. Open exportreport.jsp in your favorite editor. <%@ taglib uri="../dhtmljsp/jinfonet_dhtml_taglib.tld" prefix="jinfonet" %> <%@ page import="jet.rptservice.api.engineconstant"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>export Report to user selected format</title> <script language="javascript"> <!-- function exportit(){ var type = document.getelementbyid("format").value; var optionvalues = new Array(); if(document.getelementbyid("isexcport").checked){ user_onestepexport(type, optionvalues); // for one step exporting }else{ user_downloadreport(type, optionvalues); // for one step downloading } } //--> </script> </head> <body> <jinfonet:dhtml id="report1" tagsetid="export" report ="/USERFOLDERPATH/admin/JinfonetGourmetJava/EmployeeInformation.cls" catalog ="/USERFOLDERPATH/admin/JinfonetGourmetJava/JinfonetGourmetJava.cat" report_params ="jrs.cmd=jrs.try_vw"> <label>format:</label> <select name="ty" size="1" id="format"> <option value="<%=engineconstant.export_type_html%>" >HTML</option> <option value="<%=engineconstant.export_type_pdf%>" selected>pdf</option> <option value="<%=engineconstant.export_type_xls%>">excel</option> <option value="<%=engineconstant.export_type_text%>" >Text</option> <option value="<%=engineconstant.export_type_rtf%>" >RTF</option> <option value="<%=engineconstant.export_type_xml%>">xml</option> <option value="<%=engineconstant.export_type_ps%>" >PostScript</option> </select> <br><br> <label><input id="isexcport" name="isexport" type="radio" value="true" checked>view the result</ label> <label><input name="isexport" type="radio" value="false">download</label> to file system <br> <br> <input type="button" value="export" onclick="exportit();"> </jinfonet:dhtml>

183 </body> </html> Note: The result types are: 0- HTML, 2 - PDF, 3 - Postscript, 4 - RTF, 5 - TEXT, 6 - Excel, 7 - XML. Task 2: Export the report result 1. Browse 2. Choose the desired export format and whether you want to download the result or view it now. 3. Click Export to generate the exported report. The report displays according to the format provided. For downloaded result, use the program on your system to view the results, such as Acrobat Reader or Microsoft Word. Lesson 4 summary In this lesson you have learned how to use JSP and DHTML API to run a report and export the current report tab in this report to any format.

184 Lesson 5: Scheduling a report from JSP You have been asked to run EmployeeInformation.cls from the JSP application and allow the user to schedule the report from the JSP application. We will use an HTML page to ask the user for the scheduling information and then run the report simply by calling submitscheduledtask(). This lesson needs an HTML and a JSP file: 1. Copy schedulerequest.html in <install_root>\demo\source to <install_root>\public_html\jag. 2. Open schedulerequest.html in your favorite editor. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>schedule ListByCategory to run once at a future time.</title> </head> <body> <p>schedule running ListByCategory in PDF format and publish the pdf file to the servers file system: <form method=get action="schedulereport.jsp"> Specify the pdf file path and name : <input type="text" name="filepath" value="c:\temp\" size="30"> <input type="text" name="filename" value="employeeinformation.pdf" size ="20"><br> Run this task on: <input type="text" name="month" value="1" size="5"> (Month) <input type="text" name="day" value="1" size="5"> (Day), <input type="text" name="year" value="2007" size="7"> (Year), at <input type="text" name="hour" value="17" size="5"> (Hour) <input type="text" name="min" value="0" size="5"> (Minute) <br><br><br> <input type="submit" value="schedule this task"> </form> </body> </html> 3. Copy schedulereport.jsp in <install_root>\demo\source to <install_root>\public_html\jag. 4. Open schedulereport.jsp in your favorite editor to view it. <%@ page import="jet.web.dhtml.*"%> <!-- specify the error page for this is jsp, a user can customize it and it's optional. --> <%@ page errorpage="../dhtmljsp/errorpage.jsp" %> <!-- include the jsp for check user login --> <%@ include file="../dhtmljsp/authcheck.jsp" %> <html> <head> <title> Schedule according to date and time provided by schedulerequest.html </title> </head> <body> <% //get RptServer HttpRptServer server = DHTMLHttpUtil.getHttpRptServer(request); Properties props = new Properties(); props.put("jrs.cmd", "jrs.submit_schedule"); props.put("jrs.task_class", "jet.server.schedule.jrtasks.publishtodisktask"); props.put("jrs.to_disk", "true"); props.put("jrs.to_disk_pdf_path_type", "1"); props.put("jrs.result_type", "2"); props.put("jrs.to_pdf", "true"); // run in PDF format props.put("jrs.launch_type", "1"); props.put("jrs.catalog", "/USERFOLDERPATH/admin/JinfonetGourmetJava/ JinfonetGourmetJava.cat"); props.put("jrs.report", "/USERFOLDERPATH/admin/JinfonetGourmetJava/ EmployeeInformation.cls"); props.put("jrs.auth_uid", "admin"); // set log user ID to avoid login dialog popup props.put("jrs.auth_pwd", "admin"); // set log user password to avoid login dialog popup props.put("jrs.pdf_dir", request.getparameter("filepath")); props.put("jrs.pdf", request.getparameter("filename")); props.put("jrs.exe_year", request.getparameter("year"));

185 %> </body> </html> props.put("jrs.exe_month", request.getparameter("month")); props.put("jrs.exe_day", request.getparameter("day")); props.put("jrs.exe_hour", request.getparameter("hour")); props.put("jrs.exe_min", request.getparameter("min")); //get user information HttpUserSessionManager umg = server.gethttpusersessionmanager(); UserSession us = umg.getusersession(request); String userid = us.getuserid(); //Submit a scheduled task and return the task ID. String taskid = server.submitscheduledtask(userid, props); out.print("the task has been scheduled. The task ID is:" + taskid); 5. Browse and the following page appears: 6. Specify the current date, but choose a time about 10 minutes from the current time. You can change the default file name and scheduled location if desired. Note: Only whole numbers can be specified for each field. 7. After the specified time, view the report result in its target location. Scheduling reports in this way has two advantages: The data captured by the report can correlate to a specific window, that is, a report of monthly activity can be generated at the exact minute the month is over. JReport Server can operate at off hours, thereby allowing more throughput during peak time. Lesson 5 summary In this task you have learned how to use JSP and JReport Server API to run a report according to a schedule provided by an application.

186 Lesson 6: Application integration You have been asked to incorporate the reports from the previous lessons of this track into an application portal. The application portal allows the staff concerned to easily request the reports they need as well as access the applications they use on a daily basis. For this lesson, the application portal was built using frames; however, in most corporate settings there would be an application portal which would be used to launch the application and common reports. The techniques and code required to call the reports are identical whether it is a portal or a simple menu so the sample code can be utilized in either situation. Task 1: View the source for the application menu Task 2: View the application menu Task 1: View the source for the application menu This lesson includes HTML which creates a menu on the left frame and displays the requested HTML and reports in the right side frame. 1. Copy the contents of the directory <install_root>\demo\source to <install_root>\public_html\jag. 2. Open index.htm in the jag directory in your favorite editor. This HTML file simply creates two frames, namely leftframe which displays left.htm and rightframeset which by default has application/introduction.htm displayed. 3. Open left.htm in your editor. You will see it is a table with the menu items we want to present to the user. Task 2: View the application menu 1. Open a web browser to The page is something like this:

187 2. Click the links in the left frame to view the introduction or reports. Lesson 6 summary In this task you have learned how to use HTML to integrate the reports into a menu system. This strategy provides a user-friendly way to access reports from an existing and familiar application interface.

188 Track 8: Creating and Analyzing Ad Hoc Reports JReport features a powerful ad hoc reporting capability, which allows end users and business analysts to create and manipulate ad hoc reports in the JReport Server-powered runtime environment. There are two types of ad hoc reports in JReport, Web Report and Page Report. Web reports are created from a business view in a catalog. Using JReport Studio Wizard the user can easily in a single pass create a multi-component report which is viewed in JReport Studio. JReport Studio provides the user a very high quality Web 2.0 Rich Internet Application (RIA) view of the report with component level navigation commands. For example, a single pass through the wizard can create a tabular style report with a chart and crosstab followed by the detail information in a table. Page reports are created from a report cube or business cube in a catalog. Using New Report Wizard the user can create a single component report which is viewed in JReport Viewer. JReport Viewer provides the user a page mode view of the report very similar to a printed report. Report cubes and business cubes have the additional capability of providing multiple hierarchies allowing for automatic drill down and drill up for detailed analysis and slicing and dicing data which is especially powerful using a crosstab component. This track is based on the JinfonetGourmetJava catalog that you have populated and published to \My Reports\JinfonetGournetJava in Track 6 > Task 1. Lesson 1: Creating page reports Lesson 2: Performing data analysis on page reports Lesson 3: Creating and working with web reports Lesson 4: Performing data analysis on dynamic reports Note: A JReport Live license for JReport Server is required in order to perform this track. If you do not have the license, please contact your Jinfonet Software account manager to obtain one first. Click the right arrow ( ) below to begin reading this track.

189 Lesson 1: Creating page reports The easiest way to create a page layout ad hoc report is to use the JReport Standard Report Wizard. There are several types of reports in the wizard which collects information for you: blank (no component), banded, crosstab, table, and chart. You can add components to or remove them from the report after it is generated by the wizard. In this lesson, we will create a page report that contains three report tabs. This lesson contains the following tasks: Task 1: Create a banded report Task 2: Create a table report Task 3: Create a crosstab report Task 4: Insert a chart Task 1: Create a banded report 1. Click Start > All Programs > JReport 11.1 > Server > Start JReport Server to start JReport Server. 2. Click Start > All Programs > JReport 11.1 > Server > JReport Server Console, or open a web browser and set the URL to 3. On the Welcome to JReport User Console page, enter admin for the user name and admin for the password, then click Login. The JReport Server Console page appears. 4. Go to the My Reports > JinfonetGourmetJava folder, then click New Report > Report on the task bar of the Resources page. 5. In the Select Report Type dialog, choose the Page Report option, and then click OK.

190 6. In the New Page Report dialog, type Customer Orders Report in the Report Title text field, select Banded in the layout box, and then click OK.

191 The Banded Wizard appears. 7. In the Data screen, select BusinessCubeDemo in Data Source 1 from the Data Source list. Click Next. A page layout ad hoc report is supported by one and only one business/report cube. The definition of the business/report cube determines what can do on the report and typically this information would be communicated to the business analyst who is building the report. 8. In the Display screen, expand the Detail Information category in the Resources box, add Order Date and LineItemTotal in it as detail fields one by one by clicking, and then modify the display name of LineItemTotal to Line Item Total. Click Next.

192 9. In the Group screen, select Employee Name in the Dimensions category and click to add it as a group by field, keep Ascend as the sort manner, and then click Next. 10. Skip the Summary screen and click Next, the same to the Query Filter screen. 11. In the Style screen, set the style to ClassicBlue, and then click Finish to create the report. The report appears as follows:

193 12. Click Menu > File > Rename Report Tab. 13. In the Rename Report Tab dialog, enter CustomerOrders as the report tab name, then click OK. 14. Click the Save button on the toolbar. 15. In the Save As dialog, type CustomerOrders in the File Name text field, then click OK. Task 2: Create a table report 1. In the current open report window, click the New Report Tab button on the toolbar. 2. In the New Report Tab dialog, enter Current Customers in the Report Title text field, select Table (Group Above) in the layout box, then click OK. The Table Wizard appears. 3. In the Data screen of the wizard, select BusinessCubeDemo in Data Source 1 from the Data Source drop-down list, then click Next. 4. In the Display screen, expand the Detail Information category in the Resources box, add Customer Name, Phone and CustomerCityStateZip (change its display name to Zip) as the detail fields, and then click Next.

194 5. In the Group screen, add Country in the Dimensions category as the group by field, keep Ascend as the sort manner, then click Next. 6. Skip the Summary screen and click Next to access the Query Filter screen. As we would like to focus on customers not in USA, we will apply a filter to the business cube. However, we find that none of the predefined filters in the business cube can meet our requirements, so we will define another one. 7. In the Query Filter screen, select User Defined from the Query Filter drop-down list, define the filter as Country!= 'USA', then click Next.

195 8. In the Style screen, set the style to ClassicBlue, and then click Finish to create the table report. The table report appears as follows:

196 9. Click Menu > File > Rename Report Tab to rename the report tab as CurrentCustomers. 10. Click the Save button on the toolbar to save the report. Task 3: Create a crosstab report 1. In the current open report window, click the New Report Tab button on the toolbar. 2. In the New Report Tab dialog, type Sales Report in the Report Title text field, select Crosstab in the layout box, then click OK. The Crosstab Wizard appears. 3. In the Data screen, select BusinessCubeDemo in Data Source 1 from the Data Source drop-down list and then click Next. 4. In the Display screen, from the Dimensions category in the Resources box, add Employee Name as the column field and Country as the row field (keep Ascend as the sort manner for both columns and rows), then expand the Measures category and add Total Sales as the summary field. Click Next.

197 5. Skip the Query Filter screen. Click Next. 6. In the Style screen, set the crosstab style as ClassicBlue, then click Finish to create the crosstab report. The crosstab report appears as follows:

198 7. Click Menu > File > Rename Report Tab to rename the report tab as Sales. 8. Click the Save button on the toolbar to save the report. Task 4: Insert a chart In this task, we insert a chart into the Sales report created in Task In the current report window, click Menu > View > Toolbox to display the Toolbox panel. 2. Drag Chart to place it under the last row of the crosstab.

199 The Chart Wizard appears. 3. In the Data screen, select BusinessCubeDemo in Data Source 1 from the Data Source drop-down list, then click Next. 4. In the Type screen, select the chart type as Clustered Bar 2-D, then click Next.

200 5. In the Display screen, add Sales Year from the Dimensions category to the Category box and Category in the same category to the Series box, then expand the Measures category and add Total Sales in it to the Show Values box. Click Next.

201 6. In the Query Filter screen, select NotMild from the Query Filter drop-down list as the filter and click Next. 7. In the Style screen, set the chart style to ClassicBlue, and then click Finish to create the chart. The chart appears as follows:

202 8. Click the Save button on the toolbar to save the report. Lesson 1 summary In this lesson, we created three report tabs in a page report based on the business cube created in Track 3. The first report tab is a banded report, the second contains a table. In the third report tab, we created two components: a crosstab and a chart which show the same information.

203 Lesson 2: Performing data analysis on page reports Data analysis is the ability to look at the data in a report in another way. That is, to add a cube element to an existing report, to pivot data components, to convert data components, etc. In this lesson, we perform these data analysis tasks on the report we created in Lesson 1. This lesson contains the following tasks: Task 1: Analyze data of a banded object Task 2: Analyze data of a table Task 3: Analyze data of a crosstab Task 4: Analyze data of a chart Task 1: Analyze data of a banded object 1. Click CustomerOrders from the Go To drop-down list on the toolbar to switch to this report tab. Now, we want to make the records in each Employee Name group further grouped in every possible territory, and to know whether the payment for each order has been received or not. 2. Close the Toolbox panel and then click Menu > View > Resource View to display the Resource View panel. 3. In the panel, expand the Dimensions category, drag Territory to the banded object and drop it as the mouse pointer moves below the Employee Name group header and a tip Group Header appears: 4. Drag the Payment Received field in the Detail Information category to the detail panel of the banded object:

204 Now the report tab looks as follows: Next, we will do some adjustments to improve the appearance of the report tab. 5. Right-click the label Customer Orders Report and select Properties from the shortcut menu. Then in the Label Properties dialog, go to the Font tab, check the Bold option and then click OK. 6. Right-click the Payment Received label and choose Properties from the shortcut menu. 7. In the General tab of the Label Properties dialog, set the Width property to 1.15, and then click OK. This is to make the label text displayed completely. 8. Right-click any value of the Payment Received field and select Properties from the shortcut menu. 9. In the Font tab of the Data Field Properties dialog, set the Horizontal Alignment property to right, then click OK.

205 10. Right-click any value of the Order Date field and select Properties from the shortcut menu. 11. In the General tab of the Data Field Properties dialog, set the Format property to MM/dd/yyyy and click OK. There are two group levels in the banded object, so we will change the background color of the Territory group in order to distinguish the two levels. 12. Right-click the group header panel of the Territory group, which is shown as GroupHeaderPanel1 on the shortcut menu, and click Properties on the menu. 13. In the General tab of the Banded Panel Properties dialog, set the Background property to #668cb2, and then click OK to confirm. Click the Next button on the toolbar (or just simply scroll down the mouse wheel) to view page 2 and repeat this to view the next pages, and you may find the interval between every two Territory groups, which is the group footer panel. So next, we will make it invisible. 14. Right-click the GroupFooterPanel1 which is footer panel of the Territory group and select Properties from the shortcut menu. 15. In the General tab of the Banded Panel Properties dialog, set the Height property to 0 and click OK. Now the report tab looks as follows:

206 Next, we will do some sorting and filtering on the report tab. We would like to sort the records in each group by Line Item Total ascendingly, and filter the records to only show orders without a payment received. 16. Click the Sort button on the toolbar to open the Sort dialog. 17. In the Sort dialog, select BandedObject from the Sort in Scope drop-down list, choose LineItemTotal from the field dropdown list, keep the sorting manner as Ascend, and then click OK to apply the settings. 18. Right-click any value of the Payment Received field, and on the shortcut menu, click Filter > False.

207 After doing the sorting and filtering, the report tab looks as follows: In the above two steps, we used two ways to sort and filter the report results: one by dialog and the other by right-click menu command. In fact, both sorting and filtering can be achieved by either way. We have defined two grouping levels in the banded report: one by Employee Name and the other by Territory. Next, we will change one of the grouping criteria: grouping the banded object by Country instead of Territory. 19. Right-click any of the Territory value ("Southeast, USA" for example) and click Drill To > Country on the shortcut menu.

208 The report result finally changes to:

209 20. Click the Save button on the toolbar to save the changes. Task 2: Analyze data of a table 1. Select CurrentCustomers from the Go To drop-down list on the toolbar to switch to this report tab. First, we want to remove the zip information from the table as we think it is not required. 2. Right-click the Zip label and select Remove Column from the shortcut menu to delete the Zip label and its corresponding DBField. Next, we will add a group Region, and make its level higher than the existing Country group. 3. Make sure the Resource View panel is shown, then drag Region in the Dimensions category from the panel to the upper part of any Country group header: Next we want to add some detail fields to the table. We can do this either by dragging or using dialog. 4. Drag State in the Dimensions category from the Resource View panel to the right part of the Phone column and drop it when a blue line occurs along the right boundary of the column.

210 5. Click anywhere on the table, when the icon appears at its upper left corner, right-click the icon and select Insert > Detail Column from the shortcut menu. 6. In the Insert Detail Column dialog, select Customer Address in the Detail Information category, then click OK. A detail column, Customer Address, will be added to the right of the State column. However, we now consider the state information is not very useful because we will care more about the city information. So we can overwrite State with City. 7. Drag City in the Dimensions category from the Resource View panel to the State column label and drop it when this title is highlighted:

211 The report result becomes: 8. Resize the Customer Name column by dragging the boundary to the right of the column to make all the customer names in the column displayed entirely. 9. Repeat the resizing step for the Region, Phone, City, and Customer Address columns. The report result finally changes to:

212 10. Click the Save button on the toolbar to save the changes. Task 3: Analyze data of a crosstab 1. Click Sales from the Go To drop-down list on the toolbar to switch to the report Sales, which contains a crosstab and a chart. 2. Right-click USA in the row header, and select Drill to By Value > Territory to obtain a more detailed view of USA information. The report tab is regenerated to show data of territories in the USA:

213 Next, we want to further view the details about the territory Southeast of USA. Because Territory is a level predefined in the hierarchy Geography of BusinessCubeDemo, we can drill it down to the State level. 3. Right-click Southeast, USA in the row header, and select Drill Down > State from the shortcut menu. Now, only data of states in the Southeast territory is displayed: We can further drill any State down to City in this way if necessary. Here, let's leave the crosstab as it is. Next, we want to pivot the crosstab, namely interchange the rows and columns. 4. Click any cell of the crosstab, then click Menu > Report > Rotate Crosstab, and the crosstab changes to: 5. Right-click any value and select Properties from the shortcut menu. 6. In the General tab of the Data Field Properties dialog, set the Format property to $#,###.##, then click OK to confirm. 7. Resize the row header to make sure all the employee names can be shown completely (if the resizing arrows does not appear when you move the mouse pointer to the boundary of the row header, you can resize the height of the rows a little bit first). The report result finally changes to:

214 8. Click the Save button on the toolbar to save the changes. Task 4: Analyze data of a chart Now let's focus on the chart at the lower part of the Sales report. In JReport, a chart can be converted to crosstab, and vice versa. So we will convert the chart to a crosstab first. 1. Right-click anywhere on the chart and select To Crosstab from the shortcut menu. 2. In the Display tab of the To Crosstab dialog, add Sales Year to the Columns box, Category to the Rows box, and Total Sales to the Summaries box, then click Next. 3. In the Style tab, set the crosstab style as ClassicBlue, and then click OK. The chart is successfully converted to a crosstab.

215 Now, we want to return the crosstab to a chart, and change the chart type to pie chart. 4. Click the menu command Menu > Edit > Undo to cancel the operation of converting chart to crosstab. We can also select any cell of the crosstab and click Menu > Report > To Chart to convert the crosstab to chart. 5. Right-click anywhere on the chart, and on the shortcut menu, click Chart Type > Pie > Clustered Pie. The chart appears as follows: Next, we will format the chart. 6. Right-click the platform of the chart and select Format Chart from the shortcut menu. 7. In the Chart Type tab of Chart Definition dialog, select Bench from the Chart Type box, and select the Bench 3-D thumbnail. 8. Click the Display tab, select Sales Year in the Category box and click to remove it, then expand the Dimensions category in the Resources box and add Category to the Category box. Remove Category from the Series box and add Sales Year in the Dimensions category to the box. Add Total Sales in the Measures category to the Show Values box.

216 9. Click the Style tab, apply the ClassicBlue style to the chart, then click OK to apply the changes. The chart now appears as follows:

217 10. Right-click the chart, select Format Paper from the shortcut menu. 11. In the Format Paper dialog, click the Coordinate tab, set Scale X to 80, Scale Y to 80 and Angle Y to 12, then switch to the Graph tab and set Bar Width to 30. Click OK to confirm. 12. Right-click the chart, and on the shortcut menu, select Format Platform. 13. In the Format Platform dialog, click the Border tab, set Border Type to solid line and Color to #66ccff, then click the Data tab, set Sort Category to ascend and Sort Series to descend. Click OK to confirm. Finally the chart looks as follows: Next, we want to edit the predefined filter applied to the business cube the chart uses to show any category which is not Exotic. 14. Right-click anywhere on the chart and click Query Filter on the shortcut menu. 15. In the Query Filter dialog, click the Edit button, then modify the value of the filter condition to 'Exotic'. Click OK to apply the changes.

218 We can find that after editing a predefined filter of a business cube in JReport Viewer, it is then saved as a user defined filter in the business cube. The chart now becomes:

219 16. Click the Save button on the toolbar to save the changes. Lesson 2 summary In this lesson, we performed some data analysis tasks on the four data components we created in lesson 1 respectively. We applied some sorting and filtering conditions on the banded object, added and removed some columns in the table, drilled around the crosstab, and converted the chart into a crosstab and changed the chart type.

220 Lesson 3: Creating and working with web reports End users can create web reports, which are also called web reports, on JReport Server if a business view is available. In this lesson, we will create a web report as an end user. The report should contain a table, a crosstab, and a chart. This lesson contains the following tasks: Task 1: Create the web report Task 2: Work with the web report Task 1: Create the web report 1. On the JReport Console > Resources page, go to the My Reports > JinfonetGourmetJava folder, then click New Report > Report on the task bar of the Resources page. 2. In the Select Report Type dialog, select Web Report and click OK. The JReport Studio Wizard appears. 3. In the Page screen of the wizard, select Template2, which allows for company log, company name, report titles to be defined and added in the report's page header panel. Click to browse to the directory <install_root>\demo\jinfonetgourmetjava, select Coffee.gif as the company logo. In the Company Title 1 text field, input the company name Jinfonet Gourmet Java, Inc. In the Company Title 2 text field, input Best-Quality and Rich-Type Coffee. In the Report Title text field, input Sales Performance. Leave the Sub Title text field blank.

221 We would like to save the above company information for use when creating other web reports which require the company information. 4. If you are an administrator with the publish privilege, you can save a report template. Click the Save button in the JReport Studio Wizard. Then in the Save As dialog, type in Company as the file name, set File Type to Web Report Template (*.wsld), then click Save. 5. Click Next in the JReport Studio Wizard to go to the Layout screen. 6. In the Layout screen, select the T-Style layout. In the first tabular row, click the Click here to select component link in the left cell, select Crosstab from the drop-down menu, select Chart for the right cell. For the bottom cell, select Table from the drop-down menu.

222 7. Click Next to go to the Bind Data screen to define data for the three components one by one. Since we have only one business view in the catalog, the business view is selected as the data source by default for the three components. We will go straight to data addition. 8. First define the crosstab. Add Country to the Columns box, Product Name to the Rows box, and Total Sales to the Summaries box.

223 9. Click Next to define the chart. Add Country to the Category box, then from the chart type drop-down list in the Show Values box, select Clustered Pie, and add Total Sales as the data of the type. 10. Click Next to define the table. In the Display tab, add these fields: Customer Name, Product Name, Order Date, and Total. In the Group tab, add Country as the group by field. 11. Click Next to display the Style screen and select Neutral as the style. 12. Click Run and the report is opened in JReport Studio.

224 13. Click the Save button on the toolbar. 14. In the Save As dialog, type SalesPerformance in the File Name text field, then click Save to save the web report. Task 2: Work with the web report

225 In this task, we will format the web report to make it look nicer, perform some operations on the data components, and dynamically filter the data. We will first change the style of the crosstab and table in the report, and then format the chart to show the values for the chart segments in percentage, and also include the country names in the tips so as to help identify the segments. 1. Click Edit Mode on the toolbar to switch JReport Studio to the edit mode. 2. Click anywhere on the crosstab, when the icon appears at its upper top left, right-click the icon, then select Apply Style > JReportDemo from the shortcut menu. 3. Change the style of the table to JReportDemo too using the same way. 4. Right-click on the chart and click Format Paper on the shortcut menu. In the Format Paper dialog, select Show Category and Series in the General tab, in the Graph tab, set Type to Percent, then click OK. The chart now displays as follows: Point the cursor on the largest pie section of 26.19%, we can easily see that it is USA that is the company's biggest market. Next we will perform some operations on the crosstab, chart and table respectively. First, we will change the data view from Country to Customer Name in the crosstab. 5. Right-click the column header which displays countries, select Go To > Customer Name from the shortcut menu. The column header now displays customer names.

226 6. To further view the customer Absolute Java's order ID information, right-click Absolute Java in the column header, select Go to By Value > Order ID from the shortcut menu. The crosstab now shows Absolute Java's orders of different products. For the chart, we will link the values to a table which contains detailed information about the values. 7. Right-click the pie, select Edit Detail Table. In the Edit Detail Table dialog, add these fields to the right panel concerning the total sales in the countries: Country, Product Name, Quantity, Unit Price, Discount, and Total, then click OK. 8. Now we can view the details about the chart values. Right-click the total sales in Canada and click Go to Detail on the shortcut menu. The following table will be displayed showing the information about Canada.

227 9. Click on the toolbar to return to the main report. For the table, we will summarize the total sales for each country group and for all the countries. 10. Right-click any value in the Total column, then select Aggregate On from the shortcut menu. In the Aggregate On dialog, set Function to Sum, then click OK. You will see the total sales for each country group is added at the end of each group and the total sales for all the countries is added at the end of the table. This operation also creates a dynamic aggregation which is given a default name Sum_Total. You can find it in the Dynamic Resource > Aggregations list in the Resources

228 panel and you can use it again in the report. The three data components in the report use the same business view, therefore we can apply filters to them at the same time. There are two tools to use: the Filter panel and filter controls. For the usage of filter controls, you can learn from Lesson 2: Creating a web report using JReport Designer. Here we focus on using the Filter panel to dynamically filter report data. We would like to view data about the North America region, so we need to add the Region field to the Filter panel. 11. Expand the Filter panel on the left. Click + on the title bar of the Filter panel, then in the Select Field dialog, select Region and click OK. The Region field will be added in the Filter panel with its values. 12. Click North America (NA) in the Region box. The report comes out as follows:

229 13. Click on the toolbar to save the report. Lesson 3 summary In this lesson, we created a web report containing a table, a crosstab, and a chart from the view of an end user on JReport Server, added company information in the report header, performed several actions on the data components, and used the Filter panel to filter the desired data. The report template was then saved in the server version system and can be uploaded to JReport Designer to make more advanced changes to it if desired.

230 Lesson 4: Performing data analysis on dynamic reports The previous lesson described how to perform data analysis on ad hoc reports. However, data analysis can also be performed on published dynamic reports, that is to say, the DHTML format reports built in JReport Designer. For dynamic reports to support data analysis, the components in the report must have a report cube built in the same query with the component. The report cube must reside in the same published catalog with the dynamic report. Take the banded object created in Lesson 8 of Track 2 for example, it has a group field Orders_Order ID and four detail fields Customer Name, Order Date, Last Name and Payment Received, and the banded object is based on the OrdersReport dataset which originates from the OrdersReport imported SQL file. As you know from Lesson 2 of Track 3, this imported SQL file contains the report cube OrdersReport_ReportCube. The report cube includes the dimension objects Order ID, Name, Sales Date, Last Name, and the detail information object Payment Received, which correspond to the group field and detail fields of the banded object respectively, in other words, the fields in the banded object can be mapped into the corresponding cube elements. This lesson guides you to perform data analysis on the banded object. 1. On the JReport Console > Resources page, go to the My Reports > JinfonetGourmetJava folder, and then click the OrdersReport.cls link to open the report. First we will adjust the structure of the banded object. 2. Switch to the Interactive View, right-click the panel which the subreport (chart) is inserted in, and then on the shortcut menu, click Hide to make the subreport invisible. 3. Right-click any value of the Customer Name field and then select Delete from the shortcut menu to delete the field. Then do the same to the fields Order Date, Employee Last Name and Payment Received. Correspondingly, delete the four name labels.

231 In another way, you can drag any field value outside the report page and drop it, and then click OK to confirm the removal in order to delete the field. Now the banded object only shows order ID information. 4. Right-click the group header panel containing the Order ID field, then select Properties from the shortcut menu. 5. In the General tab of the Banded Panel Properties dialog, set the Height property to 0.21 and click OK. Now the banded object looks like: 6. Select the banded object by clicking anywhere in it, and then a cross-arrow appears at the upper left corner of the banded object. Right-click the icon and then select Show > DetailPanel from the shortcut menu to show the detail panel of the banded object which was hidden when designing in JReport Designer.

232 Next, we use the Resource View panel to perform data analysis. 6. Click Menu > View > Resource View to show the Resource View panel. 7. Expand the Orders Detail category of OrdersReport_ReportCube, drag Unit Price to the detail panel and drop it. 8. The Convert Data Fields dialog appears. This dialog only appears for the first time you perform data analysis on a component designed in JReport Designer. Click OK to confirm, and the Unit Price information will be presented in the banded object.

233 9. Now add the dimension object Quantity and detail information object Discount in the OrdersReport_ReportCube to the detail panel in the same way. The result will be: 10. Drag the measure object Total Sales to the group header panel and drop it. 11. Adjust the newly added objects and the title of the report as follows:

234 Next, we will group the banded object further by customer name and do some drill actions. 13. Expand the Customers category of OrdersReport_ReportCube in the Resource View panel, drag the Name dimension object to the upper part of the Order ID group header panel and drop it when a blue line appears. 14. Adjust the newly added object and hide the group footer panel, and the result will become:

235 15. Right-click any customer name (Cafe Kenya for example), then select Drill To > Category. The banded object becomes: 16. In this report, there is a hierarchy Products defined in the report cube, which is from Category to Product Name (higher to lower), so we can drill a category down to the products in it. For example, right-click Blends and select Drill Down > Product Name, and then we get:

236

237 Track 9: Creating Dashboards JDashboard is a new way of information delivery, using a user portal user interface rather than a web report or page report. Users can create, edit and browse dashboards from the JReport Console using JDashboard. With pre-built library components, users can freely choose the objects they want to display in the dashboard, without having to know how these objects were created, what data sources to use, what styles to set, etc. A dashboard can hold multiple library components so that when browsing the dashboard users are able to see multiple data aspects. Within a dashboard, library components are able to communicate with each other via the message mechanism. This allows actions such as common filters to be applied to all the components of a dashboard even when coming from different data sources. In this track, we will use the two library components created in Track 5 to build a dashboard on JReport Server. This track supposes that you have published the library components to /COMPONENT_LIB/USERFOLDERPATH/admin/JinfonetGournetJava in Track 6. Task 1: Insert the library components into dashboard Task 2: Deliver message Sort between the library components Task 3: Use slider to filter on quantity Task 4: Use configuration panel to change a property Task 5: Export the library components Task 6: Set JDashboard as the server home page Note: A JDashboard license for JReport Server is required in order to perform this track. If you do not have the licenses, please contact your Jinfonet Software account manager to obtain it first. Task 1: Insert the library components into dashboard 1. Click Start > All Programs > JReport 11.1 > Server > Start JReport Server to start JReport Server. 2. Click Start > All Programs > JReport 11.1 > Server > JReport Server Console, or open a web browser and set the URL to 3. On the welcome page, click the Login Now button. 4. In the Connect to localhost dialog, enter admin for the user name and admin for the password. Then the JReport Server Console page appears. 5. Click New Report > Dashboard on the task bar of the Resources page to create a new dashboard. 6. Click on the side bar to display the Resources panel, then go to Component Library > My Components > JinfonetGournetJava. 7. Drag ProductSales.lc and ProductOrderDetails.lc to the destination in the dashboard body and align them horizontally.

238 Then let's add some comments on who has made changes to the dashboard and when. 8. Click on the side bar to display the Resources panel if it is not displayed. From the Toolbox node, drag HTML to the dashboard body below the table. 9. In the Insert HTML dialog, specify the title of the HTML component as Notes, then type in "Edited by Roman on Nov 23, 2012" in the text box. Click OK. 10. The HTML component will be added in the dashboard. Since there is much blank space in the component, you can resize it smaller by dragging its border.

239 Next, we will add a title for the dashboard in its header. 11. Click on the side bar to display the Resources panel if it is not displayed. From the Toolbox node, drag Dashboard Title to the dashboard header. Double-click in the dashboard title, then remove the sample text and type in Product Sales. 12. Click on the side bar to save the dashboard. In the Save As dialog, specify to save the dashboard in the My Reports folder and provide a name for the dashboard file. Then click OK. Task 2: Deliver message Sort between the library components After inserting the two library components into the dashboard, we can deliver the message between them. The message between the chart and table is defined as follows: when the click action is triggered on the chart bars, the built-in message Sort will be sent out from the chart to the table, and when the table receives the message, it will make the order IDs sorted descendingly as a response to the message. So to deliver the message, click any bar in the chart to send the message out, then we can see the order ID in the table is displayed in a descending order.

240 Task 3: Use slider to filter on quantity The slider in the table is used to filter on a range of product quantity. Here we would like to know which products' order quantity are within 5,000 and 10,000. To do this, first unselect the All checkbox in the slider, then drag the left cursor to a number near 5,000 and the right cursor to a number near 10,000. The result comes out as follows:

241 We can also see the slider filters the data in the chart too, because the table and the chart use the same data source. Task 4: Use configuration panel to change a property To change the background color of the Quantity field, we need to use the text field web control in the configuration panel. 1. Click on the component title bar of the table, then select Edit Setting from the drop-down list to display the configuration panel, and we can see the text field in it. 2. Type 0xff0000 in the text field and click OK to apply the change property action to the Quantity field in the table. We can see the background color of the Quantity field is changed to red.

242 3. Save the changes. Task 5: Export the library components 1. Click on the side bar to access the Export dialog. The Design tab displays the two library components horizontally which is too wide for a normal page, so we will adjust them vertically. 2. Leave the Layout as Customize Layout which allows the adjustment of the layout. 3. Go to the Design tab on the right. By default, all the exportable library components are arranged using a tabular style according to their positions in the dashboard. Each tabular cell can hold no more than one component. There is a blank cell below the table which is the position of the HTML component added in Task 1. HTML components do not support exporting so the HTML component is not available here. We will remove the table on the right of the chart and add it below the chart. 5. Right-click anywhere in the cell that contains the table and select Remove from the shortcut menu. The table library component will be removed. 6. Add a cell below the chart. The chart fulfills its cell and it is hard to select the cell. We will take an indirect way: first delete the chart using Remove on the short menu, next select the cell and split it vertically via the cell. button on the toolbar, then drag the chart - Product Sales - from the Resources box to the top cell and the table - Product Order Details - to the bottom

243 7. You may find that the table shows a template instead of real data. By default tables and crosstabs are limited to show only the data displayed in the dashboard. If you want the full table data to be exported, right-click on the table and select Filter from the shortcut menu. Then in the Filter dialog, switch from Current View to All and click OK. 8. Click the View tab to preview the layout. 9. You can save the layout if you are going to reuse it. Click on the toolbar, then in the Save As dialog, type in a name for the layout, for example, Layout1, then click OK. You will see that Layout1 is added in the Layout drop-down list and selected as the value. 10. Click in the Export dialog to do final setting and then start exporting. In the displayed dialog, choose a format and provide a file name for the exported result, then click OK. The exporting process will begin.

244 Task 6: Set JDashboard as the server home page 1. In the Profile > Customize Server Preferences > General tab on the JReport Administration or JReport Console page, set the option Use JDashboard as Server User Console Home Page to Yes to enable setting JDashboard as the server home page. Then click OK. 2. In the My Reports folder, open the dashboard so that the setting in step 1 can take effect in JDashboard. 3. Click on the side bar and you will see Set as Server Home is enabled on the menu list. Click the option to set JDashboard as the server home page. 4. A Home tab will be available beside the Resources tab on the system toolbar of the JReport Console page. Click the Home tab and you can access JDashboard immediately. Track 9 summary In this track, we first created a dashboard by inserting two library components, an HTML component, and a dashboard title, and then perform operations in the dashboard such as delivering the message defined between the two library components, filtering the data using a slider, changing a property via the configuration panel, and exporting the library components. At the end we set JDashboard as the server home page so as for easier access.

Welcome to the JReport Tutorial

Welcome to the JReport Tutorial Next Page Welcome to the JReport Tutorial Thank you for your interest in JReport, the leading Embedded Reporting Solution for Java Applications. With JReport, intuitive and sophisticated reporting can

More information

Welcome to the JReport Tutorial

Welcome to the JReport Tutorial Next Page Welcome to the JReport Tutorial Thank you for your interest in JReport, the leading Embedded Reporting Solution for Java Applications. With JReport, intuitive and sophisticated reporting can

More information

Welcome to the JReport Tutorial

Welcome to the JReport Tutorial Next Page Welcome to the JReport Tutorial Thank you for your interest in JReport, the leading Embedded Reporting Solution for Java Applications. With JReport, intuitive and sophisticated reporting can

More information

Business Intelligence and Reporting Tools

Business Intelligence and Reporting Tools Business Intelligence and Reporting Tools Release 1.0 Requirements Document Version 1.0 November 8, 2004 Contents Eclipse Business Intelligence and Reporting Tools Project Requirements...2 Project Overview...2

More information

Business Insight Authoring

Business Insight Authoring Business Insight Authoring Getting Started Guide ImageNow Version: 6.7.x Written by: Product Documentation, R&D Date: August 2016 2014 Perceptive Software. All rights reserved CaptureNow, ImageNow, Interact,

More information

User Guide. Version Exago Inc. All rights reserved.

User Guide. Version Exago Inc. All rights reserved. User Guide Version 2016.2 2016 Exago Inc. All rights reserved. Exago Reporting is a registered trademark of Exago, Inc. Windows is a registered trademark of Microsoft Corporation in the United States and

More information

OBIEE. Oracle Business Intelligence Enterprise Edition. Rensselaer Business Intelligence Finance Author Training

OBIEE. Oracle Business Intelligence Enterprise Edition. Rensselaer Business Intelligence Finance Author Training OBIEE Oracle Business Intelligence Enterprise Edition Rensselaer Business Intelligence Finance Author Training TABLE OF CONTENTS INTRODUCTION... 1 USER INTERFACE... 1 HOW TO LAUNCH OBIEE... 1 TERMINOLOGY...

More information

Report Designer Report Types Table Report Multi-Column Report Label Report Parameterized Report Cross-Tab Report Drill-Down Report Chart with Static

Report Designer Report Types Table Report Multi-Column Report Label Report Parameterized Report Cross-Tab Report Drill-Down Report Chart with Static Table of Contents Report Designer Report Types Table Report Multi-Column Report Label Report Parameterized Report Cross-Tab Report Drill-Down Report Chart with Static Series Chart with Dynamic Series Master-Detail

More information

ScholarOne Manuscripts. COGNOS Reports User Guide

ScholarOne Manuscripts. COGNOS Reports User Guide ScholarOne Manuscripts COGNOS Reports User Guide 1-May-2018 Clarivate Analytics ScholarOne Manuscripts COGNOS Reports User Guide Page i TABLE OF CONTENTS USE GET HELP NOW & FAQS... 1 SYSTEM REQUIREMENTS...

More information

Style Report Enterprise Edition

Style Report Enterprise Edition INTRODUCTION Style Report Enterprise Edition Welcome to Style Report Enterprise Edition! Style Report is a report design and interactive analysis package that allows you to explore, analyze, monitor, report,

More information

Eloqua Insight Intro Analyzer User Guide

Eloqua Insight Intro Analyzer User Guide Eloqua Insight Intro Analyzer User Guide Table of Contents About the Course Materials... 4 Introduction to Eloqua Insight for Analyzer Users... 13 Introduction to Eloqua Insight... 13 Eloqua Insight Home

More information

SharePoint List Booster Features

SharePoint List Booster Features SharePoint List Booster Features Contents Overview... 5 Supported Environment... 5 User Interface... 5 Disabling List Booster, Hiding List Booster Menu and Disabling Cross Page Queries for specific List

More information

Lesson Skill Matrix Skill Exam Objective Objective Number

Lesson Skill Matrix Skill Exam Objective Objective Number Lesson 6 Page 1 Creating Tables Lesson Skill Matrix Skill Exam Objective Objective Number Creating a Table Create a table by specifying rows and columns. 3.1.3 Formatting a Table Apply table styles. 3.1.4

More information

SyncFirst Standard. Quick Start Guide User Guide Step-By-Step Guide

SyncFirst Standard. Quick Start Guide User Guide Step-By-Step Guide SyncFirst Standard Quick Start Guide Step-By-Step Guide How to Use This Manual This manual contains the complete documentation set for the SyncFirst system. The SyncFirst documentation set consists of

More information

Query Studio Training Guide Cognos 8 February 2010 DRAFT. Arkansas Public School Computer Network 101 East Capitol, Suite 101 Little Rock, AR 72201

Query Studio Training Guide Cognos 8 February 2010 DRAFT. Arkansas Public School Computer Network 101 East Capitol, Suite 101 Little Rock, AR 72201 Query Studio Training Guide Cognos 8 February 2010 DRAFT Arkansas Public School Computer Network 101 East Capitol, Suite 101 Little Rock, AR 72201 2 Table of Contents Accessing Cognos Query Studio... 5

More information

Numbers Basics Website:

Numbers Basics Website: Website: http://etc.usf.edu/te/ Numbers is Apple's new spreadsheet application. It is installed as part of the iwork suite, which also includes the word processing program Pages and the presentation program

More information

Index COPYRIGHTED MATERIAL. Symbols and Numerics

Index COPYRIGHTED MATERIAL. Symbols and Numerics Symbols and Numerics ( ) (parentheses), in functions, 173... (double quotes), enclosing character strings, 183 #...# (pound signs), enclosing datetime literals, 184... (single quotes), enclosing character

More information

DATA WAREHOUSE BASICS

DATA WAREHOUSE BASICS DATA WAREHOUSE BASICS A Software Overview using the Retail Golf Model with version 9 NOTE: This course material was developed using Hummingbird version 9 with Windows XP. There will be navigational differences

More information

Skill Exam Objective Objective Number

Skill Exam Objective Objective Number Creating Tables 6 LESSON SKILL MATRIX Skill Exam Objective Objective Number Creating a Table Create a table by specifying rows and columns. 3.1.3 Formatting a Table Apply table styles. 3.1.4 Managing Tables

More information

WINDEV 23 - WEBDEV 23 - WINDEV Mobile 23 Documentation version

WINDEV 23 - WEBDEV 23 - WINDEV Mobile 23 Documentation version WINDEV 23 - WEBDEV 23 - WINDEV Mobile 23 Documentation version 23-1 - 04-18 Summary Part 1 - Report editor 1. Introduction... 13 2. How to create a report... 23 3. Data sources of a report... 43 4. Describing

More information

Intellicus Enterprise Reporting and BI Platform

Intellicus Enterprise Reporting and BI Platform Designing Adhoc Reports Intellicus Enterprise Reporting and BI Platform Intellicus Technologies info@intellicus.com www.intellicus.com Designing Adhoc Reports i Copyright 2012 Intellicus Technologies This

More information

User Guide. Web Intelligence Rich Client. Business Objects 4.1

User Guide. Web Intelligence Rich Client. Business Objects 4.1 User Guide Web Intelligence Rich Client Business Objects 4.1 2 P a g e Web Intelligence 4.1 User Guide Web Intelligence 4.1 User Guide Contents Getting Started in Web Intelligence 4.1... 5 Log into EDDIE...

More information

Working with Reports

Working with Reports The following topics describe how to work with reports in the Firepower System: Introduction to Reports, page 1 Risk Reports, page 1 Standard Reports, page 2 About Working with Generated Reports, page

More information

CounselLink Reporting. Designer

CounselLink Reporting. Designer CounselLink Reporting Designer Contents Overview... 1 Introduction to the Document Editor... 2 Create a new document:... 2 Document Templates... 3 Datasets... 3 Document Structure... 3 Layout Area... 4

More information

JReport Designer Tutorial

JReport Designer Tutorial JReport Designer Tutorial Table of Contents Tutorial: Organization of This Part...1 Lesson 1: Installing and Starting JReport...3 Introduction...3 Installing JReport...3 Running JReport...3 Viewing the

More information

When you pass Exam : Access 2010, you complete the requirements for the Microsoft Office Specialist (MOS) - Access 2010 certification.

When you pass Exam : Access 2010, you complete the requirements for the Microsoft Office Specialist (MOS) - Access 2010 certification. Appendix 1 Microsoft Office Specialist: Access Certification Introduction The candidates for Microsoft Office Specialist certification should have core-level knowledge of Microsoft Office Access 2010.

More information

UP L11 Using IT Analytics as an Alternative Reporting Platform Hands-On Lab

UP L11 Using IT Analytics as an Alternative Reporting Platform Hands-On Lab UP L11 Using IT Analytics as an Alternative Reporting Platform Hands-On Lab Description IT Analytics has a diverse and powerful way of displaying data to your users. In this lab, you will learn how to

More information

LESSON 1: INSTALLING AND STARTING JREPORT DESIGNER...2

LESSON 1: INSTALLING AND STARTING JREPORT DESIGNER...2 Table of Contents 1 INTRODUCTION...1 1.1 OVERVIEW AND LAYOUT...1 2 LESSON 1: INSTALLING AND STARTING JREPORT DESIGNER...2 2.1 LESSON BACKGROUND...2 2.2 LESSON OBJECTIVE...2 2.3 LESSON OUTLINE...2 2.4 DETAILED

More information

Chapter 7 Inserting Spreadsheets, Charts, and Other Objects

Chapter 7 Inserting Spreadsheets, Charts, and Other Objects Impress Guide Chapter 7 Inserting Spreadsheets, Charts, and Other Objects OpenOffice.org Copyright This document is Copyright 2007 by its contributors as listed in the section titled Authors. You can distribute

More information

The following topics describe how to work with reports in the Firepower System:

The following topics describe how to work with reports in the Firepower System: The following topics describe how to work with reports in the Firepower System: Introduction to Reports Introduction to Reports, on page 1 Risk Reports, on page 1 Standard Reports, on page 2 About Working

More information

Introducing Gupta Report Builder

Introducing Gupta Report Builder Business Reporting Chapter 1 Introducing Gupta Report Builder You can use Report Builder to design reports. This chapter describes: Our approach to building reports. Some of the reports you can build.

More information

Let s create another simple report from one of our queries available: Author Age query.

Let s create another simple report from one of our queries available: Author Age query. Microsoft Access 6: Reports & Other Useful Functions This can be a very quick way to build a report, especially if you plan to put only a few fields on your report. When you click on the Blank Report button,

More information

Building reports using the Web Intelligence HTML Report Panel

Building reports using the Web Intelligence HTML Report Panel Building reports using the Web Intelligence HTML Report Panel Building reports using the Web Intelligence HTML Report Panel Copyright 2008 Business Objects. All rights reserved. Business Objects owns the

More information

eschoolplus+ Cognos Query Studio Training Guide Version 2.4

eschoolplus+ Cognos Query Studio Training Guide Version 2.4 + Training Guide Version 2.4 May 2015 Arkansas Public School Computer Network This page was intentionally left blank Page 2 of 68 Table of Contents... 5 Accessing... 5 Working in Query Studio... 8 Query

More information

Microsoft Access 5: Reports & Other Useful Functions

Microsoft Access 5: Reports & Other Useful Functions Microsoft Access 5: Reports & Other Useful Functions You can print out simple records of your data by using the Office menu. However, if you want to create a customized report from one or more tables or

More information

Griffin Training Manual Grif-WebI Introduction (For Analysts)

Griffin Training Manual Grif-WebI Introduction (For Analysts) Griffin Training Manual Grif-WebI Introduction (For Analysts) Alumni Relations and Development The University of Chicago Table of Contents Chapter 1: Defining WebIntelligence... 1 Chapter 2: Working with

More information

[ Getting Started with Analyzer, Interactive Reports, and Dashboards ] ]

[ Getting Started with Analyzer, Interactive Reports, and Dashboards ] ] Version 5.3 [ Getting Started with Analyzer, Interactive Reports, and Dashboards ] ] https://help.pentaho.com/draft_content/version_5.3 1/30 Copyright Page This document supports Pentaho Business Analytics

More information

Configuring Ad hoc Reporting. Version: 16.0

Configuring Ad hoc Reporting. Version: 16.0 Configuring Ad hoc Reporting Version: 16.0 Copyright 2018 Intellicus Technologies This document and its content is copyrighted material of Intellicus Technologies. The content may not be copied or derived

More information

EXCEL 2003 DISCLAIMER:

EXCEL 2003 DISCLAIMER: EXCEL 2003 DISCLAIMER: This reference guide is meant for experienced Microsoft Excel users. It provides a list of quick tips and shortcuts for familiar features. This guide does NOT replace training or

More information

Designing Adhoc Reports

Designing Adhoc Reports Designing Adhoc Reports Intellicus Enterprise Reporting and BI Platform Intellicus Technologies info@intellicus.com www.intellicus.com Copyright 2010 Intellicus Technologies This document and its content

More information

Microsoft Access II 1.) Opening a Saved Database Music Click the Options Enable this Content Click OK. *

Microsoft Access II 1.) Opening a Saved Database Music Click the Options Enable this Content Click OK. * Microsoft Access II 1.) Opening a Saved Database Open the Music database saved on your computer s hard drive. *I added more songs and records to the Songs and Artist tables. Click the Options button next

More information

SAS Web Report Studio 3.1

SAS Web Report Studio 3.1 SAS Web Report Studio 3.1 User s Guide SAS Documentation The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2006. SAS Web Report Studio 3.1: User s Guide. Cary, NC: SAS

More information

Creating Reports in Access 2007 Table of Contents GUIDE TO DESIGNING REPORTS... 3 DECIDE HOW TO LAY OUT YOUR REPORT... 3 MAKE A SKETCH OF YOUR

Creating Reports in Access 2007 Table of Contents GUIDE TO DESIGNING REPORTS... 3 DECIDE HOW TO LAY OUT YOUR REPORT... 3 MAKE A SKETCH OF YOUR Creating Reports in Access 2007 Table of Contents GUIDE TO DESIGNING REPORTS... 3 DECIDE HOW TO LAY OUT YOUR REPORT... 3 MAKE A SKETCH OF YOUR REPORT... 3 DECIDE WHICH DATA TO PUT IN EACH REPORT SECTION...

More information

Quick Start Guide. Version R94. English

Quick Start Guide. Version R94. English Custom Reports Quick Start Guide Version R94 English December 12, 2016 Copyright Agreement The purchase and use of all Software and Services is subject to the Agreement as defined in Kaseya s Click-Accept

More information

Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts. Microsoft Excel 2013 Enhanced

Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts. Microsoft Excel 2013 Enhanced Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts Microsoft Excel 2013 Enhanced Objectives Explore a structured range of data Freeze rows and columns Plan and create an Excel table Rename

More information

Table of Contents. Table of Contents

Table of Contents. Table of Contents Powered by 1 Table of Contents Table of Contents Dashboard for Windows... 4 Dashboard Designer... 5 Creating Dashboards... 5 Printing and Exporting... 5 Dashboard Items... 5 UI Elements... 5 Providing

More information

Hands-On Lab. Lab: Developing BI Applications. Lab version: Last updated: 2/23/2011

Hands-On Lab. Lab: Developing BI Applications. Lab version: Last updated: 2/23/2011 Hands-On Lab Lab: Developing BI Applications Lab version: 1.0.0 Last updated: 2/23/2011 CONTENTS OVERVIEW... 3 EXERCISE 1: USING THE CHARTING WEB PARTS... 5 EXERCISE 2: PERFORMING ANALYSIS WITH EXCEL AND

More information

Quick Reference Card Business Objects Toolbar Design Mode

Quick Reference Card Business Objects Toolbar Design Mode Icon Description Open in a new window Pin/Unpin this tab Close this tab File Toolbar New create a new document Open Open a document Select a Folder Select a Document Select Open Save Click the button to

More information

Hyperion Interactive Reporting Reports & Dashboards Essentials

Hyperion Interactive Reporting Reports & Dashboards Essentials Oracle University Contact Us: +27 (0)11 319-4111 Hyperion Interactive Reporting 11.1.1 Reports & Dashboards Essentials Duration: 5 Days What you will learn The first part of this course focuses on two

More information

Simple Invoicing Desktop Database with MS Access 2013/2016. David W. Gerbing School of Business Administration Portland State University

Simple Invoicing Desktop Database with MS Access 2013/2016. David W. Gerbing School of Business Administration Portland State University Simple Invoicing Desktop Database with MS Access 2013/2016 David W. Gerbing School of Business Administration Portland State University July 7, 2018 CONTENTS 1 Contents 1 Create a New Database 1 2 Customer

More information

CCRS Quick Start Guide for Program Administrators. September Bank Handlowy w Warszawie S.A.

CCRS Quick Start Guide for Program Administrators. September Bank Handlowy w Warszawie S.A. CCRS Quick Start Guide for Program Administrators September 2017 www.citihandlowy.pl Bank Handlowy w Warszawie S.A. CitiManager Quick Start Guide for Program Administrators Table of Contents Table of Contents

More information

Sitecore Experience Platform 8.0 Rev: September 13, Sitecore Experience Platform 8.0

Sitecore Experience Platform 8.0 Rev: September 13, Sitecore Experience Platform 8.0 Sitecore Experience Platform 8.0 Rev: September 13, 2018 Sitecore Experience Platform 8.0 All the official Sitecore documentation. Page 1 of 455 Experience Analytics glossary This topic contains a glossary

More information

Process Discovery (BPM-E) Web Flow Viewer User's Guide

Process Discovery (BPM-E) Web Flow Viewer User's Guide Interstage Business Process Manager Analytics V11.1 Process Discovery (BPM-E) Web Flow Viewer User's Guide Windows B1X1-0030-01ENZ0(00) July 2010 About this Manual This manual explains the web-based flow

More information

Freestyle Reports DW DIG Crosstabs, Hotspots and Exporting

Freestyle Reports DW DIG Crosstabs, Hotspots and Exporting Exporting a Report You can export a report into other file formats. Acrobat (.pdf) Before exporting a report to.pdf format, make sure the columns in your report provide ample space for their contents.

More information

Excel. Excel Options click the Microsoft Office Button. Go to Excel Options

Excel. Excel Options click the Microsoft Office Button. Go to Excel Options Excel Excel Options click the Microsoft Office Button. Go to Excel Options Templates click the Microsoft Office Button. Go to New Installed Templates Exercise 1: Enter text 1. Open a blank spreadsheet.

More information

?s t 2 W ; g 0 } 9 m! * = 5 z A & # + 92 Guidebook

?s t 2 W ; g 0 } 9 m! * = 5 z A & # + 92 Guidebook ? s W g ;0 6 t 9} = 3 * 7 & A # z m @! 92 % 2 5 + Guidebook Contents Introduction................................................1 WordPerfect tutorials.........................................5 Quattro

More information

Reporter Tutorial: Intermediate

Reporter Tutorial: Intermediate Reporter Tutorial: Intermediate Refer to the following sections for guidance on using these features of the Reporter: Lesson 1 Data Relationships in Reports Lesson 2 Create Tutorial Training Report Lesson

More information

Microsoft Excel 2013/2016 Pivot Tables

Microsoft Excel 2013/2016 Pivot Tables Microsoft Excel 2013/2016 Pivot Tables Creating PivotTables PivotTables are powerful data analysis tools. They let you summarize data in various ways and instantly change the view you use. A PivotTable

More information

Seamless Dynamic Web (and Smart Device!) Reporting with SAS D.J. Penix, Pinnacle Solutions, Indianapolis, IN

Seamless Dynamic Web (and Smart Device!) Reporting with SAS D.J. Penix, Pinnacle Solutions, Indianapolis, IN Paper RIV05 Seamless Dynamic Web (and Smart Device!) Reporting with SAS D.J. Penix, Pinnacle Solutions, Indianapolis, IN ABSTRACT The SAS Business Intelligence platform provides a wide variety of reporting

More information

Chapter 2 The Design Window

Chapter 2 The Design Window Chapter 2 Objectives Chapter 2 The Design Window Learn about Crystal sections Move objects Use Toolbars, Icons, and Menus Format fields Add Special Fields Change a Group Use the Crystal Field Explorer

More information

User Manual instantolap

User Manual instantolap User Manual instantolap Version 2.7.0 15.12.2010 Page 2 / 213 instantolap User Manual 2.7.0 instantolap User Manual 2.7.0 Page 3 / 213 Copyright Copyright (C) 2002-2010 Thomas Behrends Softwareentwicklung

More information

EMC Ionix ControlCenter (formerly EMC ControlCenter) 6.0 StorageScope

EMC Ionix ControlCenter (formerly EMC ControlCenter) 6.0 StorageScope EMC Ionix ControlCenter (formerly EMC ControlCenter) 6.0 StorageScope Best Practices Planning Abstract This white paper provides advice and information on practices that will enhance the flexibility of

More information

Microsoft Excel 2010 Tutorial

Microsoft Excel 2010 Tutorial 1 Microsoft Excel 2010 Tutorial Excel is a spreadsheet program in the Microsoft Office system. You can use Excel to create and format workbooks (a collection of spreadsheets) in order to analyze data and

More information

Excel Second Edition.

Excel Second Edition. Excel 2016 Second Edition LearnKey provides self-paced training courses and online learning solutions to education, government, business, and individuals world-wide. With dynamic video-based courseware

More information

Quick Guide Copyright Bureau van Dijk 2010 Last updated September 2010

Quick Guide Copyright Bureau van Dijk 2010 Last updated September 2010 Quick Guide Copyright Bureau van Dijk 2010 Last updated September 2010 Table Of Contents 1.0. INTRODUCTION... 1 1.1. HOW IT HELP YOU... 1 1.2. COVERAGE... 2 1.3. SOFTWARE OVERVIEW... 2 1.4. SYSTEM REQUIREMENTS...

More information

Microsoft How to Series

Microsoft How to Series Microsoft How to Series Getting Started with EXCEL 2007 A B C D E F Tabs Introduction to the Excel 2007 Interface The Excel 2007 Interface is comprised of several elements, with four main parts: Office

More information

Day 1 Agenda. Brio 101 Training. Course Presentation and Reference Material

Day 1 Agenda. Brio 101 Training. Course Presentation and Reference Material Data Warehouse www.rpi.edu/datawarehouse Brio 101 Training Course Presentation and Reference Material Day 1 Agenda Training Overview Data Warehouse and Business Intelligence Basics The Brio Environment

More information

KEY TERMS chart chart body Chart Wizard client object legend PDF XPS

KEY TERMS chart chart body Chart Wizard client object legend PDF XPS LESSON SKILL MATRIX Skill Exam Objective Objective Number Creating a Chart Using the Chart Wizard Add report controls 5.2.5 Formatting a Chart Modify data sources 5.2.4 Changing Chart Types Saving a Database

More information

Master Reports Guide. Table of Contents

Master Reports Guide. Table of Contents Table of Contents Welcome to Master Reports... 2 Report Basics... 2 Access Reports... 2 Download or Print a Report... 2 Report Help... 2 Save or Share a Report... 2 Master Report Formulas... 3 Filter a

More information

Quick Start Guide. ARIS Architect. Version 9.8 Service Release 2

Quick Start Guide. ARIS Architect. Version 9.8 Service Release 2 ARIS Architect Version 9.8 Service Release 2 October 2015 This document applies to ARIS Version 9.8 and to all subsequent releases. Specifications contained herein are subject to change and these changes

More information

Getting Started Guide. ProClarity Analytics Platform 6. ProClarity Professional

Getting Started Guide. ProClarity Analytics Platform 6. ProClarity Professional ProClarity Analytics Platform 6 ProClarity Professional Note about printing this PDF manual: For best quality printing results, please print from the version 6.0 Adobe Reader. Getting Started Guide Acknowledgements

More information

FLIR Tools+ and Report Studio

FLIR Tools+ and Report Studio Creating and Processing Word Templates http://www.infraredtraining.com 09-20-2017 2017, Infrared Training Center. 1 FLIR Report Studio Overview Report Studio is a Microsoft Word Reporting module that is

More information

Spreadsheet definition: Starting a New Excel Worksheet: Navigating Through an Excel Worksheet

Spreadsheet definition: Starting a New Excel Worksheet: Navigating Through an Excel Worksheet Copyright 1 99 Spreadsheet definition: A spreadsheet stores and manipulates data that lends itself to being stored in a table type format (e.g. Accounts, Science Experiments, Mathematical Trends, Statistics,

More information

BusinessObjects XI Integration for SAP Solutions User's Guide

BusinessObjects XI Integration for SAP Solutions User's Guide BusinessObjects XI Integration for SAP Solutions User's Guide BusinessObjects XI Integration for SAP Solutions Copyright 2008 Business Objects, an SAP company. All rights reserved. Business Objects owns

More information

Calendar & Buttons Dashboard Menu Features My Profile My Favorites Watch List Adding a New Request...

Calendar & Buttons Dashboard Menu Features My Profile My Favorites Watch List Adding a New Request... remitview User Guide 1 TABLE OF CONTENTS INTRODUCTION... 3 Calendar & Buttons... 3 GETTING STARTED.... 5 Dashboard.... 7 Menu Features... 8 PROFILE.... 10 My Profile... 10 My Favorites... 12 Watch List...

More information

Excel Tables & PivotTables

Excel Tables & PivotTables Excel Tables & PivotTables A PivotTable is a tool that is used to summarize and reorganize data from an Excel spreadsheet. PivotTables are very useful where there is a lot of data that to analyze. PivotTables

More information

User Manual. Administrator s guide for mass managing VirtueMart products. using. VM Mass Update 1.0

User Manual. Administrator s guide for mass managing VirtueMart products. using. VM Mass Update 1.0 User Manual Administrator s guide for mass managing VirtueMart products using VM Mass Update 1.0 The ultimate product management solution for VirtueMart! Contents Product Overview... 3 Feature List...

More information

MS Excel Advanced Level

MS Excel Advanced Level MS Excel Advanced Level Trainer : Etech Global Solution Contents Conditional Formatting... 1 Remove Duplicates... 4 Sorting... 5 Filtering... 6 Charts Column... 7 Charts Line... 10 Charts Bar... 10 Charts

More information

Juniata County, Pennsylvania

Juniata County, Pennsylvania GIS Parcel Viewer Web Mapping Application Functional Documentation June 21, 2017 Juniata County, Pennsylvania Presented by www.worldviewsolutions.com (804) 767-1870 (phone) (804) 545-0792 (fax) 115 South

More information

Product Documentation SAP Business ByDesign August Analytics

Product Documentation SAP Business ByDesign August Analytics Product Documentation PUBLIC Analytics Table Of Contents 1 Analytics.... 5 2 Business Background... 6 2.1 Overview of Analytics... 6 2.2 Overview of Reports in SAP Business ByDesign... 12 2.3 Reports

More information

Contents. Project One. Introduction to Microsoft Windows XP and Office Creating and Editing a Word Document. Microsoft Word 2003

Contents. Project One. Introduction to Microsoft Windows XP and Office Creating and Editing a Word Document. Microsoft Word 2003 FM TBBBB 39909 10/27/06 4:06 PM Page iii Contents FMTOC TBBBB 39909 Page iii 10/20/06 MD Preface To the Student Introduction to Microsoft Windows XP and Office 2003 ix xiv Objectives WIN 4 Introduction

More information

Admissions & Intro to Report Editing Participants Guide

Admissions & Intro to Report Editing Participants Guide IBM Cognos Analytics Admissions & Intro to Report Editing Participants Guide Welcome to Cognos - Admissions and Introduction to Report Editing! Today s objectives include: Gain a Basic Understanding of

More information

Links to Activities ACTIVITY 4.1. Links to Activities Links to Activities

Links to Activities ACTIVITY 4.1. Links to Activities Links to Activities ACCESS SUMMARIZING DATA AND CALCULATING IN FORMS AND REPORTS Section 4 Skills Use functions in a query to calculate statistics Summarize data in a crosstab query Summarize data in a PivotTable Summarize

More information

Introducing V3 Analytics A U G U S T

Introducing V3 Analytics A U G U S T Introducing V3 Analytics A U G U S T 2 0 1 7 Table of Contents Document Versioning 2 Introduction 3 Terminology 3 Analytics Platforms: V1 Analytics versus V2 Analytics versus V3 Analytics 3 Schedule 3

More information

CenterStone. Reports User Guide. Manhattan Software Inc. World Leading Real Estate, Asset & Facilities Management Software.

CenterStone. Reports User Guide. Manhattan Software Inc. World Leading Real Estate, Asset & Facilities Management Software. CenterStone Reports User Guide Version 1 Manhattan Software Inc. World Leading Real Estate, Asset & Facilities Management Software The information contained herein is the property of Manhattan Software,

More information

Nintex Reporting 2008 Help

Nintex Reporting 2008 Help Nintex Reporting 2008 Help Last updated: Thursday, 24 December 2009 1 Using Nintex Reporting 2008 1.1 Chart Viewer Web Part 1.2 Importing and Exporting Reports 1.3 Import Nintex report page 1.4 Item Level

More information

New Perspectives on Microsoft Excel Module 5: Working with Excel Tables, PivotTables, and PivotCharts

New Perspectives on Microsoft Excel Module 5: Working with Excel Tables, PivotTables, and PivotCharts New Perspectives on Microsoft Excel 2016 Module 5: Working with Excel Tables, PivotTables, and PivotCharts Objectives, Part 1 Explore a structured range of data Freeze rows and columns Plan and create

More information

Logi Ad Hoc Reporting System Administration Guide

Logi Ad Hoc Reporting System Administration Guide Logi Ad Hoc Reporting System Administration Guide Version 12 July 2016 Page 2 Table of Contents INTRODUCTION... 4 APPLICATION ARCHITECTURE... 5 DOCUMENT OVERVIEW... 6 GENERAL USER INTERFACE... 7 CONTROLS...

More information

Creating a Spreadsheet by Using Excel

Creating a Spreadsheet by Using Excel The Excel window...40 Viewing worksheets...41 Entering data...41 Change the cell data format...42 Select cells...42 Move or copy cells...43 Delete or clear cells...43 Enter a series...44 Find or replace

More information

EtatRequete.book Page 1 Mardi, 6. avril :01 15 Reports and Queries

EtatRequete.book Page 1 Mardi, 6. avril :01 15 Reports and Queries Reports and Queries WinDev 15 - WebDev 15 - WinDev Mobile 15 Documentation version 15(1) - 0410 Remember to visit our Web site (www.windev.com) on a regular basis to find out whether upgraded versions

More information

PREREQUISITES FOR EXAMPLES

PREREQUISITES FOR EXAMPLES 212-2007 SAS Information Map Studio and SAS Web Report Studio A Tutorial Angela Hall, Zencos Consulting LLC, Durham, NC Brian Miles, Zencos Consulting LLC, Durham, NC ABSTRACT Find out how to provide the

More information

User Guide. Visualizer

User Guide. Visualizer User Guide Visualizer Copyright 2018 Upland Software. All rights reserved. Information in this document is subject to change without notice. The software described in this document is furnished under a

More information

Microsoft Excel 2010 Handout

Microsoft Excel 2010 Handout Microsoft Excel 2010 Handout Excel is an electronic spreadsheet program you can use to enter and organize data, and perform a wide variety of number crunching tasks. Excel helps you organize and track

More information

ActiveReports 12 Server 1

ActiveReports 12 Server 1 ActiveReports 12 Server 1 Table of Contents Table of Contents 1-2 ActiveReports 12 Server Designer User Guide 3 Report Portal 3-7 Mobile Report Portal 7-11 Get Started with ActiveReports Web Designer 11-12

More information

Patricia Andrada Quick Guide Excel 2010 Data Management-July 2011 Page 1

Patricia Andrada Quick Guide Excel 2010 Data Management-July 2011 Page 1 Patricia Andrada Quick Guide Excel 2010 Data Management-July 2011 Page 1 Excel 2010 Data Management AutoFill and Custom Lists AutoFill 1. Select the range that contains the initial value(s) of the series

More information

Customizing and Administering Project Server Access

Customizing and Administering Project Server Access WEB Customizing and Administering Project Server Access In this chapter Creating and Deleting Users from Project Server 2 Managing User Groups Project Server User Security 4 Using Categories to Control

More information

Microsoft Excel 2010 Part 2: Intermediate Excel

Microsoft Excel 2010 Part 2: Intermediate Excel CALIFORNIA STATE UNIVERSITY, LOS ANGELES INFORMATION TECHNOLOGY SERVICES Microsoft Excel 2010 Part 2: Intermediate Excel Spring 2014, Version 1.0 Table of Contents Introduction...3 Working with Rows and

More information

Management Reports Centre. User Guide. Emmanuel Amekuedi

Management Reports Centre. User Guide. Emmanuel Amekuedi Management Reports Centre User Guide Emmanuel Amekuedi Table of Contents Introduction... 3 Overview... 3 Key features... 4 Authentication methods... 4 System requirements... 5 Deployment options... 5 Getting

More information

Creating Pentaho Dashboards

Creating Pentaho Dashboards Creating Pentaho Dashboards This document is copyright 2011 Pentaho Corporation. No part may be reprinted without written permission from Pentaho Corporation. All trademarks are the property of their respective

More information

The Domino Designer QuickStart Tutorial

The Domino Designer QuickStart Tutorial The Domino Designer QuickStart Tutorial 1. Welcome The Domino Designer QuickStart Tutorial You've installed Domino Designer, you've taken the Designer Guided Tour, and maybe you've even read some of the

More information