Now that Crystal Reports 10 (CR 10) has been out a while, I wanted to go over some reasons to upgrade, and what you might encounter when upgrading. There are a lot of reporting options out there and this may give you some ideas as to how Crystal 10 could figure into your toolset.
Because Crystal.NET comes with Visual Studio .NET many .NET programmers are more familiar with Crystal.NET than other reporting options. This makes Crystal an easy choice because of familiarity. Keep in mind the licensing restrictions on web application. If you’re using any of the Crystal products on your web site, make sure you understand their licensing. It can be tricky!
Crystal.NET is the version of Crystal that comes with all versions of Visual Studio .NET. Whidbey (or Visual Studio 2005) will include a version of CR.NET. Keep in mind that there is an additional cost when upgrading to CR 10, which is the latest full-featured version of Crystal Reports. This includes a standalone Report Designer as well as the designer you are used to in Visual Studio .NET
Any Visual Studio .NET developer wanting to use reporting software should be familiar with using Crystal Reports since it ships with Visual Studio .NET. CR 10 has addressed some of the issues that the initial .NET version was lacking. Things like exporting to pdf is easier, ADO.NET integration has been beefed up, and the ability to dynamically create a report is possible. The report parts viewer and use of report parts introduce reusability to your reports. And the next version of Visual Studio.NET will include a version of Crystal Reports branched from the CR 10 build.
The New Viewer Server Control
If you have used Crystal .NET in an ASP.NET application, then you are familiar with the original Crystal Viewer web server control. This control had limited functionality, most notably client side printing was a pain to implement. Normally, you had to export to a pdf file, and then redirect it to the browser. Assuming that your users had acrobat reader installed on their machines, everything was okay. However if this was a public internet site, those assumptions couldn’t be made. But for most intranets, this was an acceptable solution.
While that was an acceptable solution, a lot of coding was required to accomplish this. For an example, see this article on how to apply parameters and logon to display Crystal reports in a web application. It also was seen as a step back for those familiar with Crystal and classic asp. The old version included Active X components that allowed client side printing in the viewer. That functionality was taken away since the web control shipped is a server control.
With CR 10’s viewer server control, that has changed. This viewer has client side printing functionality already built in. It actually does the export to pdf, to allow client-side printing without a lot of code. I love the fact that I don’t have to code this, and it’s long overdue from Crystal. I’ve tested it on IE 5.5 and 6.0 machines with no problems. This control also contains built in export buttons, without requiring any coding. It exports to the Crystal, Adobe, MS Word, MS Excel, and Rich Text Format. Again, this is without any coding, and nice.
So, to view a report to print (that has no parameters) the code in the code-behind file could be as simple as:
ReportTest1 rptProd = new ReportTest1();
Assuming that ReportTest1 is a CR 10 report that is part of the web project.
Another control allows you to display Report Parts. The Web Forms Report Part Viewer allows you to display parts of a report (say a chart). If you are implementing this reusability aspect of Crystal Reports, you can utilize this control. This might be useful as part of a Portal. This also might be helpful if you’re gong to be developing for wireless applications. For the Parts Viewer the printing and export buttons are not available.