Crystal Reports for Eclipse



Similar documents
Getting Started using the SQuirreL SQL Client

Tutorial: Android Object API Application Development. SAP Mobile Platform 2.3 SP02

Tutorial: Android Object API Application Development. SAP Mobile Platform 2.3

T320 E-business technologies: foundations and practice

Tutorial: Android Object API Application Development. Sybase Unwired Platform 2.2 SP02

Tutorial: BlackBerry Object API Application Development. Sybase Unwired Platform 2.2 SP04

NetBeans IDE Field Guide

Crystal Reports for Borland JBuilder

JBoss SOAP Web Services User Guide. Version: M5

Tutorial: Mobile Business Object Development. Sybase Unwired Platform 2.2 SP02

Eclipse installation, configuration and operation

Tutorial: Mobile Business Object Development. SAP Mobile Platform 2.3

Understanding class paths in Java EE projects with Rational Application Developer Version 8.0

Tutorial: setting up a web application

Tutorial: Mobile Business Object Development. SAP Mobile Platform 2.3 SP02

Upgrading Your Web Server from ClientBase Browser Version 2.0 or Above to Version 2.1.1

Using Crystal Reports with VFP

How to Install Eclipse. Windows

Epidefender Studio Installation notice

APIS CARM NG Quick Start Guide for MS Windows

Cloud Administration Guide for Service Cloud. August 2015 E

Creating XML Report Web Services

Generating Open For Business Reports with the BIRT RCP Designer

The cloud server setup program installs the cloud server application, Apache Tomcat, Java Runtime Environment, and PostgreSQL.

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

Designing portal site structure and page layout using IBM Rational Application Developer V7 Part of a series on portal and portlet development

Implementing a SAS 9.3 Enterprise BI Server Deployment TS-811. in Microsoft Windows Operating Environments

SDK Code Examples Version 2.4.2

Producing Listings and Reports Using SAS and Crystal Reports Krishna (Balakrishna) Dandamudi, PharmaNet - SPS, Kennett Square, PA

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

BusinessObjects Enterprise XI Release 2

L01: Using the WebSphere Application Server Liberty Profile for lightweight, rapid development. Lab Exercise

Instant Chime for IBM Sametime For IBM Websphere and IBM DB2 Installation Guide

Lab 0 (Setting up your Development Environment) Week 1

Backing Up and Restoring Microsoft Exchange Server Cloud Attached Storage. August 2012 Version 3.2

Tutorial: BlackBerry Application Development. Sybase Unwired Platform 2.0

Installing the Android SDK

Create a Web Service from a Java Bean Test a Web Service using a generated test client and the Web Services Explorer

Publishing, Consuming, Deploying and Testing Web Services

Setting up Sudoku example on Android Studio

Tutorial: Building a Dojo Application using IBM Rational Application Developer Loan Payment Calculator

IBM TRIRIGA Anywhere Version 10 Release 4. Installing a development environment

Introduction to Eclipse

Sophos Reporting Interface Creating Reports using Crystal Reports 2008

For Introduction to Java Programming, 5E By Y. Daniel Liang

SETUP SSL IN SHAREPOINT 2013 (USING SELF-SIGNED CERTIFICATE)

Informatics for Integrating Biology & the Bedside. i2b2 Workbench Developer s Guide. Document Version: 1.0 i2b2 Software Release: 1.3.

Adobe Dreamweaver CC 14 Tutorial

