VpeGetTplFieldNullValueText

<< Click to Display Table of Contents >>

Navigation:  Templates >

VpeGetTplFieldNullValueText

Previous pageReturn to chapter overviewNext page

Returns the text which is printed for Fields that have a null-value. You can assign a special text to Fields with a null-value. By default, the null-value text is an empty string. You can specify for each field an individual null-value text, for example "n/a".

int VpeGetTplFieldNullValueText(

VpeHandle hTemplate,

LPCSTR data_source_prefix,

LPCSTR field_name,

LPSTR text,

UINT *size

)

VpeHandle hTemplate

Template Handle

LPCSTR data_source_prefix

prefix of the Data Source, this is the unique name of a Data Source as defined in dycodoc

LPCSTR field_name

name of the Data Source Field

LPSTR text

pointer to a buffer that receives the string. This parameter can be NULL, if the data is not required, in such case no data is copied

UINT *size

pointer to a variable that specifies the size, in bytes, of the buffer pointed to by the text parameter. When the function returns, this variable contains the number of bytes copied to text - including the size of the terminating null character.

If value is NULL, and size is non-NULL, the function returns True and stores the size of the data, in bytes, in the variable pointed to by size. This lets an application determine the best way to allocate a buffer for the value's data.

Returns:

Value

Description

True

value retrieved successfully

False

value could not be retrieved (for example out of memory)

Example:

UINT uSize;

char szText[256];

uSize = sizeof(szText);

VpeGetTplFieldNullValueText(hTemplate, "Sample2", "Recipient:Company", szText, &uSize);

 

See Also:

"dycodoc Template Processing" in the Programmer's Manual