3f1aa611741a9e5af08f128bb486ec5529730f58
Guides/ReportDesign/15.0-Expressions-in-Izenda.md
| ... | ... | @@ -143,4 +143,14 @@ You can also nest other functions inside case statements using parenthesis aroun |
| 143 | 143 | |
| 144 | 144 | More information about using this function can be found [[here|http://msdn.microsoft.com/en-us/library/ms181765.aspx]]. |
| 145 | 145 | |
| 146 | -It is possible to enable other SQL functions or [[write new functions|/API/CodeSamples/ExtendedFunctions]]. |
|
| ... | ... | \ No newline at end of file |
| 0 | +It is possible to enable other SQL functions or [[write new functions|/API/CodeSamples/ExtendedFunctions]]. |
|
| 1 | + |
|
| 2 | +##15.5 Subtotal Expressions |
|
| 3 | + |
|
| 4 | +You can also inject Expressions into the subtotal of a field. These behave slightly differently from typical Expressions. |
|
| 5 | + |
|
| 6 | +Since an Expression is just manipulating a given field in the Select clause in the SQL query, you normally cannot have expressions which refer to each other as they are all processed independently at the same step in query processing. This is why Expressions cannot refer to each other, and must refer to an actual field from the database. |
|
| 7 | + |
|
| 8 | +Subtotal Expressions are processed in a different query, the subtotal query, which occurs after the main query for a report part. This means that subtotal Expressions can, and in fact _must_ refer to the aliased field name per the text in the Description box. Further, if a field is part of a column group you must add the text of the column group using the @ symbol to separate field name and column group. |
|
| 9 | + |
|
| 10 | +For example: If I have a literal field "MyField" from the database, in an expression I can refer to it as [MyField] even if we are using the Description text box to name the field "AliasedField". If I am using a subtotal expression, I must refer to this field as [AliasedField], or even [AliasedField@ColumnGroup]. |
|
| ... | ... | \ No newline at end of file |