Expression Language
Expression language – it is set of operations, constant, functions and variables. This language is used for writing usage of marker conditions (cond attribute) and information output (expr attribute).
Operations
Arithmetic operations.
+, , *, /, %(module division), ^(to raise to a power).
All arithmetic operations are made with numbers. Addition (+) may be used with series/ It means series catenation.
Logical operations.
&& (logical and),  (logical or). Logical operations are made by Boolean operands.
Comparing operations.
<, <=, >, >=, <> , =. Comparing operations are made by Boolean operands.
Functions
Functions divided on standard and user. Standard functions are realized in language, user functions may be added by writing on C#.
Common function syntax: <function name>[arg1..argN]
Standard functions.
Function 
Syntax 
Example 
Description 
abs 
abs[p1] where p1 can be converted to a double. 
abs[10] = 10 
Calculates the absolute value of a numeric parameter. 
avg 
avg[p1, ..., pn] where p1,...,pn can be converted to doubles. 
avg[1, 2, 3] = 2 
Calculates the average of a list of numbers. The list items must be able to convert to doubles. 
between 
between[var, val1, val2] where var, val1, and val2 are integers. if var >= val1 and var <= val2 then the function returns "true", otherwise, the function return "false". 
between[fico, 400, 700] Note that fico is a variable. 
Indicates if a value is between the other values. Please note that the comparison is inclusive. 
concat 
concat[p1, ..., pn] 
concat["This", " ", "is", " ", "a", " ", "test"] = "This is a test" 
This operand function concatenates the parameters together to make a string. 
contains 
contains[p1, p2, ...., pn] If p1 in in the list p2, ..., pn, this function returns "true" otherwise, this function returns "false". 
contains[state, "NY", "WA", "CA"] = true 
Indicates if the item is contained in the list. 
cos 
cos[p1] where p1 can be converted to doubles. 
cos[90] < 0 
Calculates the cosine of a number. 
date 
date[m, d, y] where m is an integer and is the month, d is an integer and is the day, and y is an integer and is the year 
date[3, 20, 2007] 
Create a new date data type 
dateadd 
dateadd[date, "type", amount] where date is a valid date, and type is "y", "m", "d" or "b" (representing year, month, day, or business days) and amount is an integer 
dateadd[now[], "b", 5] 
Adds an amount to a date. Please note that the amount may be negative. 
datemax 
datemax[d1, ..., dn] where d1, ..., dn are dates 
datemax[ 3.20.1999, 3.20.2005, 3.20.2008] = 3.20.2008 
Returns the maximum date in the list 
datemin 
datemin[d1, ..., dn] where d1, ..., dn are dates. 
datemax[ 3.20.1999, 3.20.2005, 3.20.2008] = 3.20.1999 
Returns the minimum date in the list. 
day 
day[d1] where d1 is a date value 
day[3.20.1999] = 20 
Returns the day of a date 
eval 
eval[r] where r is any valid rule 
eval[concat["1", "+", "2"]] = 3 
Evaluates a string rule 
iif 
iif[c, a, b] where c is the condition and must evaluate to a boolean. The value a is returned if c is true, otherwise, the value b is returned. 
iif[year[now[]] = 2008, "2008", "Not 2008"] 
Performs an ifelseend 
indexof 
indexof[a, b1, ..., bn] If the list b1, ..., bn contains the value a, the index of the value is returned, otherwise, 1 is returned. Pleaes note that this is zero based indexing 
iif[indexof[a, "CA", "NY", "WA"] >= 0, "found state", "not found"] 
Returns the index of a list item. 
isalldigits 
isalldigits[p1] where p1 is a string parameter 
isalldigits["12345"] = true 
Determine if the parameter contains all digits. 
isfalseornull 
IsFalseOrNull[a] 
IIF[IsFalseOrNull[a], "false", "not false"] 
Indicates if the parameter has the value false or is null 
isnullorempty 
IsNullOrEmpty[a] 

Indicates is the parameter is null or empty. 
istrueornull 
isTrueorNull[a] 

Indicates if the parameter has the value true or is null; 
join 
join[a, b1, ..., bn] where a is the delimiter and b1, ..., bn are the items to be joined. 
join[" ", "This", "is", "a", "test"] = "This is a test" 
Joins a list of items together using a delimiter 
lcase 
LCase[a] 
LCase["TEST"] = "test" 
Converts a string to lower case 
left 
left[s, n] where s is the string and n is the number of characters 
left["abcd", 2] = "ab" 
Returns the left number of characters from a string parameter. 
len 
len[a] where a is a string variable 
len["test"] = 4 
Returns te length of a string 
lpad 
lpad[a, b, n] where a and b are string values and n is numeric. The parameter p will be appended to the left of parameter a, n times. 
lpad["test", ".", 10] = "..........test" 
Pads a string on the left with new values 
ltrim 
ltrim[a] 

Trims the spaces from the left of a string 
mid 
mid[p1, ..., pn] where p1, ..., pn are numberic values 
mid[1, 4, 100] = 4 
Calculates the median for a list of numbers 
month 
month[d1] where d1 is a date value 
month[now[]] returns the current month 
Returns the month of a date 
not 
not[p1] where p1 is a boolean parameter 
not[5<10]=false 
Performs a NOT on a boolean parameter. 
now 
now[] This operand function takes no parameters 
year[now[]] = 2008 
Returns the current date 
numericmax 
NumericMax[p1, ..., pn] 

Finds the maximum numeric value in a list 
numericmin 
NumericMin[p1, ..., pn] 

