BOOL32 __stdcall rptSetParamStrA(TRPTJOB Job, const char* Name, const char* Value);
BOOL32 __stdcall rptSetParamNum(TRPTJOB Job, const char* Name, double Value);
BOOL32 __stdcall rptSetParamInt(TRPTJOB Job, const char* Name, int64_t Value);
function rptSetParamStrA(const Job: TRPTJOB; const Name, Value: PAnsiChar): LongBool; stdcall;
function rptSetParamNum(const Job: TRPTJOB; const Name: PAnsiChar; Value: Double): LongBool; stdcall;
function rptSetParamInt(const Job: TRPTJOB; const Name: PAnsiChar; Value: Int64): LongBool; stdcall;
Purpose. Bind a named report parameter to a string, floating-point, or 64-bit integer value before rendering — the expression language's parameter values, consulted by {{ }} interpolations and expressions throughout the report definition (V16 conceptual chapters 03-04).
Description. All three funnel into SetParamCore(Job, Name, TRptValue), wrapping the typed value into the engine's own tagged TRptValue union (RVStr/RVFloat/RVInt) and calling J.SetParam(Name, Value). Name is always decoded via UTF8ToString regardless of which of the three functions is called — consistent with this whole unit's "A means UTF-8" convention documented above. rptSetParamStrW(Job, Name, nil) sets an empty string rather than failing — a nil value pointer is not treated as an error for the string setter specifically.
Parameters.
| Parameter | Description |
|---|---|
Job | Target job handle (must be open, not yet necessarily rendered). |
Name | Parameter name (UTF-8 bytes even in the A form). |
Value | The typed value to bind. |
Return value. True if Job resolves and Name is non-nil.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Reporting
rptSetParamNum
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.