PANTHEON™ Помош

 Категории
[Collapse]АРЕС
  Овозможување прика со волшебник во персонални мапи
 Главна страна - Добре дојдовте во помош за PANTHEON
[Collapse]PANTHEON
 [Collapse]PANTHEON упатства
  [Collapse]Водич за Datalab PANTHEON™
   [Expand]ПОС
   [Collapse]Подесувања
    [Expand]Партнери
    [Expand]Иденти
    [Expand]ПОС
    [Expand]Производство
    [Expand]Вработени
     Календар
    [Expand]Сметководство
    [Expand]Царина
    [Collapse]Програм
     [Expand]Програма за доверба
     [Expand]Видови документи
     [Collapse]Облици на испис
       Поставки во Администраторска конзола
      [Expand]Облици на испис
       Преглед на испис
      [Expand]Користење SQLEXP израз во исписи
      [Expand]Дизајнер на извештаи
      [Expand]Пораки поврзани со исписи
      [Expand]Создавање Извештаи
      [Collapse]Креирање исписи
       [Expand]Основи на креирање исписи
       [Expand]Појаси на испис
       [Collapse]Елементи на испис
         Податоци
         Богат едитор
         Мемо (едноставен едитор)
         Слика
         Подиспис (subreport)
         Графички елементи
         Системски функции
         Графикон
         Formatting Numerical and Date Fields
         Expressions Syntax
         Using Parameters in SQL Commands
         Aggregate Functions
       [Expand]Како да се креира испис
      [Expand]Групи и Агрегати
      [Expand]Форматирање и Истакнување
       Вгнездени Извештаи (Подизвештаи)
      [Expand]Спецификации на печатите во ПАНТЕОН
      [Expand]Скрипт
       Разглед на дизајн на извештајот
      Текстови на документи
      Начин на достава
     [Expand]Картички за доверба
     [Expand]Администраторска конзола
     [Expand]Елементи на контролна табла
      Извештаи на контролна табла
      Ад-хок анализа
     [Expand]АРЕС
      SQL уредувач
    [Expand]Документација
    [Expand]Тековен корисник
   [Expand]Нарачки
   [Expand]Материјално
   [Expand]Производство
   [Expand]ПОС
   [Expand]Сервис
   [Expand]Финансии
   [Expand]Кадри
   [Expand]Аналитика
   [Expand]Работна површина
   [Expand]Помош
   [Expand]Пораки и предупредувања
    Системско окружување за Даталаб програми
   [Expand]Дополнителни програми
  [Expand]Водич за PANTHEON Ретал
  [Expand]Водич за PANTHEON Вет
  [Expand]Водич за PANTHEON Farming
 [Collapse]PANTHEON кориснички прирачници
  [Expand]Кориснички прирачник Datalab PANTHEON™
  [Expand]Корисничко упатство за PANTHEON Ретал
  [Expand]Корисничко упатство за PANTHEON Vet
  [Expand]Корисничко упатство за ПАНТЕОН Земјоделство
[Collapse]PANTHEON Web
   
 [Collapse]Водич за PANTHEON Web
  [Expand]Водич за PANTHEON Web Light
  [Expand]Водич за PANTHEON Web Terminal
  [Expand]Водич за PANTHEON Web Legal
 [Collapse]Кориснички прирачник за PANTHEON Web
  [Expand]Како да започнете со PANTHEON Web
  [Expand]Кориснички прирачник за PANTHEON Web Light
  [Expand]Кориснички прирачник за PANTHEON Web Terminal
  [Expand]Кориснички прирачник за PANTHEON Web Legal
[Collapse]PANTHEON Гранула
 [Collapse]Водич за PANTHEON Гранули
  [Expand]Гранула Кадри
  [Expand]Гранула Патни налози
  [Expand]Гранула Документи и задачи
  [Expand]Гранула Контролна табла
  [Expand]Гранула B2B нарачки
  [Expand]Гранула Сервис на терен
  [Expand]Гранула Инвентар на основни средства
  [Expand]Гранула Попис на магацини
 [Collapse]Кориснички прирачник за PANTHEON Гранули
  [Expand]Започнување, Pantheon гранули
  [Expand]Гранула Кадри
  [Expand]Гранула Патни налози
  [Expand]Гранула Документи и Задачи
  [Expand]Гранула Б2Б нарачки
  [Expand]Гранула Контролна табла
  [Expand]Гранула Сервис на терен
  [Expand]Инвентаризација на фиксни средства
  [Expand]Гранула Попис на магацин
