Developer's Overview

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Developer's Overview

Previous pageReturn to chapter overviewNext page

Using ReportPro in Your Application

 

The ReportPro Developer's Library allows you to programmatically access the ReportPro reporting engine from within your application.  

 

ReportPro ships with both 16-bit and 32-bit versions in the same package.  Each version of the ReportPro Developer's library contains three runtime libraries designed to fulfill a specific reporting need.  

 

Runtime Library

Properties

RDD

Supports Replaceable Data Drivers (RDD).  Natively supports NTX, CDX and MDX drivers.  Third party RDDs are also supported.

Runs RDD reports created with the ReportPro Designer.

Runs reports that are hand-coded with the RpPrinter class.

RDD/SQL

Supports RDD and ODBC/SQL data sources.

Runs all reports created with the ReportPro Designer.

Runs reports that are hand-coded with the RpPrinter Class.

Designer

Provides report design capability for the end-user.

Supports RDD and ODBC/SQL data sources.

Runs all reports created with the ReportPro Designer.  Reports can be run from the design interface or without displaying the design interface.  There is no need to link the RDD or RDD/SQL runtime libraries into your application if you link in the designer library.

Runs reports that are hand-coded with the RpPrinter Class.

 

There are four primary classes contained in the runtime libraries.  These classes are used to print existing reports, allow the end user to define and edit reports and print hand-coded reports.  The classes are present in each of the runtime libraries, however, some classes have reduced functionality depending on which library it is in.  Each primary class is identified in the table below:

 

Class

Description

RpReport

This is the class you use to access the ReportPro runtime.  Use this class to print reports from your application.  If you link in the Designer library, you can also use this class to access ReportPro's design interface.

RpPrinter

Use this class when you wish to hand-code reports.  This class provides methods to print lines, rectangles, circles and text.  It also has a built-in print preview which you can use with your hand-coded reports.

RTF

This class provides the ability to print text stored in Rich Text Format (RTF).  This class loads RTF from various sources, automatically parses the RTF into a usable format and provides the capability to print the RTF text using ReportPro's RpPrinter class.  

DIBMP

Windows provides several API functions to display and manipulate bitmaps.  The DIBMP class not only provides a wrapper around some of these functions, it also simplifies the tasks associated with bitmap loading and memory management.  The DIBMP class can handle bitmaps larger than 64K and containing up to 256 colors.

 

Using ReportPro with CA-VO version 2

 

The 32-bit version of the ReportPro Developer's library is designed to work with CA-Visual Objects 2.0.  Each runtime library is contained in a separate CA-VO Application Export File (AEF) which must be imported and linked into your application before you can access the ReportPro runtime.  The runtime libraries and associated AEF files are identified in the following table:

 

Runtime Library

Library File

RDD

Rp2Rdd32.AEF

RDD/SQL

Rp2Sql32.AEF

Designer

Rp2Dsn32.AEF

 

To import a runtime library:

 

From the CA-VO application explorer, select the desired project and choose the Import option from the File menu.
Select the desired library AEF (see table above).
Compile the imported library by choosing the Build option from the Application menu.

 

After the ReportPro library has been imported, you must also import the RP2_HOOK.MEF file into each application that uses ReportPro.  The MEF contains code that forces the CA-VO linker to properly link ReportPro support functions into your applications.

 

To import the MEF:

 

Select the desired application, choose the Import option from the File menu.
Choose the RP2_HOOK.MEF file.

 

After you import the MEF, add the ReportPro runtime library imported above to the Included Libraries list for your application.  Your application can now access the ReportPro runtime.

 

Information for Users Upgrading from ReportPro 1.x

 

If you are upgrading from ReportPro version 1 to version 2, there are a few differences that may affect your application:

 

There is now only one hook module (RP2_HOOK.MEF).  It is designed for use in both RP2/16 and RP2/32.  Make sure you delete the 1.0 hook MEF from your application and import the newer RP2_HOOK.MEF.
The RpReport:ReportWizard() callback method has become the RpReport:StandardReportWizard() callback method.
The RpReport:GetVariableValue() method may require a call to RpReport:Connect2Source() before use.
The RpReport:SetIndex() method may require a call to RpReport:Connect2Source() before use.
The RpReport:Seek() method is obsolete and is no longer supported.  You should use the RpReport:SeekExpression assign instead.
RpPrinter:DrawText() now has a ALIGN_FULL option for full justification of text output.
The code for the PtrDevice and RpPrinter classes is provided in the SDK directory rather than residing in the runtime libraries themselves.

 

A Note to CA-Visual Objects Programmers

 

To improve performance, many of ReportPro's classes use exported data types.  You should not modify an exported variable directly unless it is documented to do so in this manual.  

 

The underlying structure of ReportPro is subject to change without notice or support.  Developers should use the methods, accesses and assigns provided  to minimize the effect these changes will have on your application.