LlDefineFieldExt

Syntax:

INT LlDefineFieldExt (HLLJOB hJob, LPCTSTR lpszName, LPCTSTR lpszCont, INT lPara, LPVOID lpPara);

Task:

Defines a list/table field and its contents.

Parameter:

hJob: List & Label job handle

lpszName: Pointer to a string with the name of the field

lpszCont: Pointer to a string with the contents of the field

lPara: Field type (LL_TEXT, LL_NUMERIC, ...), if necessary combined with 'or' (see below).

lpPara: For future extensions, must be NULL.

Return Value:

Error code

Hints:

Please note the general hints in the section "Variables and Fields in List & Label".

List & Label predefines the fields listed in LlDefineField().

lPara 'or'ed with LL_TABLE_FOOTERFIELD supplies field definitions only for the list footer. The footer is dynamically linked to the list body and is suitable for, e.g., dynamic calculations as the line for totals or sub-totals.

lPara 'or'ed with LL_TABLE_HEADERFIELD supplies field definitions only for the list header.

lPara 'or'ed with LL_TABLE_GROUPFIELD supplies field definitions only for the group.

lPara 'or'ed with LL_TABLE_GROUPFOOTERFIELD supplies field definitions only for the group footer.

lPara 'or'ed with LL_TABLE_BODYFIELD supplies field definitions only for the list body.

If none of these flags is used, the fields appear in all field selection dialogs in the table object.

Example:

HLLJOB hJob;

hJob = LlJobOpen(0);
LlDefineFieldStart(hJob);
LlDefineField(hJob, "Name", "Smith");
LlDefineField(hJob, "Forename", "George");
LlDefineFieldExt(hJob, "Residence", "Cambridge", LL_TEXT, NULL);
LlDefineFieldExt(job, "Number of entries per page",
   "1", LL_TABLE_FOOTERFIELD Or LL_TEXT, NULL)
LlDefineFieldExt(hJob, "Postal code",
   "*CB5 9NB*", LL_BARCODE_3OF9);
LlDefineFieldExt(hJob, "Photo",
   "c:\\photos\\norm.bmp", LL_DRAWING);
<... etc ...>
LlJobClose(hJob);

See also:

LlDefineFieldStart, LlDefineField, LlDefineFieldExtHandle