Generating a Simple Crystal Report using VS 2005
(Page 1 of 7 )
Crystal Reports has become a very versatile application for generating reports, particularly if you use Visual Studio. This article will guide you through generating a report using this tool. It takes the wizard approach, and uses copious screen shots to keep you on track.
Crystal Report
It is relatively easy to retrieve data from a database and display it using any of the bound controls. This is especially so in ASP.NET 2.0 where the amount of code you need to write has been drastically reduced. However, to present the data in a formal, board-room friendly format and distribute it in hard copy, or for look-up, or both is challenging. Crystal Reports does this remarkably well. Microsoft has been bundling Crystal reports ever since the VB days, and it ships with every version of VS 2005. It is well integrated with Visual Studio 2005 as we shall see shortly. For highly functional and aesthetically pleasing report generation, Crystal Report is ideally suited. It is very versatile and can use data from a variety of databases as well as non-traditional sources.
Crystal Report comes with its own SDK which can be used to programmatically create reports and interact with them at run time, if one desires do so. Crystal Reports can be us in either Windows or a web application. It can be stand alone or made available over the Internet. These reports can be utilized in many different ways: application embedded reports; reports from web servers; as web services; and so forth. In VS 2005 you find two Crystal Report objects, the CrystalReportViewer and the ReportDocument as shown in the next picture.

The Object Browser reveals the various classes that are integrated with the Visual Studio application as shown in the next picture.

The Objective of this tutorial
The main objective of this tutorial is to give the reader enough guidance in generating a report easily using this tool. This hands-on approach should give enough confidence for the user so that he can experiment himself using this basis. In this tutorial, the report document will retrieve a filtered set of data from the back end SQL 2005 Server using an OLEDB connection. This tutorial uses the wizard approach to report generation as this is the simplest of the methods. There are basically three major steps in report creation, and these are described exhaustively with screen shots that the reader will encounter while creating the report.

Next: Creating a Crystal Report Project >>
More .NET Articles
More By Jayaram Krishnaswamy