Expressions
As you have probably noticed when we created reports in Visual Studio, report items use expressions to retrieve data from fields and perform calculations.
Some expressions are created for you automatically. For example, when you create a new report and drag fields from the dataset onto report items, the values of text boxes are automatically set to expressions that refer to the dataset fields by name.
For example:
=First(Fields!Customer__Sales__LCY__Caption.Value) =Fields!Customer__Sales__LCY__.Value =Sum(Fields!Customer__Sales__LCY__.Value)
Tip
Expressions are like formulas in Excel
Expressions can be compared with formulas in Excel. For example the value of a text box can be a constant or an expression, just like any cell inside an Excel worksheet.
The most common expression, as you can see in the examples above, refers to a field in the dataset. Besides dataset fields (Fields!
) you can also reference other types of items, like for example:
Text boxes on the report (
ReportItems!
)Global...