AspAlliance.com LogoASPAlliance: Articles, reviews, and samples for .NET Developers
URL:
http://aspalliance.com/articleViewer.aspx?aId=480&pId=-1
Reasons to Upgrade Your Web Application to Crystal 10
page
by Eric Landes
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 14875/ 19

Upgrading Crystal.NET 8.5 to Crystal 10

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();
CrystalReportViewer1.ReportSource=rptProd;
CrystalReportViewer1.DataBind();

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. 

Works Better in the Enterprise Environment
Crystal 10 now includes more native driver support, and better integration with ADO.NET.  Now, if you have created a dataset in your project, in your connection information you can point to the class.  You can either point to the dataset file or the class to be consumed as your data source.


There are a ton of native drivers as well.  Drivers like ACT!, Exchange Folder, Java Beans, NT Event Logs, IIS Log Files, give lots of flexibility in the types of data sources you can access.  And since these use native drivers, it seems to be something that would work well in the Enterprise.  I was surprised that the SQLClient .NET class was not included, but that’s probably something that won’t be included until the .NET framework is ubiquitous on the desktop.

Along with the scalability gains and gains in report designer functionality, Crystal will be included with the next release of Visual Studio.  That release (2005), will include a .NET version based on the Crystal Reports 10 engine.  It will still be scaled down, and only useable with Visual Studio, but using Crystal 10 now continues the upgrade path.

One thing that I didn’t see was an update of the report object model.  I would like to see logging onto different subreports a little easier, at least in the beginning.  I also would love to see automated report generation made a little easier.  Microsofts Reporting Services outputs the actual report format in xml.  I really like that approach, and would love to see that. 

Summary

Hopefully this article gives you an idea of the new features of Crystal Reports.  Keep in mind that Crystal also has other products that might be useful for your organization.  Products like Report Analysis, and Crystal Enterprise might make sense for organizations with large reporting needs.  I did not really touch on the reusability that has been included in this starting from Crystal 9. 

I like the Crystal Designer interface, for report programmers and power users.  I’ve found it powerful, but useable.  Many of the other reporting options do not include this as an option.  I think for a lot of organizations this along with familiarity of the Crystal product is a good reason to use it.  If that sounds like  your organization, you might want to look into the Crystal 10 upgrade for the reasons I’ve mentioned and more.  It has a lot to offer the Enterprise.  Keep on coding!

 


Product Spotlight
Product Spotlight 

©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-19 11:49:51 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search