Lessons Learned: Sorting out Crystal Reports 2008 Versioning, Service Packs and Deployment
 
Published: 24 Sep 2008
Abstract
Moving reports in a sizable application from Crystal Reports for Visual Studio 2005 to Crystal Reports 2008 can be a frustrating transition. This article provides guidance based on the lessons the author has learned from her development experience. After providing a brief history and comparison of different versions of Crystal Reports, she examines the development of applications using Crystal Reports under Windows Vista 64 bit and gives some tips to avoid potential problems along with a brief outline of Redistribution of Reports.
by Julia Lerman
Feedback
Average Rating: 
Views (Total / Last 10 Days): 56392/ 126

Introduction

Since I began developing with Visual Basic around 1996 or 1997, I have been using some form of Crystal Reports (CR) to design reports. As CR has evolved over time, I have had to frequently spend more time than I would like to remember not only updating my development environment and reports, but supporting clients with new runtimes. I am sure that my move from Crystal Version 6 directly to Crystal Version 8.5 will go down in history as my worst-ever upgrade experience. But with that behind me, I battle on and have remained loyal because Crystal has always allowed me to create great reports for my clients.

At the start of this year I wrote an ASPAlliance article entitled "What Visual Studio Developers Should Know about Crystal Reports 2008." At the time, the existing version of CR 2008 was not yet compatible with VS2008 and you could only use the embedded version that came "in the box." Since then, an update has been released and it is now possible to use CR 2008 (with many more features than the embedded version) in Visual Studio 2008.

I have just gone through moving a big application from VS 2005 to VS 2008. This was pretty easy except for the fact that I had ported all of the reports up to the bundled version of Crystal that comes with VS 2008 and then to the full blown version of Crystal 2008. I did all of this on a 64bit version of Vista. Additionally, this app is a Windows application and relies on ClickOnce for updates, which provided a few more pain points for me until I got everything all sorted out.

It was a time consuming transition mostly because I was winging it and was missing some key information and am hoping to help you avoid the same pain by providing guidance based on my lessons learned.

Crystal Reports is now owned by SAP

