ANSI C Interface

To use Reporting Engine in your ANSI C Application you need to attach it to run-time library (Reports.DLL) and direct its functions to manage your report.

These functions are listed below with specification and usage hints.

Functions marked with BLACK are implemented in present version.

Functions marked with GRAY are planned for future releases.


Library Access Functions


long GetMajorVersion(void)

Function returns a major version number (X of X.Y version number).

You can use this function to check compatibility of your application with ApplyIt! Reporting Engine.


long GetMinorVersion(void)

Function returns a minor version number (Y of X.Y version number).

You can use this function to check compatibility of your application with ApplyIt! Reporting Engine.


char*  GetRegisteredUser(void)

Function returns name of the registered user of Reporting Engine, or returns "UNREGISTERED" in free version.

When you will become a Registered User, you will receive a Registration Key. This registration key should be stored in string resources of your application and Reporting Engine will read it right when you will attach to the DLL.


Report Generation Functions


long CreateReport(void)

Function creates new report object and return ReportHandle to user. Save and use this ReportHandle to reference report in further functions.

You must call this function prior to handling a report - Load, Generate, Print etc.


void LoadReport(long HReport, const char* ReportFile, FFetchRow fFetchRow=NULL, FGetFieldValue fGetFieldValue=NULL)

Function loads report definition file, specified in ReportFile.

Function provides you explicit control to retrieve data for report, by specifying two callback functions:
- to fetch new row
- to get value of specified field.

You must call this function prior to generating a report. If for any reason you want to retrieve data manually - define callback functions mentioned above and pass them as parameters to LoadReport function, otherwise don't specify them.


void GenerateReport(long HReport)

Function retrieves data and generates an image of the report.

You must call this function prior to using report presentation functions. If you have specified callback functions to retrieve data, these will be called from this function.


void LoadLabels(long HReport, const char* LabelsFile)

Function loads labels from the external file specified in LabelsFile.

You must call this function after you have loaded a report and before generation of the report. Otherwise, labels will not appear in the report. 


void ImportReportImage(long HReport, const char* ImportFile)

Imports previously exported report image from the ImportFile.

Because report image file ImportFile contains all data (both report definition and report image), so this function does not require other report generation functions before to present the report.


Report Presentation Functions

Report presentation functions must be invoked after report is generated.


void PrintReport(long HReport)

Function prints Report according to Report Definition.


void PreviewReport(long HReport)

Function opens a window and previews report.
Function is available in beta-version.


void ExportReportImage(long HReport, const char* ExportFile)

Exports generated report image into the ExportFile.

Export writes all information from report (both definition and generated image) to the external file ExportFile, so you can later import a file and view report again.