11.1. Datasource input driver registration API #

11.1.1. Register a datasource input driver
11.1.2. Unregister a datasource input driver
11.1.3. Get a datasource input driver
11.1.4. Initialize and register the Python/Pandas based datasource input driver
11.1.5. De-initialize and unregister the Python/Pandas based datasource input driver

A datasource driver can be implemented and registered with OpenCReports easily. In fact, all the built-in datasource input drivers use the registration interface. A newly registered datasource input driver can also replace the built-in ones.

11.1.1. Register a datasource input driver #

bool
ocrpt_input_register(const ocrpt_input * const input);

This function must be called before creating reports.

11.1.2. Unregister a datasource input driver #

void
ocrpt_input_unregister(const ocrpt_input * const input);

This function must only be called after the application is done creating reports, i.e. when exiting.

11.1.3. Get a datasource input driver #

Get a datasource input driver using its name.

const ocrpt_input * const
ocrpt_input_get(const char *name);

11.1.4. Initialize and register the Python/Pandas based datasource input driver #

This function initializes the embedded Python subsystem and if successful, registers the datasource under the names pandas and spreadsheet.

bool
ocrpt_pandas_initialize(void);

11.1.5. De-initialize and unregister the Python/Pandas based datasource input driver #

This function unregisters the datasource driver, and de-initializes the Python subsystem.

void
ocrpt_pandas_deinitialize(void);

This function must only be called after the application is done creating reports, i.e. when exiting.