Back in the day (the early 1990's) Crystal was a product of Crystal Decisions. Crystal Reports' designer control was first bundled into to Visual Basic in 1993. When .NET was introduced, the Crystal Designer control was bundled with Visual Studio .NET as well and continues to be. There was a point in time when Symantec owned Crystal Reports but eventually Crystal became a property of Business Objects.  In October 2007, SAP announced that they were purchasing Business Objects. This transition was completed in early 2008.

Where to find the support resources

While the Business Objects entity (now "Business Objects, a SAP Company") and website still remain intact at www.businessobjects.com, the support pages have been moved to SAP’s domain.  A few of the old links, especially those that you might find through search engines are broken.

The "Business Objects Support for Crystal Reports and Xcelsius" launch page on SAP's web site is where you should begin if you want to find articles, forums, downloads and more. The URL is https://www.sdn.sap.com/irj/sdn/businessobjects-support. An important thing to note is that the KnowledgeBase is now called Business Object Notes. This launch page also points out changes to support contracts.

CR Basic 2008 vs. Crystal Reports 2008

Visual Studio 2008 comes with a bundled version of Crystal Reports called Crystal Reports Basic 2008. CRBasic's version number is 10.5 and is based on the same version (10) that came with Visual Studio 2005.

The full blown Crystal Reports 2008 standalone application is version 12. You can upgrade from CRBasic 2008 to CR2008 for about $300 US. While the original version of CR 2008 did not integrate with Visual Studio, this was corrected with the service pack described below. Now CR 2008 integrates with Visual Studio 2008 and provides a CrystalViewer control, though the standalone designer boasts some features that are not available with the embedded designer. If you install this version, the CR 2008 designer and control in VS 2008 will be updated.

CR 2008 has a lot of new features that enhance the design time experience as well as the end user experience. You can find a lot of marketing materials on the Business Objects web site that lay out the new features. As an example, here is a Product Sheet with a good overview: http://www.businessobjects.com/pdf/product/catalog/crystalreports/cr_2008_whats_new.pdf .

Some of my favorite new features are the end user parameter panel with the ability for end users to sort and filter without hitting the database again. Figure 1 shows the use of a simple parameter filter that allows the end user to filter AdventureWorks customers by SalesPerson. I also am thrilled that you can finally select and copy multiple objects at a time in the designer.

Figure 1: CR2008's new Parameter Panel lets users apply filters at runtime

crystalparameters.png

Report Compatibility between CR 2008 and CRBasic 2008

The CR 2008 (version 12) runtime is not backward compatible with the CR 2008 Basic (version 10.5) runtime. If you have reports that were created in CR 2008 Basic, end users will need the runtime version 10.5.

I ported my report files from CR for VS 2005 to CR Basic 2008 to CR 2008 with no problems.

My previous article (linked to above) discusses report compatibility in more depth. You can find more detailed information about backwards compatibility with earlier versions in CR's documentation.

Service Packs & Fix Packs

Both versions have Service Packs. CR Basic 2008 Service Pack 1 was released in early September 2008, just after VS 2008 SP1 was released. This service pack fixes a handful of critical problems. Some of these stemmed from upgrading reports directly from VS 2002 and VS 2003; others were related to viewing reports that use ADO.NET as their data source.

CR2008 Service Pack 0 (yes, zero) was released in March. One of the problems that this service pack fixed was the inability to view reports that were designed using strongly typed ADO.NET datasets (XSD's). This was the showstopper that I discovered and discussed in my previous article. There will be a Service Pack 1, which is planned to align with a future release of Business Objects Enterprise.

In addition to the XSD problem, CR2008 SP0 provides support for both 32bit and 64bit systems. Rendering big reports also became blazingly fast with this service pack.

There are two "Fix Packs" (similar to Hot Fixes) for CR2008. The second, FixPack 2, includes the single fix in Fix Pack 1 which is the same ADO.NET data source issue resolved with SP0. There is a PDF listing that fixes in FP2. It is not yet on SAP's downloads page, but someone from SAP kindly uploaded the file to 2shared.com [http://www.2shared.com/file/3900521/7ef5e48d/BOXI30_CR2008_FixPack2_Fixed_Issues_en.html].

Some of the additional fixes in FP2 were related to previewing reports in .NET Web forms and then a slew of fixes related to Business Objects Enterprise XI.

Developing on Vista, Viewing on 64-bit

Turn off Vista's DEP before installing CR 2008

My new computer is a Vista Ultimate 64 bit machine. While I had no problems with CR 2008 Basic, when I moved to CR 2008, I ran into a lot of problems.

The trouble began with the designer. When I opened up any report in Visual Studio 2008 after upgrading to CR 2008, the report was empty. To make matters worse, I was locked out of the rest of the Visual Studio IDE until I closed this report’s design window. That made my heart rate increase slightly. When creating new reports, there was no wizard and I would end up with another blank report which again locked up the IDE.

It turns out that something in Vista prevents the designer tools from loading during CR 2008’s installation. This may only be a problem for Vista X64. The recommended solution is to turn off Vista's Data Execution Prevention (DEP) prior to installing CR 2008. Yes, another security feature of Vista! Once CR2008 is installed, I turned DEP back on and everything was working just perfectly.

Turning DEP off and on is simply a matter of running the command line tool bcdedit. There is a GUI tool as well, but on my computer (running as admin) the GUI feature was disabled, so I used bcdedit.

Here is a link to a brief article about DEP along with the switches you will need to turn DEP on and off. http://www.realtime-vista.com/administration/2007/04/disabling_data_execution_preve.htm

Crystal Reports 2008 Runtime and X64

Crystal Reports Basic 2008 has an X64 Runtime that you can install as part of the Visual Studio 2008 installation.

While CR2008 SP0 supports both 32bit and 64bit development, there are no native 64 bit runtime assemblies. The error message suggests installing the correct redistributable or that you have a problem with your Keycodes.

An error has occurred while attempting to load the Crystal Reports runtime. Either the Crystal Reports registry key permissions are insufficient, or the Crystal Reports runtime is not installed correctly. Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required.

The message is very misleading and I spent a lot of time installing and uninstalling bits trying to solve this problem. Finally, the lead support engineer for Crystal pointed me to this knowledge base article: https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_ossnotes&query=1200907.

The recommendation is to explicitly target 32 bit processers when building your assemblies. Go to Project Properties, Compile, Advance Settings then change the Target CPU from its default "Any CPU" to "X86." Those of you who have been building VS apps on a 64bit machine for a while are probably familiar with the need to explicitly target X86. This article, "Windows & the World of 64-Bit Computing" (http://www.ddj.com/hpc-high-performance-computing/184405994), has some helpful insights on developing .NET apps on an X64 computer.

Redistributing Reports

Merge Modules and MSI

If you are using CRBasic 2008, SAP has recently provided runtime MSI installers for your clients. There are separate installers for X86, X64 (each about 25 MB) and IA64, which is about 50MB. These installers are available on their download site.

For CR 2008, you can choose between an MSI, Merge Modules or a ClickOnce assembly. When grabbing these from the download page, the MSI shows up in three different files: "Crystal Reports 2008 - MLB Runtime," "Crystal Reports 2008 - Redistributable Installation" and "CR 2008 Runtime Package for the .NET Framework (EXE file)." The MSI requires that you enter your developer Keycode during installation and this installer is recommended for deploying the runtime on a web server for your web applications that use Crystal Reports.

As with previous versions of Crystal Reports, the merge modules are best for embedding the runtimes into your application setup package. If you are using ClickOnce you can include the merge module in the manifest. If you are building a setup package and including the merge module, do not forget to enter your Keycode into the merge module’s properties when creating your setup package as shown in Figure 2.

Figure 2: Applying your Keycode to the runtime merge module

In my latest solution, since we are updating our reports to CR2008, wedo not want to surprise the end users with a 50 MB addition to their ClickOnce update—especially the users who are updating over the web. (Generally their updates contain files that are under ½ MB.) Rather than adding the merge module into the manifest, I created a setup package just for the runtime. The admin at my client's site will be sure that this setup package is run on the users' computers prior to deploying the update to the web server.

Nothing like a little branding

The embedded report viewer has the Business Object’s logo on it as you can see in Figure 3.

Figure 3: The Business Objects logo seems like a permanent fixture but it is not

crystalbranding.png

While the User Guide documents how to remove this banner from the Installer, there is nothing about this logo in the viewer.

However, there is a completely undocumented property of the CrystalReportViewer control called ShowLogo. It is not surfaced in the Properties page. It does not show up in Intellisense. It does not show up in the Object Browser. I could not even find it using Reflector. But you can code it in and it will compile and it does, indeed, do the trick as you can see in Figure 4.

CrystalReportViewer1.ShowLogo = False

Figure 4: The hidden ShowLogo property allows you to remove the logo from the viewer

crystalnobranding.png

Thanks to Bruce Landry who trolled around long enough on the web to find this and then share it on the Business Objects forums.

Avoiding the mess that I made (and the time that I wasted)

Because I had so much trouble with the embedded designer and then the runtime, I ended up installing and uninstalling CR 2008 and reinstalling and uninstalling CRBasic 2008 many times. At one point I had decided to give up and just stick with CR Basic. When I was finally pointed to the information about targeting X86 in the project's build properties I had already updated my reports to CRBasic. As I moved everything to CR 2008 and tested my deployment, the deployed application complained that Crystal Reports version 10.5 was unavailable. I still had a dependency to CRBasic 2008 built into one of my many assemblies. Once I tracked it down I uninstalled CRBasic 2008 entirely from my machine so that I would not make that mistake again.

Now the ClickOnce is working; the assemblies with the new reports are getting downloaded and the client machines have the Crystal Reports 12.0 runtime on it with everything working well.

Conclusion

By reading my lessons learned, I hope that you will be able to avoid the confusion that I experienced and have a smooth transition to Crystal Reports 2008.



User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 



Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2020 ASPAlliance.com  |  Page Processed at 2020-07-05 11:39:33 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search