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:
- Open the Format as HTML Pro step and go to the Data tab.
- From the Input Recordsets pane on the left, expand the relevant Results from … node.
- Right-click the field you are aggregating and select Properties.
- 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.
- Choose the correct Data Type from the drop-down.
- To use the numerical cultural settings of the host computer leave Culture as Default, else choose from the drop-down.
- Specify the number of Decimal Places expected in the consumed recordset.
- Click OK.
The task should queue and run with no further aggregation errors.