How To Run A Hello World On Android (Jdk) On A Microsoft Ds.Io (Windows) Or Android Or Android On A Pc Or Android 4 (

Create, Link, or Edit a GPO with Active Directory Users and Computers

Business Process Management IBM Business Process Manager V7.5

Crystal Reports. For Visual Studio.NET. Reporting Off ADO.NET Datasets

Feith Dashboard iq Server Version 8.1 Install Guide

An Oracle White Paper May Creating Custom PDF Reports with Oracle Application Express and the APEX Listener

EMC Documentum Composer

CRM Migration Manager for Microsoft Dynamics CRM. User Guide

Installation Logon Recording Basis. By AD Logon Name AD Logon Name(recommended) By Windows Logon Name IP Address

Building and Using Web Services With JDeveloper 11g

Teamcenter s manufacturing process management 8.3. Report Generator Guide. Publication Number PLM00064 E

Securing SAS Web Applications with SiteMinder

InfoView User s Guide. BusinessObjects Enterprise XI Release 2

How to use the Eclipse IDE for Java Application Development

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Crystal Reports Installation Guide

Using SQL Reporting Services with Amicus

Business Objects Enterprise version 4.1. Report Viewing

Getting Started. SAP HANA Cloud End-to-End-Development Scenarios. Develop your first End-to-End SAP HANA Cloud Application Scenario. Version 1.4.

Intelligent Event Processer (IEP) Tutorial Detection of Insider Stock Trading

Sage ERP Accpac 6.0A. SageCRM 7.0 I Integration Guide

ORACLE BUSINESS INTELLIGENCE WORKSHOP

3. Installation and Configuration. 3.1 Java Development Kit (JDK)

Publishing Geoprocessing Services Tutorial

Fahim Uddin 1. Java SDK

App Orchestration 2.5

1 Building, Deploying and Testing DPES application

etoken Enterprise For: SSL SSL with etoken

Connecting System Platform to TOP Server. Using the SuiteLink DI Object

Installing (1.8.7) 9/2/ Installing jgrasp

Publishing KML Services Tutorial

Livezilla How to Install on Shared Hosting By: Jon Manning

Copyright 2014, SafeNet, Inc. All rights reserved.

Witango Application Server 6. Installation Guide for Windows

Deploying a Logi Info Application on WAS

BIRT Application and BIRT Report Deployment Functional Specification

Introduction: The Xcode templates are not available in Cordova or above, so we'll use the previous version, for this recipe.

Android Programming: Installation, Setup, and Getting Started

Migrating MSDE to Microsoft SQL 2008 R2 Express

Struts Tools Tutorial. Version: M5

Citrix Systems, Inc.

Packaging and Deploying Java Projects in Forte

Product Guide Nintex. All rights reserved. Errors and omissions excepted.

BusinessObjects Enterprise InfoView User's Guide

Crystal Reports. For Visual Studio.NET. Designing and Viewing a Report in a Windows Application

Oracle Fusion Middleware

DigitalPersona Pro Server for Active Directory v4.x Quick Start Installation Guide


USING STUFFIT DELUXE THE STUFFIT START PAGE CREATING ARCHIVES (COMPRESSED FILES)

E-commerce. Further Development 85

Transcription:

Crystal Reports for Eclipse Table of Contents 1 Creating a Crystal Reports Web Application...2 2 Designing a Report off the Xtreme Embedded Derby Database... 11 3 Running a Crystal Reports Web Application... 20 4 Creating a New Viewer Page... 22 5 Snippets... 25 6 Help... 28

1 Creating a Crystal Reports Web Application Crystal Reports for Eclipse includes many tools to assist developers with the building of applications that require a powerful and versatile presentation layer. One such tool is the Crystal Reports Web Application wizard which will walk users through the creation of a web application which will contain Crystal Reports. This tutorial will explain the steps a user will follow to complete this process 1) Select File New Project 2) Expand the Crystal Reports folder and select Crystal Reports Web Project. 3) Click Next. 4) Give the project a name in the Name: field. 5) Make sure Tomcat is configured with a path to the Java SDK. You should only have to do this once in your workspace: PAGE 2

a. Go to Target runtime:, and click New. b. Expand Apache and select Apache Tomcat v5.0. Click Next. PAGE 3

c. Specify the Tomcat installation directory:, e.g. C:\Program Files\Business Objects\Tomcat. d. Click Installed JREs. e. Click Add f. For JRE name, specify JDK 1.4.2. g. For JRE home directory, specify your Java SDK directory, e.g. C:\j2sdk1.4.2_08. PAGE 4

h. Click OK. i. Select JDK 1.4.2 in the Installed JREs list. j. Click OK. k. Under the JRE field in the New Server Runtime dialog, select JDK 1.4.2. PAGE 5

l. Click Finish. 6) Click Next >. 7) The next page of the wizard presents the user with the option select which facets they wish to add to the application. A facet defines which runtime environments will be added to the application. By default the Crystal Reports Java Reporting Component will be selected PAGE 6

8) Click Next >. 9) Users can modify the Context Root for their application on this next page of the wizard. For this demo we will keep the default settings. Click Next >. PAGE 7

10) This next dialog allows users to choose whether they wish to add our sample database and reports as well as a new blank report to their web application PAGE 8

11) Click Finish to create your project. 12) When asked to accept the Sun license agreement to cache http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd, click I Agree. PAGE 9

