Showing a sum or subtotal in an RDL based report

When using subtotal functions such as SUM() in RDL-reports, the result are displayed as ERROR. The workaround for this is to explicitly convert the values to a numeric value.

To create a report that shows the total amount per invoice do the following: 

- create a report in Administration | Reports
- add the services data provider 
- add a RDL template 
- Open the RDL template in the designer, and add a Table using the Insert table Wizard.

Add the Invoice field in the Groups section, and add the expression SUM(AmountExclVat) to the Values section. 

Note that the CDec function is needed to convert the value from a text string to a Decimal. If you don't do that, the sum will display as ERROR when running the report.