Finds the numeric minimum value in a list 
pcase 
pcase[a] where a is a string 
join[" ", pcase["dave"], pcase["SMITH"] ] = "Dave Smith" 
Converts a string to Proper Case 
remove 
remove[a, b] where a and b are string 
Remove["....this...is..a...test...", ".a"] = "thisistest" 
Removes the specified characters from the string 
replace 
Replace[a, b, c] where a is the search string, b is the value being replaced, and c is the value that is being inserted 
replace["3.20.2008", ".", ""] = "3202008" 
Replaces one string with another string 
right 
right[s, n] where s is the string and n is the number of characters. 
right["abcd", 2] = "cd" 
Returns the right number of characters from a string parameter 
round 
round[n, d] where n is the numberic value to be rounded, and d is the number of decimal places. 
round[123.45, 0] = 123 
Rounds a numeric value to the number of decimal places 
rpad 
rpad[a, b, n] where a and b are string values and n is numeric. The parameter p will be appended to the right of parameter a, n times. 
rpad["test", ".", 10] = "test.........." 
Pads a string on the right with new values 
rtrim 
rtrim[a] 

Trims the spaces from the right of a string 
searchstring 
SearchString[a, n, b] where a is the string that is being searched, b is the string that is being sought, and n is the start position in a 
SearchString["abcdefghijk", 0, "efg"] = 4 
Searches for a string within another string at a specified starting position 
sin 
sin[a] 
sin[45] = 0.85 
Calcuates the sin of a number 
sqrt 
sqrt[a] where a is a numberic parameter 
sqrt[25] = 5 
Calculates the square root of a number. 
stringmax 
StringMax[p1, ..., pn] 
StringMax["Apple", "Zebra"] = "Zebra" 
Finds the maximum string in the list 
stringmin 
StringMax[p1, ..., pn] 
StringMax["Apple", "Zebra"] = "Apple" 
Finds the minimum string in the list 
substring 
SubString[s, a, b] where s is the string, a is the starting point, and b is the number of characters extracted. 
substring["abcdefghijk", 3, 5] = "defgh" 
Extracts a substring from a string 
trim 
trim[a] 

Trims the spaces from the entire string 
ucase 
ucase[a] 
ucase["test"] = "TEST" 
Converts a string to upper case 
year 
Returns the year of a date 
year[d1] where d1 is a date 
year[now[]] returns the current year 
Constant
Constant are numbers and series used in expression writing. Series constant placed into inverted commas. Note that inverted commas don`t doubled (for escape inverted commas in attribute)
Examples:
1
1.5
“text constant“
Variables
Variables are intended for using expression data source. There are 4 groups:
 Sheet variables;
 Current grouping structure variables;
 Current structure summary table variables (are not supported yet);
 Outside arguments.
Sheet variables.
Sheet variables are applied for using data source in expressions, may be used as any template expression. If calls are non aggregation  the first row of data source column value will be used
Have compound name. Syntax name:
{CNCELLS}_{<source name>}_field_{<column name>}[_{{MAXMAXIMUM}{MINMINIMUM}}]
CNCELLS – it means, that variable applies to sheet variable.
<source name>  data source name, which the variable will be initialized
<column name>  data source column name
{MAXMAXIMUM}{MINMINIMUM} – aggregation function with column data. Maximum or minimum can be calculated.
Examples:
CN_Persons_field_Name – sheet variable, which initialized from the first series Persons data source, from column Name.
CELLS_Persons_field_Salary_MAX – sheet variable, which initialized from the first series Persons data source, with max Salary column value.
Current grouping structure variables
Current grouping structure variables are applied for using data source structure (src attribute, or PlaceFor marker in expressions in group structure. If calls are non aggregation  the first series of data source context column value will be used
Have compound name. Syntax name:
{GN}_
{
{GSSECTION}
{{GGROUP}<group_number>}
{DDATA}
}_
{
{field_{<column_name>}[_{{MAXMAXIMUM}{MINMINIMUM}}]}
{extra_{oddSeriesevenSeriessubGroupCount}}
}
GN – – it means, that variable applies to current group structure variables.
Data source context divided into 3 types:
GSSECTION – group source context. Variable may be used as any structure expression.
{GGROUP}<group_number> – group part source context, group_number – group number, beginning from 1. Group order 0 equivalents GSSECTION. Variable may be used in group only. Group order is (beginning from 1) more than 1 or equivalents context group order.
DDATA – currents series data context. Variable may be used in group data structure.
Then there will be data type – column, or special value
field_{<column_name>}[_{{MAXMAXIMUM}{MINMINIMUM}}]
describes column or aggregation function by the column
<column name>  data source column name
{MAXMAXIMUM}{MINMINIMUM} – aggregation function by the column data. Maximum or minimum can be calculated.
extra_{oddSeriesevenSeriessubGroupCount}
describes special context value
oddSeries – Boolean value. Is the current series even for chosen context
evenSeries – Boolean value. Is the current series odd for chosen context
subGroupCount – number. Shows quantity of subgroups with number N+1 for current subgroups with number N.
Examples:
GN_S_field_Name – variable, which initialized from the first series of group data source structure, from Name column.
GN_G1_field_Name – variable, which initialized from the first series of data, grouped by the column group with number 1, from Name column .
GN_D_field_Name  variable, which initialized current data series, from Name column.
GN_G1_field_Salary_MAX  variable, which initialized max value data Salary column, grouped by the column group with number 1.
Created with the Personal Edition of HelpNDoc: Easily create HTML Help documents