Business Objects has been supporting Microsoft's .NET development platform since its inception when Crystal Reports for Visual Studio .NET was created. This has continued with Crystal Enterprise 10, which provides a full .NET SDK equivalent to the COM SDK. This SDK is intended for use within Microsoft Visual Studio .NET but can also work in other tools such as Borland C# Builder. This section covers content specific to the .NET SDK.
The .NET SDK consists of a set of .NET classes. Like Java, these classes are organized into namespaces. The Crystal Enterprise .NET SDK is contained in the CrystalDecisions.Enterprise namespace. The naming of all the objects is exactly the same as the COM SDK, for example, SessionMgr, EnterpriseSession. The .NET assemblies (.dll files) that make up the SDK can be found in the following folder:
Program FilesCommon FilesCrystal Decisions2.5managed
Unlike Java, there is no need to copy these files anywhere in order to be able to program with them. A developer simply needs to open the Project References dialog and select which assemblies they want to use. Although there is only a single namespace, there are multiple physical .dll files. The naming convention is CrystalDecisions.Enterprise.Module.dll where Module is one of a set of modules that compose the full Crystal Enterprise SDK. Some common assemblies a developer uses include the following:
CrystalDecisions.Enterprise.Framework.dll
CrystalDecisions.Enterprise.InfoStore.dll
CrystalDecisions.Web.dll
Notice that CrystalDecisions.Web.dll does not conform to the naming convention of the other assemblies. This is because it is a shared component across Crystal Reports and Crystal Enterprise.
→ For more information on the CrystalDecisions.Web.dll assembly and the CrystalReportViewer Web control, see “Delivering Reports with the Web Forms Viewer ,” p. 687
The C# code sample in Listing 34.16 is an ASPX page version of the report viewing page that has been used previously in this chapter.
In addition, the .NET SDK has some components that the COM and Java SDKs do not: visual components for rapid Crystal Enterprise development. These components, found in the CrystalDecisions.Enterprise.WebControls namespace are visual components that can provide a drag-and-drop method of constructing a Crystal Enterprise application. Figure 34.3 shows the Crystal Enterprise .NET Web Controls in action.
The following list provides a brief explanation of some of the Web Controls:
Logon: Provides a visual control that automates the process of building a logon credential UI.
Identity: Abstracts the details of managing sessions across multiple pages away from the developer.
Items: Simplifies queries to the Crystal Enterprise InfoStore repository by hiding the actual SQL-like query and instead providing a programmatic interface.
NOTE
There are several more Crystal Enterprise Web Controls. For more information on these controls, consult the Crystal Enterprise .NET documentation, which is installed into the MSDN documentation framework.
3.15.137.59