uncategorized

Crystal Reports vs Active Reports

This blog post is from 2005 and has not been updated for newer versions of these products.

Update

One of the things I’ve since found, while using Active Reports, is a very poor implementation of exporting reports. Active Reports offers the ability to export reports to PDF and XLS formats. The PDF export works fine and has never once caused me any concern. Unfortunately, XLS exports are the polar opposite. I created a simple listing report consisting of approximately 5 columns of data with no summaries or groupings. When exporting the data to XLS, a 2 page report was taking in excess of 30 seconds to save. Larger and more complex reports would effectively freeze the computer. In addition, once the export had completed, the XLS file generated was unreadable.

In complete contrast, I have never once had a problem with the export functionality of Crystal Reports.

So, if exporting data to Excel is a requirement of your project, stay clear of Active Reports.

Original

Finally I have gotten around to writing this. For the past 4 years I have worked extensively with Crystal Reports v7, 8.5 and 9. During that time I listened to my co-workers grumble about it and, on occasion, participated myself. Recently I took a new job and my first task was to design and code a reporting module using Active Reports .Net v1.0. Since I’d done similar projects with Crystal, I thought it would be right for me to document differences, troubles and opinions on both.

Reporting Philosophies

Active and Crystal Reports have taken very different philosophical paths in their execution of reports on the development side of things.

Crystal Reports are self contained .rpt files that only require the Crystal Engine to execute. The end user does not even need an application to do this. All they have to do is double click on the report and voila, it displays. Active Reports have opted not to provide this functionality. Their .rpx reports require the use of the ActiveX viewer control, from within a compiled application, to display the report.

Because Crystal Report files are 100% self contained, there is no code behind module to be used whereas in Active Reports there is. The code behind in Active Reports provides you with an event driven coding arena to fine tune the display of the report (more on this later).

APIs

The Crystal Reports API is referenced, in non-.Net environments, by using the craxdrt.dll file. This will provide you with the entire report object model. The object model is quite easy to understand and the model has structural depth where appropriate. Finding data, label or formula fields in a report or sub report can be accomplished through on line of code. There is no need to know the section that the control exists in as all are returned to you in a report-wide collection. The API also supports extensive use of embedded objects to allow you to reference an item without having to set it to a variable first. Loading a report into memory is as simple as a passing the filename to the appropriate property. One of the things that is limiting is the ability to programmatically add and move controls to a report. I believe that there are licensing issues whereby this type of code would require a licensing payment for each installation of the end software.

Active Reports provides a similar API for manipulating reports using code. The redistributable files required are minimal both in numbers and in size. Initializing reports and sub reports is quite simple. Because of the differing philosophies in reporting, Active Reports offers two different ways to open a report. One is to treat the report as an object like you would a form. You initialize it, set it to new and run a show sub routine to display it. The second method is to load the report, using one line of code, from the rpx file. Finding controls, in reports or sub reports, is much more difficult than in Crystal. To accomplish this you must loop over all sections, and all controls in each section, to find the desired control. Unlike Crystal, you can add and move controls in an Active Report with no need to worry about licensing. Performing these actions, however, is not very simple. Adding a single control to the report can take close to ten lines of code.

In this category, the winner by a narrow margin is Crystal Reports because of the ability to find a control in the report with one line of code.

Designer

The designer is the portion of the reporting experience that most of a developers time is spent interacting with. This requires that the designer is intuitive, powerful and aesthetically pleasing. Crystal Report Designer wins this hands down. The one item that I notice daily when using Active Reports is that there is no ability to zoom in on a reports design surface. Having to work at a high resolution is fine when preforming the overall layout of the report, but regularly I find that I am performing fine tuning of control placement and, with the zoom feature in Crystal Reports, there is significantly less eye stress. Both Crystal and Active Reports have smaller nagging issues. Crystal Reports has a “feature” where setting the X, Y, height and width properties does not retain the exact value (variance of one tenth of an inch is common) your enter. The snap to grid feature in Active Reports does not react well to moving of controls using the keyboard arrow keys resulting in controls that no longer are lined up on the grid correctly.

Overall, both products are adequate, but the lack of a zoom feature in Active Reports puts it a significant step behind Crystal Reports for me.

Connecting to Data

One of the things that you will always hear people complain about with Crystal reports is that connections to the database, when dynamically set or the data server or database has changed, will return the error “There was an error retrieving data from the server: Service Not Found”. You will not get this type of error when using Active Reports, primarily because the data sources are .Net DataTable objects. I have encountered this error so many times in Crystal Reports that I was considered an expert on fixing it by my coworkers. In my opinion this error is caused by nothing more than a lack of attention to detail by the report programmer.

Everything else about these two products, when it comes to data connectivity, is very close to the same in functionality and limitations. I will give the edge to Active Reports simply because of the frequency that data connectivity errors occur in Crystal Reports.

Viewer

Both the Crystal and Active Reports viewer are very feature rich and stable products that perform well for the end users. My only complaints are with the Active Reports viewer. Although the Active Reports viewer is very powerful, has a nicely structured object model and performs well, it has object model structure that exists for no real reason. For instance, you can add your own controls to the toolbar in the viewer, and when adding them the object model exposes an image property. Completely undocumented everywhere, except the user forums on Data Dynamics’ website, is the fact that this feature was never built out. Spending time looking to see if the feature is there, telling your boss that you can add your own icons, and then spending an hour troubleshooting and researching again, only to find out that you’ve just found vaporware, does not sit well with me at all.

A big thumbs down to Active Reports on this one.

Distribution

Another area of gripe for Crystal Reports is the difficulty distributing the runtimes. I have fought for many a hour trying to make a fresh installation work, only to find out that one of fifty plus files is missing, in the wrong location or is of the wrong version. Part of the problems do arise from the fact that Crystal Reports is bundled with so many different products that a single PC often encounters 2 different versions when installing. Another part of this problem is that Crystal Reports is very bad at maintaining backwards compatibility, so you run the risk of your software or someone else’s software not functioning after a new installation.

On the flip side, Active Reports distributes less than five files and, because it has a smaller installation base, you rarely will encounter multiple versions trying to coexist on the same PC.

Although you can alleviate a large number of the Crystal Report distribution issues by using a merge module with your installation software, Active Reports gets the nod here easily due to it’s simplicity and minimalism.

End User

The end user experience for both products is fairly similar. The only significant difference is that the is no ability with Active Reports to execute and display the report by simply double clicking on the RPC file. This is fairly important, but the most benefit seen from this feature in Crystal Reports is for those who are running stand alone reports. Crystal Reports wins this one by a nose.

Personal Opinions

There are a number of areas that are important to me as a developer. Using both products I have been asked to build very dynamic and flexible solutions. Because of the reliance on the code behind to perform many tasks in Active Reports, accomplishing the goal was very difficult. Simple things, such as a percentage field, based on two displayed values, required me to write 8 to 10 lines of C# code in the scripting editor. Yes you can do this with the code behind module, but that is only useful if you are compiling the report into your application. In Crystal this is possible through the use of a formula field and, in my opinion, is the better solution for ongoing support and maintenance of the product.

Because report developers spend the majority of their time in the designer interface, this is another area that I look to immediately. That look gives a clear indication that the zoom feature in Crystal Report give it the edge easily.

Although both products have excelled in different areas, I would choose Crystal Reports because of the power for data manipulation that exists in the designer and layout editors.

I have been doing some research into SQL Server 2005 Reporting Services at work, and one of the new features that it will offer is a report viewer that can be added to a WinForms application. While this does present another competitor in this market, I will not comment on it until I have had more time to look and play.