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

The Crystal NewEra Class Library

Introduction

The Crystal Class Library for NewEra is designed specifically for use with the Informix NewEra development environment. This class library is comprised of two primary classes and several supporting classes. These classes are wrapped around the Crystal Report Engine API and insulate the user from some of the details required to manage reports in an application.

The Crystal Class Library for NewEra was installed in the Crystal Informix directory (\CRW\INFORMIX by default) when you installed Seagate Crystal Reports. The header files (*.4GH) for the library are located in \CRW\INFORMIX\CLASS\INCL, while source files (*.4GL) are located in \CRW\INFORMIX\CLASS\SRC. Copy these files, along with CRPE.H, to the appropriate location for your NewEra application, then include CRYSTAL.4GH in the source file for your application project that will access the Crystal Report Engine.

Crystal Report Engine API

As mentioned above, the classes in the Crystal Class Library for NewEra are wrapped around the Crystal Report Engine API, and the methods in these classes make direct calls to the functions in the Crystal Report Engine API.

Classes in the Crystal Class Library for NewEra

The Crystal Class Library for NewEra consists of two primary classes. The class CRPEngine, Page 394, is designed so that there should only be one CRPEngine object in the entire application. The CRPEngine object contains methods that are common to all print jobs (for example, SQL connections, version information, etc.). More importantly, it is responsible for creating and managing all class CRPEJob, Page 403, objects. It is the CRPEJob object that allows you access to the attributes of a print job.

class CRPEngine

The CRPEngine class is designed so that there should only be one CRPEngine object in the entire application. The CRPEngine class contains methods that are common to all print jobs (that is, SQL connections, version information, etc.). More importantly, it is responsible for creating and managing all CRPEJob objects. It is the CRPEJob object that allows you access to the attributes of a print job.

In order to open a particular report it is first necessary to have an open Crystal Report Engine object in the application. You may then call CRPEngine::OpenJob, Page 402, specifying the report file name to open. If successful, you will be returned a pointer to a CRPEJob object.

Crystal Class Library for NewEra Reference

394

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