Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
81
Добавлен:
11.05.2015
Размер:
2.11 Mб
Скачать

VCL Component Overview

The Seagate Crystal Reports Component has been designed for the Visual Component Library (VCL) of the Inprise (formerly Borland) Delphi development environment. The Component encapsulates the functionality available in the Seagate Crystal Reports Print Engine DLL(CRPE32.DLL), and can be easily added to any Delphi project and compiled into your final executable application. At this time, the Component is not available in a 16-bit version. Like the Seagate Crystal ActiveX control, the Component provides all the reportprocessing power available in the Seagate Crystal Reports Print Engine for your Delphi projects.

Installation

The following topics are covered in this section.

Delphi 2, Page 194

Delphi 3 & 4, Page 195

C++ Builder 3, Page 198

Delphi 2

Installing the Component

1Select Component | Install from the Delphi Main Menu.

2Select Add from the Install Components Dialog Box.

3Browse Files of type unit (*.DCU).

4Select the UCRPE32.DCU file.

5Click OK (in the Add Module dialog to return to the Install Components dialog). The directory where UCRPE32.DCU is selected will automatically be installed in the Component Search Path.

6Select OK (in the Install Components dialog). When Delphi is finished rebuilding the Component Library, a Crystal Reports icon will appear on the Data Access page of the Component Palette.

Installing the Help file

1Copy the UCRPE32.HLP, UCRPE32.CNT, and UCRPE32.KWF to the Delphi2 Help directory.

2Run the HELPINST.EXE from the Delphi2 Help/Tools directory.

3Choose File | Open and load the DELPHI.HDX file (normally in the Delphi2 Bin directory).

4Click on the + button, or choose Add Keyword File... from the Keywords menu.

5Choose the UCRPE32.KWF file that you copied to the Delphi2/Help directory, and then click OK.

6Choose File | Save and then File | Exit. Context-sensitive help should now be available from the Delphi2 IDE (choosing the F1 key while a property is selected should bring up the appropriate item in the UCRPE32.HLP file).

Seagate Crystal Visual Component Library

194

Delphi 3 & 4

Installing the Component

The Package Collection file, CrystalVCL.dpc, contains all the files required for Delphi 3. If you are using Delphi 4, the Package Collection is called CrystalVCL4.dpc. To install this Package Collection, the following steps should be followed:

1Go to the Component menu, choose Install Packages.

2Choose Add.

3Change the Files of Type extension to Package collection (*.dpc).

4Locate the CrystalVCL.dpc, select it and choose Open.

5Follow the steps in Delphi's Install Package Collection dialog. The install path can be changed, and the Sample App, Help, and Source files are optional and can be de-selected if desired.

When the install process is finished, The Crystal VCL should appear under the Data Access tab of the VCL Component palette.

NOTE: It is also necessary to add the Crystal VCL install path to Delphi's Library Path string (Tools | Environment Options | Library) in order for the Component files to be found by Delphi.

Problems

If another UCRPE32.DCU or CRYSTAL.DPL (CRYSTAL.BPL for Delphi 4) is found in the search path, the package might not install. Since the installation of the package comes after the files have been copied to the hard-drive, they should all be available in the directory chosen during install, and it is not necessary to run the install again. All that needs to be done in this case is to first remove any older copies of the component that Delphi found, and then add the package using one of the three ways described below.

1.The package included (DPL/BPL) can be directly installed.

2.The component (DCU) can be installed into a new package.

3.The component (DCU) can be installed into another package (Not recommended).

Installing the included Package

1Go to the Component menu, choose Install Packages.

2Choose Add.

3Locate the CRYSTAL.DPL (or CRYSTAL.BPL) file and load it.

4Choose OK.

The Crystal VCL should appear under the Data Access tab of the VCL Component palette.

Seagate Crystal Visual Component Library

195

Installing the Component into a new Package

1Go to the Component menu, choose Install Component.

2Choose the Into new package tab.

3Browse the Unit file name to locate the UCRPE32.DCU.

4Browse the Package file name to set the destination for the new package.

5Enter a descriptive line in the Package description area. This description will appear in the list of installed packages.

6Choose OK, then Yes to the prompts that follow.

The Crystal VCL should appear under the Data Access tab of the VCL Component palette.

Installing the Component into an existing Package

This method is not recommended, because if you install the Component into one of the Delphi standard packages, it is quite difficult to get it out of those packages. These are the steps:

1Go to the Component menu, choose Install Component.

2Choose the Into existing package tab.

3Browse the Unit file name to locate the UCRPE32.DCU.

4Choose OK, then Yes to the prompts that follow.

The Crystal VCL should appear under the Data Access tab of the VCL Component palette.

Installing the Help file

With Delphi 3 and 4, and the latest VCL, we have provided a Help Installer program that can be used to automate the process. See the UCRPEHLP.EXE in the HelpInstaller directory. Also, with Delphi 4, another easy way to install context-sensitive Help is by using the built-in OpenHelp installer:

1Copy the UCRPE32.HLP and UCRPE32.CNT to the Delphi 4 Help directory.

2Run Delphi 4 and go to the Help menu. Choose Customize (the OpenHelp installer can also be run outside the Delphi 4 environment by going to the Delphi 4 Bin directory and running OpenHelp.exe).

3With the Contents tab selected, right-click (or go to the Edit menu) and choose Add Files. Locate the UCRPE32.CNT file and add it to the list.

4With the Index tab selected, right-click (or go to the Edit menu) and choose Add Files. Locate the UCRPE32.HLP file and add it to the list.

5Choose File | Save Project.

Seagate Crystal Visual Component Library

196

Installing context-sensitive Help manually with Delphi 3 and Delphi 4

1Copy the UCRPE32.HLP and UCRPE32.CNT to the Delphi Help directory.

2 Load the DELPHI3.CFG file (or DELPHI4.CFG for Delphi 4), located in the Delphi/Help directory, into an editor such as Notepad. At the bottom of the file, you will see something like this:

Third-party Help:

;==============

:Link quickrpt.hlp

:Link teechart.hlp

:Link imagedit.hlp

3 Add the following line to the bottom of the Third-party Help section:

:Link Ucrpe32.hlp

4Save the DELPHI3.CFG (or DELPHI4.CFG) file.

5Load the DELPHI3.CNT (or DELPHI4.CNT) file (located in the Delphi/Help directory) into an editor such as Notepad. At the top of the file you will see something like this:

:Base delphi3.HLP>main :Title Delphi Help

; Index section ;==============

:Index VCL Object and Component Reference=vcl3.hlp

:Index Object Pascal Reference=obpascl3.hlp

At the bottom of the Index section add the following line: :Index Crystal Reports Component Help=ucrpe32.hlp

6Go to the bottom of the DELPHI3.CNT (or DELPHI4.CNT) file and you should see an "Include section" something like this:

;Include section

;================ :include vcl3.cnt :include obpascl3.cnt :Include win32sdk.toc :Include winhlp32.cnt

At the bottom of the Include section add the following line: :Include ucrpe32.cnt

Seagate Crystal Visual Component Library

197

Соседние файлы в папке crystal