Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Collapse]Snap
   [Expand]Product Information
   [Expand]Getting Started
   [Collapse]Fundamental Concepts
    [Expand]Graphical User Interface
     Supported Formats
    [Expand]Developer Guidelines
    [Collapse]Data Acquisition
      Data Source Wizard
      Snap Mail Merge
      Query Builder
      Master-Detail Relation
      Calculated Fields
      Parameters
    [Expand]Data Shaping
   [Expand]Examples
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Calculated Fields

This document describes how to use calculated fields to evaluate custom expressions based on external data, and embed the results into a Snap document.

The document consists of the following sections.

Expanded Add Calculated Fields

Use calculated fields to perform additional calculations on dynamic data and embed the results into a published document.

To create a calculated field and access its collection, invoke the context menu in the Data Explorer.

A calculated field with the default name (calculatedField1, calculatedField2 etc.) is created. Use Edit Calculated Fields... context menu to change the name and type of the field.

Note

The field's name should begin with a letter or an underscore and contain only alphanumeric characters.

A calculated field's expression can include conditional, date-time, mathematical and other formulas. It can also evaluate the values of other calculated fields, data source fields and parameters.

The Expression Editor is invoked by right-clicking a calculated field and choosing the Edit Expression… item in the invoked popup menu.

After a calculated field is inserted into a document, its value is evaluated each time the document is set to be published.

Expanded Create Calculated Fields in Code

A collection of CalculatedField objects is accessed via the DataSourceInfo.CalculatedFields property.

A calculated field's value is returned after evaluating an expression assigned to the CalculatedField.Expression property.

The following code illustrates how to create and customize a calculated field.

Expanded See Also

How would you rate this topic?​​​​​​​