13) Click Yes to open the J2EE perspective. The J2EE Perspective will contain a Project Explorer which allows the user to navigate the different projects contained in their workspace. When the user expands the Dynamic Web Project heading in the Project Explorer they should notice their newly created web application. This web application will contain all of the required files for generating reports at runtime. As well, if users opted to add the sample reports and database they will notice a folder titled Samples within the Web Content folder containing the 3 sample reports. Finally, if the user opted to add a new Blank Crystal Report file to the project they should notice 2 files within the root of the Web Content folder. One will be titled Crystal Report1.rpt which is the report file, and the other will be titled CrystalReport1-viewer.jsp which is a Java Server Page containing the required code to view the new report over the web. PAGE 10

2 Designing a Report off the Xtreme Embedded Derby Database This release of Crystal Reports for Eclipse includes a sample database built using Apache s open source Derby Database. This is added to new Crystal Reports Web Projects by default to allow users to get up and running in no time. For other data sources Crystal Reports for Eclipse includes a Deployment Assistance feature which will assist developers by attempting to ensure that the required database drivers are present at runtime. Follow the steps below to create a new report off of our Xtreme Sample Database 1) After the Crystal Reports Web Project has been created, you should notice that a file titled CrystalReports1.rpt has been added to the Web Content folder of the newly created Web Project. Double-clicking this file will open it up in the Crystal Reports editor. This action should also change the user s Eclipse Perspective to be Crystal Reports 2) Go to the Database Explorer 3) Right-click on the Connections node and choose New Connection PAGE 11

4) This action will launch the Database Explorer wizard. Expand the Derby entry in the Database Manager and select the 10.1 option 5) For the Database location enter classpath:/xtreme.this will allow the engine to look for the Derby database within a JAR file located in the CLASSPATH. 6) Set the information in the dialog to the following. For the Class location, select both the derby.jar and Xtreme.jar from your.\eclipse\plugins\com.businessobjects.crystalreports.samples_1.0.0.vx XX\SampleDatabases directory: PAGE 12

7) The JDBC driver class and Connection URL should be automatically populated. 8) Click Test Connection to ensure that you can connect to the database 9) Click Next, and then click Finish. PAGE 13

10) From the Database Explorer, expand Xtreme / Schemas / APP / Tables to see the available tables 11) Drag the CUSTOMER and ORDERS tables onto the report. Alternatively, you can right-click a table and select the option Add to New Report or Add to Current Report 12) This will add the CUSTOMER and ORDERS table to the Data pane of the Crystal Reports editor. Create a relationship between the two tables by dragging the CUSTOMER_ID field from the CUSTOMER table and dropping it on the CUSTOMER_ID field on the ORDERS table PAGE 14

13) In the report designer, switch back to the Layout tab to begin designing the report 14) From the Field Explorer, right-click on the COUNTRY field in the CUSTOMER table and select the option to Group on Field. This will group all of the data report based on Country PAGE 15

15) Repeat this same step to add a group based on the CUSTOMER_NAME field from the CUSTOMER table. You will notice that Crystal Reports includes pre-existing logic to decrease the group-level font size as you add more groups. Obviously the report designer will be able to format these fields as they deem necessary. Your report should now look similar to the layout below: PAGE 16

16) Now select ORDER_ID, ORDER_AMOUNT and ORDER_DATE from the ORDERS table. Drag the multiple selection and drop in the Body section of the report. This will add the 3 data fields to the Body section as well as 3 data labels to the Page Header section 17) Right-click on the ORDERS.ORDER_AMOUNT field and select the Summarize option PAGE 17

18) This will add a Summary field to the Group1 Footer section. 19) Add some minimal report formatting to adjust the section heights. You can do this via the Properties view of each section by changing the Height property. Alternatively, you can drag the height indicator of the section to reduce or increase the size of the height. 20) Additionally add some text formatting to highlight Group Headings and Total amounts 21) Click on the Preview tab to preview the report. Your report should look similar to the following: PAGE 18

This guide is intended to be an introduction to the product. It is recommended that the user continues to experiment with the available properties and Report Objects to create the required level of formatting. Additional guides exploring advanced report PAGE 19

