CRYSTAL REPORTS IN VISUAL STUDIO.NET 2003



Similar documents
How To: Create a Crystal Report from ADO.NET Dataset using Visual Basic.NET

CRM Setup Factory Installer V 3.0 Developers Guide

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

Sophos Reporting Interface Creating Reports using Crystal Reports 2008

The purpose of this document is to describe how to connect Crystal Reports with BMC Remedy AR System using ODBC.

Creating Reports Using Crystal Reports

INTRODUCTION: SQL SERVER ACCESS / LOGIN ACCOUNT INFO:

Chapter 4 Accessing Data

Tutorial on Building a web Application with Jdeveloper using EJB, JPA and Java Server Faces By Phaninder Surapaneni

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

MS Enterprise Library 5.0 (Logging Application Block)

Introduction to Visual Basic and Visual C++ Database Foundation. Types of Databases. Data Access Application Models. Introduction to Database System

Affiliation Security

Developing Own Crystal Reports

Crystal Reports Payroll Exercise

Oracle Business Intelligence Publisher: Create Reports and Data Models. Part 1 - Layout Editor

CPM release notes

The VB development environment

Oracle Fusion Middleware

IBM DB2 XML support. How to Configure the IBM DB2 Support in oxygen

Human Computer Interaction Final Project Tutorial. Hardware Inventory Management System (HIMS) By M. Michael Nourai

State Analytical Reporting System (STARS)

IS466 Decision Support Systems. SQL Server Business Intelligence Development Studio 2008 User Guide

Crystal Converter User Guide

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide

BRIO QUERY FUNCTIONALITY IN COMPARISION TO CRYSTAL REPORTS

How To Use Query Console

4. The Third Stage In Designing A Database Is When We Analyze Our Tables More Closely And Create A Between Tables

Chapter 4 Displaying and Describing Categorical Data

Microsoft Excel 2007 Level 2

Business Objects Version 5 : Introduction

The New Dataroom Center Administration in. Brainloop Secure Dataroom Service Version Administrative Guide for Dataroom Center Managers

Integration Overview. Web Services and Single Sign On

Managing your Joomla! 3 Content Management System (CMS) Website Websites For Small Business

Toad for Data Analysts, Tips n Tricks

ORACLE BUSINESS INTELLIGENCE WORKSHOP

VB.NET - DATABASE ACCESS

MICROSOFT EXCEL 2010 ANALYZE DATA

Whitepaper. HR Dashboard STRATEGIC VALUE CREATION USING MICROSOFT REPORTING SERVICES YOUR SUCCESS IS OUR FOCUS

Excel 2010: Create your first spreadsheet

DEVELOPING CONTRACT - DRIVEN WEB SERVICES USING JDEVELOPER. The purpose of this tutorial is to develop a java web service using a top-down approach.

Hands-On Lab. Client Workflow. Lab version: Last updated: 2/23/2011

To create a histogram, you must organize the data in two columns on the worksheet. These columns must contain the following data:

Working with SQL Server Integration Services

ORACLE BUSINESS INTELLIGENCE WORKSHOP

Query JD Edwards EnterpriseOne Customer Credit using Oracle BPEL Process Manager

USC Aiken CMS Manual. A manual on using the basic functions of the dotcms system. Office of Marketing and Community Relations-USC Aiken

No Stress Tech Guide To Crystal Reports XI: For Beginners. By Dr. Indera E. Murphy

1. Tutorial - Developing websites with Kentico Using the Kentico interface Managing content - The basics

Microsoft Excel 2007 Mini Skills Overview of Tables

darlingharbour.com Content Management System Tenant User Guide

Microsoft Query, the helper application included with Microsoft Office, allows

Top 10 Oracle SQL Developer Tips and Tricks

Microsoft Office 365 Portal

Visual Basic. murach's TRAINING & REFERENCE

How To Use Syntheticys User Management On A Pc Or Mac Or Macbook Powerbook (For Mac) On A Computer Or Mac (For Pc Or Pc) On Your Computer Or Ipa (For Ipa) On An Pc Or Ipad

Business Insight Report Authoring Getting Started Guide

Database Studio is the new tool to administrate SAP MaxDB database instances as of version 7.5.

Building an Agile PLM Web Application with JDeveloper and Agile 93 Web Services

Participant Guide RP301: Ad Hoc Business Intelligence Reporting

Intranet Website Solution Based on Microsoft SharePoint Server Foundation 2010

How to Connect to CDL SQL Server Database via Internet

Microsoft Access 2010 Part 1: Introduction to Access

ASP.NET Programming with C# and SQL Server

Helix Practice Manager

Finance Reporting. Millennium FAST. User Guide Version 4.0. Memorial University of Newfoundland. September 2013

Express222 Quick Reference

Building and Using Web Services With JDeveloper 11g

By: Peter K. Mulwa MSc (UoN), PGDE (KU), BSc (KU)

BID2WIN Workshop. Advanced Report Writing

Elisabetta Zodeiko 2/25/2012

Crystal Reports Installation Guide

Building A Very Simple Web Site

RESOURCE AND PATIENT MANAGEMENT SYSTEM. Patient Goals. User Manual. Version 1.0 July 2012

New 11g Features in Oracle Developer Tools for Visual Studio. An Oracle White Paper January 2008

Crystal Reports.NET Programming

Search help. More on Office.com: images templates. Here are some basic tasks that you can do in Microsoft Excel 2010.

Microsoft Excel 2010 Part 3: Advanced Excel

MyOra 3.0. User Guide. SQL Tool for Oracle. Jayam Systems, LLC

Creating XML Report Web Services

Using Ad-Hoc Reporting

Beginning C# 5.0. Databases. Vidya Vrat Agarwal. Second Edition

