ActiveReports 13
Use Constant Expressions in a Theme
ActiveReports 13 > ActiveReports User Guide > How To > Page Report/RDL Report How To > Use Constant Expressions in a Theme

In the Theme Editor, you can define constant expressions to be used in a theme. Later, you can apply a constant expression to the report’s control by selecting it in the Value field of that control.

Also, you can apply a constant expression to a report’s control in code by using the following syntax (VB code example):

=Theme.Constants!Header
=Theme.Constants("Header")

Constant expressions allow you to define a name and an associated value to be used in themes.

Use the following instructions to create and use constant expressions in themes.

To define a constant expression

  1. In the Theme Editor, go to Constants.
  2. Double-click the field under Name and enter the Constant name (for example, Header).
  3. In the next field to the right, under Value, enter the Constant value (for example, Invoice#).

To use a constant expression

  1. In the Designer, select the report’s control (for example, a TextBox).
  2. In the Properties Window, go to the Values field and select the <Expression> option from the drop-down list to open the Expression Editor.
  3. In the Expression Editor, expand the Themes node with the constant expressions defined in the report theme.
  4. In the Themes node, select a constant and then click the Replace or Insert button.
  5. Click OK to add the constant expression in the TextBox. 



See Also

Concepts