Using Data Fields in Expressions

Using Data Fields in Expressions

Expressions can contain values from data sources. A string representation of the field is used to reference that field from the data source. The proper syntax for the reference is the name of the data source and the field name with a full-stop character or decimal point separating them, surrounded by curly braces:

{DataSource.Column}
It is possible to drag and drop from the data dictionary to the page of a report or the expression editor, and the information will be inserted with the correct syntax automatically.

Parent Relationships

In cases where the data source has a parent relationship with another data source, you can reference other fields from the parent data source. The proper syntax, in this scenario, is the name of the data source, followed by the relation name, and then the field name. Each name should be separated by a full-stop character or a decimal point, and the entire thing should be surrounded by curly braces, as before.

{DataSource.Relation.Field}

If you have a set of information like the following:

  1. Cabinets - the name of a data source. 
  2. ParentCategories - the name of the relation. 
  3. Cabinets is a list of cabinets, and Categories is a list of categories of these products. 
  4. CategoryName is a column name in the Categories data source. 
{Cabinets.ParentCategories.CategoryName}

The above expression will yield the name of a category for a cabinet in the report.

A column can be called through multiple relationships. For example:

  1. OrdersDetail - the name of a data source. 
  2. ParentCabinets - the name of the relation between OrdersDetail and Cabinets
  3. ParentCategory is the name of the relation between Cabinets and Categories.
  4.  CatName is a field in the Categories data source. 
{OrdersDetail.ParentCabinets.ParentCategory.CatName}

The above expression will yield the name of a category for a cabinet in the report. This is has been done without a direct call to the Categories data source.

If VB.NET is used as the reporting language, the names will not be case sensitive. However, if the reporting language is C#, the names are case sensitive.

All data items are converted to the type that is specified in the options column. This dynamic conversion helps to accelerate the development of reports. To acquire data from a column without conversion, specify the data source directly.

In C#:

{Cabinets[“CabinetName”]}

The above expression will return data from the Cabinets data source without conversion.

In VB.NET:

{Cabinets.Item(“CabinetName”)}
    • Related Articles

    • Using Functions in Expressions

      Built-in Functions There is a variety of built-in functions available in the Report Designer. These functions can be accessed directly from the data dictionary, or from within the Expression Editor. Here is an example of a built-in function: ...
    • Using Aliases in Expressions

      Aliases can make it easier to understand expressions in reports. If you have a variable called “VariableA” and you have set an alias for it to “VA,” the variable can be referenced by Name OR Alias. By Name: {VariableA} By Alias: {[VA]} Syntax – ...
    • Using Expressions in the Rich Text Editor of Report Designer

      The articles in this section of the Knowledge Base involve working with Rich Text for display in your reports. To learn more about the Rich Text editor, and how to access this section within the Report Designer, see An Introduction to the Rich Text ...
    • Applying a Sort to a Data Band in Report Designer

      The articles in this section of the Knowledge Base involve working with Lists for display in your reports. To learn more about Lists and how to access the Report Designer, see Creating Lists in Report Designer. This article provides information for ...
    • Creating Lists in Report Designer

      The articles in this section of the Knowledge Base involve working with Lists for display in your reports. To access the Report Designer, select Toolbox Setup > Design Reports > Design (Report Type) Report. Select New Report to design a report from ...
    • Recent Articles

    • Toolbox Release Notes | Build 24.1.0430.641

      The following release notes apply to Toolbox build 24.1.0430.641. G-Code Path Fix An issue was discovered wherein G-code would sometimes not generate along the correct path, with files never being created in secondary folders, even in circumstances ...
    • Microvellum Foundation Library Release Notes | Build 24.0419

      Additions Added the new Blum SPACE STEP system. This can be activated within the “Toe Kick Assembly” construction option prompt in certain base & tall cabinet products. Added a new drawer system, the Harn Alunan T. Added 9 new Lamello Cabineo X ...
    • Toolbox Release Notes | Build 24.1.0416.641

      The following release notes apply to Toolbox build 24.1.0416.641. Maestro Toolfile Fix There was an issue with Maestro SCM Toolfiles reportedly experienced by some users, wherein the labels output by autolabeling would be in incorrect positions, an ...
    • Toolbox Release Notes | Build 24.1.0409.641

      The following release notes apply to Toolbox build 24.1.0409.641 Saw Delimited Processing Station Figure 1: The Saw Delimited option in a custom processing station. New options have been added to saw processing stations to allow for control over data ...
    • Toolbox Release Notes | Build 24.1.0328.641

      The following release notes apply to Toolbox Build 24.1.0328.641 Fillet Token Fixes Issues were discovered in the use of fillet tokens on products that also had the IRIB setting enabled: Some users processed work orders with rounded parts, which ...