design techniques will be made available on Business Objects Eclipse Zone (http://diamond.businessobjects.com/eclipse) 3 Running a Crystal Reports Web Application Running a report in a web application is a very simple process within Crystal Reports for Eclipse. By default, the blank report which is added to the Crystal Reports Web Project has an accompanying JSP which will serve up the report viewer at runtime. This file will be named CrystalReport1-viewer.jsp and should be found in the root of the Web Content folder. 1) In the Project Explorer, right-click on CrystalReport1-viewer.jsp. 2) Select Run As Run on Server. 3) Select Apache / Tomcat v5.0 Server and click Next. 4) Make sure CrystalReportsForEclipse (or whatever you named your project) is listed under Configured projects:, and click Finish. 5) This will launch CrystalReport1-viewer.jsp in an Internet browser window embedded in the IDE (note: if your Tomcat server was configured to use a JRE instead of a JDK you may experience an error at this point as Tomcat will not be able to compile the JSP): PAGE 20

PAGE 21

4 Creating a New Viewer Page Creating a new Viewer JSP page off existing reports is just as easy as using the default viewer page which was created in Step 5. In this demo we will build a Crystal Reports viewer JSP page to show the Sample Reports included with this release of Crystal Reports for Eclipse 1) Expand the Web Content\Sample Reports folder in the Navigator or Project Explorer view. 2) Right-click on Consolidated Balance Sheet.rpt and select the Crystal Reports - > Create Viewer JSP option PAGE 22

3) This action will launch a wizard which will provide the Developer with a number of options. Crystal Reports for Eclipse includes a feature which will auto-generate stub code to assist developers with coding common tasks (e.g. authenticating against the database, passing in parameter values, exporting, etc.). There are additional tutorials available on the Crystal Reports for Eclipse developer zone which go into this feature in more detail. For the sake of this demo we will select the default option: Insert standard Tag Lib code PAGE 23

4) Clicking OK on this wizard will add a new file to the same folder as the report called Consolidated Balance Sheet-viewer.jsp 5) In the Project Explorer, right-click on Consolidated Balance Sheet-viewer.jsp. 6) Select Run As Run on Server. 7) Select Apache / Tomcat v5.0 Server and click Next. 8) Make sure CrystalReportsForEclipse (or whatever you named your project) is listed under Configured projects:, and click Finish. 9) This will launch Consolidated Balance Sheet-viewer.jsp in an Internet browser window embedded in the IDE. PAGE 24

5 Snippets Often developers will want to have more control over the final outcome of their presentation layer. As mentioned in the previous section Crystal Reports for Eclipse provides developers with the Viewer JSP Wizard to auto-generate custom code to assist them with the development of applications using our Java APIs. Additionally, this release also provides a number of code snippets which will allow users to drag-and-drop code into their JSP page. These snippets provide the developer with more control over where the code snippet will be generated. The following snippets are provided in this release of Crystal Reports for Eclipse: 1. Crystal Reports Viewer Tag this will insert the required Crystal Reports Viewer Tag Library code. The only parameter required by this snippet is the name of the report file the viewer should be bound to 2. Open and View Report This will open the report using the Java Reporting Component API and view it using the Viewer API. 3. Open Report This will open the report and create a ReportSource object. This snippet should be used in conjunction with one of the Viewer or Export snippets 4. View Report This snippet will add the required Viewer API calls to a page. It will require a ReportSource object which can be returned from the Open Report snippet 5. View Report and Set Database Logon - This snippet will add the required Viewer API calls as well as the required calls to authenticate against the database add runtime. It will require a ReportSource object which can be returned from the Open Report snippet 6. Export Report to PDF - This snippet will add the required exporting calls to a page. It will require a ReportSource object which can be returned from the Open Report snippet 7. Export Report to RPT - This snippet will add the required exporting calls to a page. It will require a ReportSource object which can be returned from the Open Report snippet To access the snippets follow these steps 1) Switch to the J2EE perspective. If it is not open then select it under Window- >Open Perspective->Other 2) A Snippets view will be added to the bottom-center portion of the IDE 3) Expand the Crystal Reports heading PAGE 25

4) Create a new JSP page (e.g. test.jsp) by right-clicking on the Web Content folder of the Crystal Reports Web Project and selecting New->JSP PAGE 26

5) Drag-and-drop the Open and View Report snippet from the Snippets view to the JSP page (between the <BODY> tags) 6) Enter /CrystalReport1.rpt as the Value for the reportname variable. PAGE 27

7) Click Insert. This will insert the code snippet into the source of the JSP page. 8) Test the new JSP by right-clicking on it and selecting the Run On Server option. 6 Help Crystal Reports for Eclipse contains the following Help Guides installed in the Eclipse Help System: 1. Crystal Reports for Eclipse Designer Guide this help guide provides additional information and assistance with using the Crystal Reports editor, such as built-in formula functions, adding database connections and modifying report object property values 2. Crystal Reports for Eclipse Developer Guide this help guide provides additional developer resources, such as code snippets, walk-throughs and JavaDocs. PAGE 28