Fields
The most basic type of expression, called a field expression, displays a field value in a text box. All fields used in the report from the chosen business object are displayed in the Fields List pane and you can use any of these in an expression.
To link a business object field to a report item, you must include in the expression the Fields collection, the name of the field, and the Value property.
For example, to display an account code in a text box, use this expression:
=Fields!LedgerLine_accountCode.Value
An expression can be short, referring to a field object, or long to include decision functions or formatting based on fields or other report items. Expressions in report items and properties must begin with an equal character (=), otherwise the text is evaluated as a string.
Examples:
Here are some basic arithmetic and aggregate expressions
- This concatenates the
FirstName field and the
LastName field.
=Fields!FirstName.Value &" "& Fields!LastName.Value
- This adds the Quantity and
UnitPrice for a
LineTotal
=Fields!Quantity.Value*Fields!UnitPrice.Value
- This performs a sum
aggregation on the
LineTotal field.
=Sum(Fields!LineTotal.Value)