Syntax:
INT LlDefineVariable (HLLJOB hJob, LPCTSTR lpszName, LPCTSTR lpszCont);
Task:
Defines a variable of the type LL_TEXT and its contents.
Parameter:
hJob: List & Label job handle
lpszName: Pointer to a string with the name of the variable
lpszCont: Pointer to a string with the contents of the variable
Return Value:
Error code
Hints:
Please note the general hints in the section "Variables and Fields in List & Label".
This function defines a text variable and can be mixed with the other LlDefineVariable...() functions.
LlDefineVariable(...) is identical to LlDefineVariableExt(..., LL_TEXT, NULL).
List & Label predefines the following variables:
Field |
Meaning |
LL.CountDataThisPage |
Numerical, footer field, defined data records per page |
LL.CountData |
Numerical, footer field, defined data records total |
LL.CountPrintedDataThisPage |
Numerical, footer field, printed data records per page |
LL.CountPrintedData |
Numerical, footer field, printed data records total |
LL.SortStrategy |
String, sort expression |
LL.FilterExpression |
String, filter expression |
The difference between "defined" and "printed" data records is that the user can apply a filter condition to the data records so that with every data record sent from the program the "defined" numbers increase, but not necessarily the "printed" ones (the latter values are only increased if the data record has been printed, that is, matches the filter condition).
Example:
HLLJOB hJob;
hJob =
LlJobOpen(0);
LlDefineVariableStart(hJob);
LlDefineVariable(hJob,
"Name", "Smith");
LlDefineVariable(hJob, "forename",
"George");
LlDefineVariableExt(hJob, "residence", "Cambridge, LL_TEXT,
NULL);
LlDefineVariableExt(hJob, "Postal Code",
"*CB1*",
LL_BARCODE_3OF9,
NULL);
<... etc ...>
LlJobClose(hJob);
See also:
LlDefineVariableStart, LlDefineVariableExt, LlDefineVariableExtHandle, LlGetVariableContents, LlGetVariableType