Skip to content

Knowledge Base

Business Process Automation Platform

Getting “Aggregation unsupported for type: System.String”

Introduction

This article guides you through the necessary steps to aggregate string columns.

Scenario

You’ve created a task where the Format as HTML Pro is consuming the recordset outputted by a Convert XML to Recordset step. In the Format as HTML Pro step, you are creating either sub- or grand totals or both, yet when you run the task, you are seeing an error in the Event Log:

Aggregation unsupported for type: System.String

Resolution

At the time of writing, the Convert XML to Recordset tool outputs all recordset columns as a string data type. Format as HTML Pro cannot aggregate non-numerical data types. You must manually set the data type of the relevant fields in your Format as HTML Pro step:

  1. Open the Format as HTML Pro step and go to the Data tab.
  2. From the Input Recordsets pane on the left, expand the relevant Results from … node.
  3. Right-click the field you are aggregating and select Properties.
  4. Change Default to be False — This tells the Format as HTML Pro step to not use the default data type as dictated by the recordset, but instead to use the settings configured here.
  5. Choose the correct Data Type from the drop-down.
  6. To use the numerical cultural settings of the host computer leave Culture as Default, else choose from the drop-down.
  7. Specify the number of Decimal Places expected in the consumed recordset.

    Format as HTML Pro - Changing Consumed Data Types

  8. Click OK.

The task should queue and run with no further aggregation errors.