rptRegisterExporter
Register a custom export target with a reporting engine,
BOOL32 __stdcall rptRegisterExporter(TRPT Engine, SI32 TargetId, void* Fn, void* UserData);
function rptRegisterExporter(const Engine: TRPT; TargetId: Integer; Fn: Pointer; UserData: Pointer): LongBool; stdcall;
Purpose. Register a custom export target with a reporting engine, so rptExport can write formats beyond the built-in ones through a host-supplied callback.
Description. Binds TargetId to the host's export thunk Fn (called with UserData when a job is exported to that target). Custom ids live at or above RPT_EXP_CUSTOM_BASE — ids below it are reserved for the built-in exporters and are refused. Registering an id again replaces the previous callback. The engine must hold a verified runtime licence, the same precondition every rpt* registration call shares.
Parameters.
| Parameter | Description |
|---|---|
Engine | Reporting engine handle (rptCreateEngine). |
TargetId | The export target id (>= RPT_EXP_CUSTOM_BASE). |
Fn | The export callback thunk. |
UserData | Opaque pointer handed back to the callback. |
Return value. True once registered; False for a bad engine handle, NULL callback, reserved id, or an unverified runtime.
See also. rptExport, rptRegisterFunction, rptLoadPlugin.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Reporting
rptRegisterExporter
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.