[]
        
(Showing Draft Content)

Wyn Enterprise: Expression Editor

You can use an expression to set the value of a control in the report, or set conditions under which certain styles apply. You can set expressions through the Expression Editor dialog while setting values in the properties window. The editor allows you to choose from a number of fields available to the report as well as to a particular property. You can access the Expression Editor by selecting nearly any property of a control and choosing <Expression...> from the drop-down list.

All expressions are enclosed within curly braces {}. Even the expression for a field value for a TextBox is set as follows:

{LastName}

Note: The Date & Time functions used to define the date and time values display the date in MM/DD/YYYY and the time in HH:mm:ss format.

While building an expression, you can directly add the entire expression or part of it in the Expression pane of the Expression Editor. Then use the Insert or Append buttons to create a complete expression.


Expression Editor Dialog

Concatenating Fields and Strings

You can concatenate fields with strings and with other fields. For e.g., use the following expression to get a result like "Customer Name: Bossert, Lewis":

Customer Name: {LastName} , {FirstName}

Conditional Formatting

You can highlight a part of data by using expressions in properties like Color, Font, Border, etc. on specific field values based on a condition. The formula for conditional formatting is:{IIF(<Condition>, <TruePart>, <FalsePart>)}


For e.g., if you enter the following expression in the Font > FontWeight property of a textbox that displays the names of people, you get the name "Denise" in bold.{IIF(FirstName { "Denise", "Bold", "Normal")}

  • Functions


    You can use several aggregate and other functions in your expressions. Wyn Enterprise includes a range of functions, including running value, population standard variance, standard deviation, count, minimum and maximum. E.g., use the following expression to get a count of employees.

    {Count(EmployeeID, Nothing)}

Attributes of Expression Editor

Expression Editor has three major attributes,

Expression pane

The Expression pane is the input area of the Expression Editor Window where you enter the expressions as strings.

Note: All expressions are enclosed within curly braces '{}'. Even the expression for a field value for a TextBox is set as: {LastName}

Values

Values are the input fields available to the selected report. The following Values are available in the Expression Editor:

  • Constants: are static constants like numbers or strings. For example, 123, and "abc".

  • Common Values: refers to the built-in field values of the report. For example, the current page number and the total number of pages.

  • Parameters: this node represents the parameters of the report defined in the report designer.

  • Data Sets: this node lists the datasets and fields linked to the selected report.

  • Operations: this node lists the arithmetic, comparison, concatenation, logical/bitwise, and bit shift operators.

  • Documents Map: defines the labels of the TOC (Table of Content) members of the selected report.

  • Theme: lists the visual settings including fonts, colors, constant, and images. A combination of two or more theme elements is used to increase the graphical appeal of a table in the selected report.

  • Report Items: lists the field items available as textboxes in the selected report.

Functions

You can use a number of aggregate and other functions in your expressions. Wyn Enterprise includes a range of functions, including running value, population standard variance, standard deviation, count, minimum and maximum. For e.g., use the following expression to get a count of employees.

{Count(EmployeeID, Nothing)}

Summary and Total Value Calculations

To Create Expressions

To access the Expression Editor in Wyn Enterprise follow the below instructions,

  1. Navigate to the Resource or Document Portal >> Categories tab.

  2. Select a report under the Document pane. Either click the edit button on the top-right corner of the window or click the ellipses icon and then click the Edit option. The selected report will open in edit mode.

    Navigate to Expression Editor

  3. Select the text box you wish to create or edit the expression for. Now, under the Properties grid on the right side of your screen click the yellow square box next to the Value property in the Common section and click the Expression option. Expression Editor Window will appear on your screen.

    Access the Expression Editor

To create an expression or to edit the content of an expression, follow the below instructions,

  1. In the Expression Editor Window, select an expression element from the Values or Functions section or directly enter the expression in the Expression pane. Double-click the expression element to add it to the Expression pane.

  2. Click the Save button to add the expression.

    Create Expression

  3. To resize the Expression Editor dialog, click and drag the resize button on the bottom left corner of the dialog box. To move the Expression Editor dialog, click and drag the header section of the dialog box.

    Resize and move Expression Editor dialog