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.
bool ocrpt_input_register(const ocrpt_input * const input);
This function must be called before creating reports.
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.
Get a datasource input driver using its name.
const ocrpt_input * const ocrpt_input_get(const char *name);
This function initializes the embedded Python subsystem
and if successful, registers the datasource under the names
pandas and spreadsheet.
bool ocrpt_pandas_initialize(void);
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.