Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

0. 1 Preface

With the release of Visual Studio .NET, Microsoft gave programmers the first powerful report writing tool that is completely integrated into the development environment. Crystal Reports has been included with previous versions of Visual Studio in the past, but never with this degree of integration. With this book, programmers can now build a powerful reporting solution using the standard Visual Studio .NET installation.

Who this Book Is For

This book is for programmers that are new to Crystal Reports as well as programmers that are experienced with Crystal Reports. If you are new to Crystal Reports, you will be shown how easy it is to quickly create your first report and add it to your project. As you want to learn more reporting features you can turn to the appropriate chapter and see how easy it is to make your reports more professional. If you are experienced with Crystal Reports, you will be interested in learning what the .NET version of Crystal Reports lets you do as well as what its limitations are. Learning how to perform runtime report customization will let you take your reporting solution to the next level.

.NET Version Differences

When Business Objects updated Crystal reports for Visual Studio .NET 2005, they made many significant improvements over the 2003 release. The user interface was cleaned up, database connectivity was significantly improved, and many new features were added. However, when .NET 2008 was released, very little was added to the product. The biggest difference is that Crystal Reports now supports Windows Vista and Windows Server 2003, reporting from LINQ objects, ClickOnce deployment, and 64 bit development. The book will let you know when something only works in .NET 2008 and not .NET 2005.

This book was written with Visual Studio .NET 2008 and this the version that the screen shots are taken from. There are a few minor differences in menu options and screen shots, but the two products are practically the same.

How the Book is Organized

This book is divided into two parts: Part I – Designing Reports and Part II – Programming Reports. Each part is designed for two different types of report development.

Part I – Designing Reports is for the user who has either never used Crystal Reports before or has used a previous version and wants to get up to speed on the .NET version. It walks you through the steps of creating reports using the report designer. You are also shown how to add sophistication to your reports by learning how to program with Crystal Syntax and Basic Syntax.

Part II – Programming Reports is for the advanced programmer who has mastered the art of designing reports and wants to take their reports to the next level by customizing them during runtime. You will learn the intricacies of how the Crystal Reports object model is designed. This lets you take control of the report during runtime. Unlike Part I which is focused on using the Report Designer, Part II focuses on writing code with either VB.NET or C#.

Which Language: VB.NET or C#?

One thing that makes .NET so interesting is the fact that VB.NET and C# are almost equal. Choosing the programming language used on a project becomes more of personal decision rather than a technological decision. However, this really complicates things for the authors of .NET books. When planning a new book, it seems that one of the biggest decisions a publishing company makes is deciding which language to focus on. From the many book reviews I’ve read, no one is ever happy with the decision.

In this book, I’ve decided to use both languages. The first listing is always VB.NET and the second listing is C#. There are a few instances where I show just the VB.NET code, but this is only when the code is one or two lines long and the C# listing is identical (except needing a semi-colon at the end).

All the examples in this book declare object variables using the fully qualified class name. This lets you see the namespaces that are used to reference a class. When learning a new object model, it’s easy to get confused as to which namespace a class belongs to. The downside of doing this in a book is that it can make the variable declarations very long and harder to understand. It is often impossible to fit the entire namespace on a single line in the book. This requires putting the remainder of the namespace on the next line. In VB.NET this isn’t syntactically correct and you will have to modify your code so that the code fits on a single line. I suggest that you either use the VB.NET Imports statement or the C# using statement to reference the namespaces directly. This will condense your code and make your it easier to read.

Installing Crystal Reports

Crystal Reports for .NET is included with Visual Studio .NET. When you install Visual Studio .NET it is one of the tools installed by default. After installation, Crystal Reports is listed as one of the components that can be added to a project.

Crystal Reports for .NET is not included in the VB.NET or C# Standard versions. You need to purchase one of the Visual Studio .NET packages to get Crystal Reports.

Installing Service Packs

It is critical that you go to the Business Objects website on a regular basis to check for new downloads. In fact, you should put down the book right now and install the lastest service packs.

There are two types of downloads available: Service Packs and Hot Fixes. Service packs are released every six months. They include comprehensive bug fixes and additional features. Service packs have also been regression tested. Hot fixes are released at the beginning of each month. They include minor bug fixes and have not been as thoroughly tested as service packs. The download URL is:

https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/
bobj_download/main.htm

Download the Sample Code

The sample code for this book can be found at www.CrystalReportsBook.com.

Online Forum Community

The book’s online forum is available to everyone. You can read the threads, or register to post questions and answers. Registration is free. The more you participate, the better the forum becomes! The forum is at the following URL:

www.CrystalReportsBook.com/Forum

How to Contact Me

I can be reached via the book’s online forum. There is a section called Speak with the Author where you can post messages to me that are not related to Crystal Reports problems.

Preface