To make the expressions in your report easier to understand, you can use aliases instead of explicitly specifying variable or data source and column details. For example, if you have a variable called "MyVariable" in your data dictionary and you set its alias to "my best variable", you can refer to it directly by name or alias.
To use a variable by name, create an expression like this:
{MyVariable}
To use a variable in an alias, create an expression like this:
{[MyBestVariable]}
syntax - variable
If you use spaces, punctuation, or characters within an alias that are not allowed by C# or VB.Net, you must enclose the string representation of the alias in square brackets []. Square brackets are optional if no such characters are used.
For example, if the alias was "MyBestVariable", the expression could be written without parentheses.
{MyBestVariable}
Otherwise, you must enclose the variable in square brackets. Examples of valid alias usage:
{Variable1}
{VariableAndValue}
{[Variable and Value]}
{[Variable and Value]}
{[Variable&Values]}
{[Variable-first]}
For clarity, here's an example of invalid alias usage.
{[Variable&Values]} //This will fail if there are spaces in the name
{Variable & Values} // this will fail due to reserved characters
syntax-data
The same rules are used when creating names for datasources and columns. However, there is one exception. When referring to data columns, enclose only those characters that are illegal identifiers in parentheses. for example:
{DataSource.[data column]}
{[data source].DataColumn}
{[data=source].[data=column]}