Download Parallel Crystal Developers Manual
Transcript
Chapter 8 Getting Started with C/C++ Clients In this chapter, we describe how to customize and generate reports using C or C++. On Windows 95 and Windows/NT systems, you may use any C/C++ development environment capable of loading 32-bit Windows DLLs. You should refer to Chapter 5 for information on how to program a Parallel Crystal ActiveX automation client using Microsoft Visual C++ ActiveX/COM extensions. This chapter is divided into two major sections •= In the first section entitled Using Parallel Crystal in a C++ Application, we describe how to build a Parallel Crystal client that runs as a C++ application program. The section contains example code fragments that show you how to use C++ classes to connect to the Parallel Crystal Report Server, and how to generate reports formatted as PostScript, PDF and HTML documents. •= In the second section entitled Using Parallel Crystal in a C Application, we describe how to build a Parallel Crystal client that runs as a C application program. The section contains code fragments that show you how to use equivalent C API function calls to connect to the Parallel Crystal Report Server, and how to generate reports formatted as PostScript, PDF and HTML documents. Both C and C++ applications are constructed using the Parallel Crystal C/C++ Client Distribution Library and its accompanying header files. In C++ environments, the headers provide a class-based interface to this library. In C environments, the headers provide a set of API function prototypes that include the original Seagate Crystal Report Engine functions. Both interfaces are accessed by including the single file, pcre.h into your program. Throughout the Chapter, we use a sample Crystal report file called Box.rpt that is distributed with Parallel Crystal in the SampleReports directory of the product installation. The file already incorporates its own data so the report may be produced directly without the need to connect to a database. Before looking at some example code, we need to clarify details of a Parallel Crystal Report Server installation. Parallel Crystal Developer's Manual Version 2.4 - Revised 5/27/00 231