Helpdesk Portal End User Guide

SQL Server for developers. murach's TRAINING & REFERENCE. Bryan Syverson. Mike Murach & Associates, Inc. Joel Murach

Website User Guide.

Skills for Employment Investment Project (SEIP)

ACCESSING IBM iseries (AS/400) DB2 IN SSIS

SmartConnect Users Guide

Business Objects. Report Writing - CMS Net and CCS Claims

Introduction to Microsoft Access 2010

account multiple solutions

Getting Started with Crystal Reports Session Description:

emarketing Manual- Creating a New

IT462 Lab 5: Clustering with MS SQL Server

What s new in Excel 2013

Transitioning from TurningPoint 5 to TurningPoint Cloud - NO LMS 1

Transcription:

CRYSTAL REPORTS IN VISUAL STUDIO.NET 2003 By Srunokshi Kaniyur Prema Neelakantan This tutorial gives an introduction to creating Crystal reports in Visual Studio.Net 2003 and few of the features available in Crystal reports that can be used in customizing and displaying data. The first part of the tutorial deals with creating a simple report template or layout with basic functionalities using Crystal report tool in Visual Studio and the second part deals with integrating the report into an ASP.NET application. Part 1 - Creating the crystal report Create a new ASP.NET web project inside a.net solution. To add the crystal report item right click on the project and do the following (Add New Item - > select Crystal Report -> Change the report name but without changing the extension.rpt).

The next step is to create the report and add tables to it. The crystal report gallery allows you to choose from a wide variety of pre defined report options such as standard, cross tab, forms, sub reports, drill down reports. This example uses the standard report format. The screenshot for choosing the report type is shown below. After choosing the report type the next step is to select a data source for the report. A wide range of data sources such as OLE DB, ODBC, ADO.NET, XML etc. are available. Based on the application and requirement the data source can be selected. The example uses the oracle database in the following way (Select OLE DB connections->choose OLE DB provider for Oracle->Provide the following details service: oracle; username: your username; password: corresponding password).

Once the data source is selected we can select the Tables from the schema (for e.g. here we select the tables form the schema srunokpn). The Tables are selected depending on the fields that must be displayed on the report. The table listing can be found by expanding the selected data source from the available data sources. One or more tables can be chosen to provide data for the report. The screenshot that shows how to select the table for a report is shown below.

The relationships between the tables from the perspective of the report can be done on the links tab of the standard report dialog. Linking is needed to match the records of one table with the corresponding records of the other or in other words reinforces the join constraint. The linking options of the tables are shown in an Entity Relationship diagram manner. The screenshot of the linking of the tables used in the report is shown below.

From the database tables, select the fields and drag those fields and drop those fields in the detail column of the report. The report layout can be adjusted by moving the fields anywhere in the header and details band. The following is the screenshot of how it looks after dropping fields in the report.

The data to be displayed on the report can be sorted and grouped by specific fields that are available on the report. The grouping is mainly done to categorize records in more meaningful manner. In this example the grouping is done based on the department name. The screen shot below shows how to specify the field for grouping data. For selecting group field use the Insert Group and select the field by which the data needs to be grouped. (Note: If the heading for the field should be repeated under every group drag and drop the field title below the group name). The records can be sorted to be arranged in a meaningful manner like either in ascending or descending order. This can be done using Sort expert.

The other useful feature available in crystal report is the formula editor. The formula editor is used to perform simple arithmetic calculations and for writing custom functions. In this example we will add a simple formula to the report that calculates the total number of employees in each department. This is the screenshot of how to use a formula editor to add formulas to the report. So far we have seen how to create a simple report using crystal report tool available in Visual Studio.NET. As you can clearly see the use of crystal report makes reporting so much easier than writing custom code to develop a similar report. In the next part we will see how to integrate the crystal report into an ASP.NET web application.

Part 2 - Integrating crystal report into ASP.net application This part of the tutorial deals with the code required for integrating the crystal report that we created in Part 1 into an ASP.net application. Create a new web form in the same.net project in which the crystal report file was created. Drag and drop the crystal report viewer and a button from the tools library into the web form. The crystal report viewer is available under Web Forms control (if needed change the ID and text).

Include the following import statement, declaration in the aspx.vb page. Imports CrystalDecisions.Shared Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.ReportSource Imports System.IO The following declarations also needs to be done, Private crtablelogoninfos As New TableLogOnInfos Private crtablelogoninfo As New TableLogOnInfo Private crconnectioninfo As New ConnectionInfo Private CrTables As Tables Private CrTable As Table Then write the following code for the on button click event. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try // this part of the code is written to set up the connection crconnectioninfo.servername = "ORACLE" crconnectioninfo.databasename = "" crconnectioninfo.userid = "userid" crconnectioninfo.password = "password" CrTables = crreportdocument.database.tables For Each CrTable In CrTables crtablelogoninfo = CrTable.LogOnInfo crtablelogoninfo.connectioninfo = crconnectioninfo CrTable.ApplyLogOnInfo(crtableLogoninfo) Next CrystalReportViewer1.DisplayGroupTree = False CrystalReportViewer1.ReportSource = crreportdocument Catch ex As Exception Label1.Text = ex.message End Try End Sub

Save and set the aspx as the startup page for the web application or ASP.net project. Build (ctrl + shift + b) and run (F5) the project. The following will be the final output screenshot. As you can see from this tutorial how simple it is to create reports using crystal report tool available in Visual Studio.NET and integrate it with an ASP.NET application. One of the most obvious benefits of using the above approach is that it decouples the reporting and application development inside an application. Apart from it the use of Crystal Report makes report a whole lot easier that writing custom code to design and develop report.