In common all data fields and report commands are placed among the report text, tables and other objects, where you need it:

All controlling words, variables and data fields must be comprised between symbols "\" (back slash), for example: \date\ or \Query1:CustNo\

Reference to a field may be created, using its name or its number: \Query1:(0)\, \Table1:(5)\

Report generator ignores spaces in field names and keywords. However, if you want to use name with spaces, you may  write it between the chars "[" and "]" for example:
\Table1:[Field name with spaces]\

In a report template datasets may be identified by their names or by chars a-z in that order, in which they were sent to TEkRtf.Execute method in program code.

In addition to dataset fields, variables may be used in the report. Variables may be created in program code with CreateVar method and modified with VarByName method: 

EKRTF1.VarByName('name').AsString:='John Smith';

Variables, will appear in VarList property in format variablename=value. For example: if in the VarList is kept a line CustomerName=John Smith, in the pattern of report may be a field \CustomerName\.

There are several types of constants in EK RTF report language.

Type of constant Description
String String constants are defined with double quotes, single quotes, or "~" symbols. For example: 
\"constant string 1"\\'constant string 2' \\~constant string 3~\

Constants are often used as parameters for user defined functions. If you need to place text with a "\" symbol in report template, you also may use a string constant, for example: \"c:\My Documents\"\.

Numeric Numeric constants are numbers in decimal or exponential form: 

Date Date constants are always written in a form \{yyyy-mm-dd}\, for example \{2002-07-20}\.

Boolean Boolean constants are \True\ or \False\. If you have EK RTF component propertiesTrueValue and FalseValue set for example to "Yes" and "No", In a report results you will see Yes and No instead of True and False.

In addition you may create user defined functions, like this \myfunc(a:field1, a:field2)\.

See also User defined function example in the Demo center for details.

Next topic: Operators and functions