By default, Document Creator follows the C# syntax for expressions (you can also switch to VisualBasic.NET syntax via the Report Options window, under the Script tab).
Here are some examples of expressions in the default C# syntax:
Syntax Expression |
Example |
Explanation |
[number] == 0
|
[SalesLine.LineAmount] == 0
|
Line amount EQUAL TO 0 |
[number] != 0
|
[SalesLine.LineAmount] != 0
|
Line amount NOT EQUAL TO 0 |
[textvariable] != ""
|
[InvHdr.YourReference] != ""
|
"Your Reference" field of Invoice header NOT EQUAL TO empty |
![boolean]
|
![SalesHeader.ShowLotSN]
|
NOT Show Lot-/Serial nos. (Negation) |
[expr1] && [expr2]
|
([SalesLine.TypeNo] != 0) && ([SalesLine.TypeNo] != 3)
|
Line type not equal to 0 AND
Line type not equal to 3 |
[expr1] || [expr2]
|
([SalesLine.TypeNo] == 0) || ([SalesLine.TypeNo] == 3)
|
Line type equal to 0 OR
Line type equal to 3 |
[number] >= 0
|
[SalesLine.Amount] >= 0
|
Line amount GREATER THAN OR EQUAL TO 0 |
[number] <= 0
|
[SalesLine.Amount] <= 0
|
Line amount LESS THAN OR EQUAL TO 0 |
[datevar] != default(DateTime)
|
[SalesHdr.DueDate] != default(DateTime)
|
Date has been entered (date <> 0D) |
[textvar].StartsWith("Hello")
|
[InvHdr.FieldName].StartsWith("Hello")
|
Text field STARTS WITH text "Hello"
(similarly you can use:
Contains
and EndsWith) |
[Blob] != null && [Blob].Length > 0
|
[InvLine.ItemPicture] != null && [InvLine.ItemPicture].Length > 0
|
Blob/Byte-array is filled |