This document is a primer. It's designed to inform you, the reader, of what can be done and what to consider before attempting integration. It's not riddled with proprietary code that describes exactly how to do integrate between ColdFusionMX and Crystal Enterprise.
Why ColdFusion and Crystal Enterprise?
Reporting is not just some set of documents with some data on it. It can be so much more. Reporting is at the core of every business. Most developers believe that their applications drive their business. However, reporting is the core deliverable and it's the very heart of every business. Reporting is the intelligence of how your business is running and how you can streamline it to run more efficiently. With that in mind, your applications are mechanisms of what your business does. They allow you to perform your job more efficiently. They are tools that allow you to capture your data.
Now, more than ever, the development community is moving into a new era of rich media. The general consensus of the ColdFusionMX and Legacy ColdFusion community is that reporting is a beast best left undisturbed, or that they can produce metrics faster and quicker via a few well-written <CFQUERY> and <CFOUTPUT> tags that will deliver a sparse few details in html. However, contrary to the popular belief of most developers, reporting is a vast and useful topic. Companies spend millions on reporting solutions that provide everything from Web metrics, to trending and analysis, to financial reports. This is not something that most ColdFusionMX or Legacy ColdFusion developers are comfortable with. Allaire's (now Macromedia) attempt at including Crystal Reports through the <CFREPORT> tag was all but futile, as most developers wouldn't use it, choosing to write their metrics pages through <CFQUERY> and <CFOUTPUT> tags.
With Business Objects (previously Crystal Decisions) pushing its Crystal Enterprise product, this merely exacerbated the subject. Crystal Decisions licensed Microsoft's ASP technology and created a new twist on it, delivering CSP (Crystal Server Pages) within its Crystal Enterprise product. The vast majority of Internet developers, especially ColdFusionMX developers, have yet to successfully integrate their application environments and their reporting environments. It has, for the most part, always been that you're either in the application environment or in the reporting environment.
ColdFusionMX v7 was released with a new banded report writer as well as various other reporting oriented features. The CF community rejoiced. However, those that rejoiced because they can now abandon Crystal for CFMX 7 will have to continue to use Crystal. The reason being: Crystal is an expensive undertaking and most companies will not abandon a solution that they have so much invested in.
Corporate and Application History
As most ColdFusion developers know, ColdFusion was originally developed by Allaire and Allaire was later acquired by Macromedia. ColdFusion is in its seventh version and has moved from a C++ platform to a Java platform. Crystal on the other hand has a longer history. It's currently in its 11th version and has changed hands several times. The part of the story that I know, beginning from the time I started interfacing with the tool, is that it was sold to Seagate. It was then sold back to the original company (who renamed itself Crystal Decisions) and subsequently acquired by Business Objects.
The Difference Between Crystal Reports and Crystal Enterprise
When people start talking about "Crystal" they refer to it in two different aspects:
I have found that Crystal Reports developers and Crystal Enterprise developers don't normally travel in the same circles. Report developers, in my experience, know a lot about displaying data and how Crystal Reports, as a banded report IDE, functions. In general they have not been exposed to the server-side aspect of development. Conversely, I've found that Crystal Enterprise developers are well versed in the Crystal Enterprise APIs, server architectures, and performance tuning.
I have run across a few that are very good at both, but they just seem to be few and far between. My personal experience leans toward Crystal Enterprise, rather than actual report development. I prefer server-side API development and performance tuning. I'm fairly well versed in Crystal Report development, but I have found that there are many other developers who know the IDE better than I do. I consider it a presentation layer and prefer to continue my development from a server-side aspect. However, knowing its strengths and weaknesses is definitely an asset.
Enter the ColdFusion Developer
Cold Fusion developers have always been told either you can't do ColdFusion and Crystal, or that they need to use the <CFReport> tag. Both are total disasters, of course. The new reporting-oriented features of CFMX 7 are really nice. I've got to hand it to Macromedia, Tim Buntel, Damon Cooper, and team. They have put together a rock-solid set of features (such as CFDocument) that I have put to good use and look forward to them strengthening in the future.
The reason I mention it in this way is, while the banded report tool is nice and robust and integrated, it is still a 1.0 release. Business Objects, on the other hand, has had 11 versions to get it right. Although I feel they still could improve, it's a far cry from version 1.0. That leads me to the statement that my father drilled into me at a young age: "Use the right tool for the job."
If I am going to write a report that's not too complex, or maybe has a little drill through or drill down, I'll likely use CFMX 7 and one of the new report features, like the banded report writer or the CFDocument tag. I'll wrap it up into a PDF or FlashPaper. However, if I need to write a report that has many layers, sub layers, sub reports, or I want to use a code repository and I need to manage my reports, or any combination thereof, I'm more than likely going to use Crystal. I can probably work around those issues. What I can't work around is something I mentioned earlier. Often, I need to deploy through a system that the company has a huge investment in. I evaluate each deployment strategy individually. I use Crystal when I need to do some heavy lifting. I use CFMX 7 when the reporting isn't so intensive. As I said, use the right tool for the job. Crystal Enterprise has a huge strength in report deployment. It has been designed around crunching reports that, in some cases, may take days to complete. It can deliver you the first page in a report while it is still building the remaining pages. It schedules, maintains, manages, and secures documents and reports and does it all natively.
Consider Your Licensing
Licensing is, of course, a very serious matter with all software. However, it's especially important when integrating two different pieces of software. In this specific case, we need to consider the licensing aspect of Crystal Enterprise. There are three types of licensing you can use:
A named user is just that, one named user. There can only be one user per account and that user can only be logged in from one machine at any one time. CPU licensing licenses the servers per CPU. A CPU license needs to be purchased for every CPU on the machine. When installing a CPU license, you can consider it to be unlimited concurrent licensing. Setting up CPU licenses for performance is a bit of a trick. It can be done, but really needs to be done by someone who not only knows how Crystal Enterprise behaves, but also, after evaluating the reports, what needs to be delivered. Business Objects does have a document that explains all this but they will force you to sign an NDA to get it.
Crystal Enterprise has about 10-14 services that can be installed. The services are considered servers in their own right by Business Objects. The system is designed to be easily scaled outward depending on your growing needs. The trick is that if you purchase CPU licenses, you need to ensure you have enough to manage your scalability; last I checked they were approximately $60,000.00 USD. ColdFusionMX licensing on the other hand is fairly simple. You can purchase CFMX as standard or enterprise packages.
Standard edition gives you the standard CF Server, like you've always used. In its current version, it's a modified version of JRun 4 that drives only the CFMX tag set.
The Enterprise package yields not only the core server, but also a full version of JRun 4, multiple server instances, J2EE application server deployment, event gateways, enterprise server security, sourceless deployment, archive and deployment services, high-performance e-mail delivery, high-performance reporting and document generation, asynchronous processing, and server/instance clustering.
Deployment Strategies
When deploying a CFMX to Crystal Enterprise integration, I recommend seriously evaluating the needs of both environments. A Performance Analysis and Tuning engagement (PA&T) from Macromedia would be a good idea. The reason I recommend this is that integration will appear to stress your server.
The stress that you will see will be in relation to the communication between the two applications. It could be your network, connectivity, virus software, firewalls, a few other items, and or any combination of the previous. A major reason why people have said previously that it could not be done was due to these issues and not that the applications wouldn't talk to each other.
Actually, in its simplest, they don't really talk to each other. Crystal talks to itself. CFMX grabs the Crystal services and shakes it around and tells it what it's going to do... like a bully. The first key is that everything requires authentication. The second key is to know how to quiz Crystal Enterprise to give it what you want, after it's authenticated.
Agave and Seguaro
The results of this are two application prototypes: Agave and Seguaro. I've only mentioned my development of these prototypes to a handful of people, until now.
Agave was the original prototype that integrated ColdFusion 4.0 to a Crystal Enterprise 8.0 implementation. The goal was to re-create Crystal Enterprise's ePortfolio using ColdFusion. With my development of Agave, I can add/edit/delete users, folders, and groups. I can add users to groups and/or folders. I can modify a user's security in any combination thereof. More important, I can authenticate that user to deploy a report through Crystal Enterprise. Crystal Enterprise then gets to do what it does best: render and deliver the report. I stopped there with Agave; I had new aspirations with what I could do with this success. The testing stretched from CF 4.0 through CFMX 7 into Crystal Enterprise versions 8.0 through 11.0.
Seguaro was originally designed utilizing CFMX 6.0 and, later, 6.1. It's been integrated into Crystal Enterprise versions 8.5 through 11.0. My development of Seguaro was built using a homegrown MVC model. I started using CFCs in the testing and, later, in Web services. My intention was to use Flash to rebuild ePortfolio. Using ColdFusionMX I can back-end a Flash UI. Using Flash data grids and XML connectors (I actually put that stuff I learned at MAX2003 to use), I successfully replicated the same features I had developed in Agave.
There are still many features that have not yet been built. However, some of the functionality that have been built thus far are some functions utilizing Crystal Enterprise's RAS server to provide some ad hoc reporting, report scheduling, and report template manipulation. I have even been able to pull a report deployed by Crystal Enterprise and render it in Flash using FlashPaper (it's not exactly a recommended practice but it can be done).
These two prototypes (Agave and Seguaro) are now the foundation I use when building most integrations. The reason is, as I consulted to provide this type of service, I learned that each integration is unique. As you all know, everyone has their own ideas about how each application should get implemented. It's amplified when you start integrating existing applications. Everyone has built applications differently. Thus each set of tools that needs to be deployed is deployed on an as-needed basis. The result is that I provide Agave and Seguaro licenses as part of the service I provide.