[Expand]Кориснички сервер

Load Time: 1812,5264 ms
"
  2582 | 2982 | 29949 | Published
Label

Expressions Syntax

Expressions Syntax

Expressions Syntax

Expressions are used for calculating numerical values, strings or logical values ("true" or "false"). There are various operators and functions available for this, comparable to a programming language ("Pascal" in this case), which can be used to do many kinds of calculations. You can do operations with data fields, for example calculate the tax for a given amount, or merge two data fields into one string. Please note that if the expression is a property of a report band, the result of the expression must be a logical value. Only the group band expects the result to be a string or a number, just like the expression-field report-element.

Composing expressions

The expression evaluator is working with four data types: Strings, Integer, Float and Boolean. Binary data and memo fields are not supported in expressions. Below is a list of how database fields are converted to report data types:

Data type
Field type
String
String fields, date and time fields
Integer
SmallInt fields, byte fields, integer fields
Float
Float fields, currency fields
Boolean
Boolean (logical) fields

Report expression syntax is very much like Object Pascal. Below is a list of supported operators:

Operator
Description
+
Add
-
Subtract
*
Multiply
/
Divide
()
Parentheses
And
Logical AND
Or
Logical OR
Not
Logical NOT
=
Equal
<
Less than
>
Greater than
<=
Less than or equal
>=
Greater than or equal
<>
Not equal
The standard functions included are:

Function
Description
Date
Return current date as a string
Time
Return current time as a string
Str(Number)
Converts the numeric argument to a string
Copy(Str,s,l)
Returns a substring of str (starting from the s-th character, returning a maximum of l characters)
Int(Number)
Returns the integer part of a number
Frac(Number)
Returns the fractional part of a number
If (Expr, r1, r2)
Returns r1 or r2 depending on the boolean expr
TypeOf(Expr)
Returns the data type of expr
Sqrt(Number)
Returns the square root of a number
True
Logical value True
False
Logical value False
Sum(Expr)
Returns the sum of expr
Count
Returns the number of entires
Min(Expr)
Returns the lowest value of expr
Max(Expr)
Returns the highest value of expr
Average(Expr)
Averages the expr

Using database fields in expressions

Any field in any table referenced in your report can be accessed in an expression. Field names can be referenced either just by the field name itself (e.g. Name) or by the table name followed by a dot and the field name (e.g. Customers.Name). If you do not specify a table name the report engine will search for the field in all available data sets and use the first instance found.

The current version of the expression evaluator does not support field names with embedded special characters like blank, "/", dot, dollar sign and so on.

Using Strings in Expressions

Strings in expression should be put in single quotes. The following is a valid expression:

"Computers are great!"

Maximum string length is 255 characters.

Expression Examples

Below are some examples of expressions:

Expression Description
1
Integer constant, returns 1
1.5
Floating point constant, returns 1.5
"Delphi"
String constant, returns "Delphi" as a string
True
Logical constant, returns True
1 + 2
Numeric calculation, returns 3
2 * (3 + 2.5)
Numeric calculation, returns 11
"Delphi" + " is great"
String calculation, returns "Delphi is great"
Name
Returns the value of the field Name if it exists
Customer.Name
Returns the value of the field Name in the Customer table
Name + " " + Contact
Adds the Name field, a blank and the Contact field
AmountPaid * TaxRate / 100
Numeric field calculation
"Printed "+ Date
String calculation
"Total amount paid is " + str(AmountPaid)
String calculation
if(AmountPaid > 5000, "Large order", "Small order")
Returns "Large order" if AmountPaid is greater than 5000, else "Small order"
if(CheckField, "X", " ")
Prints an X if CheckField is True

Compose expressions visually

Expressions can be typed in directly to the corresponding edit line, or you can press the button ".." to the right of the edit line to show the expression builder dialog. You can then visually design your expression with your mouse. If a used function has parameters, like "Copy" or "Sum", another copy of the dialog will be opened to define those parameters separately.


 

Rate this topic
Was this topic usefull?
Comments
Comment will also bo visible in forum!