With dotnet report builder v2.0.4, users can now create Custom fields using basic calculations. This allows users to easily add a calculation instead of the developer creating a stored procedure.
To add a Custom Field to a Report, when choosing Data Fields in the Report Designer, click on the “Customize” button:
![](https://snag.gy/5yGjuH.jpg)
This initiates the process to create a Custom Field. As the user checks the Field, it is added to the calculation. The user can choose basic arithmetic operations to apply to the field calculation.
![](https://snag.gy/aDux5C.jpg)
The user also has the option to Add ( ) to the formula by clicking the “Add ( )” button. Another option available is to add a constant value to the equation. So a user can setup the following as an example of using parenthesis:
![](https://snag.gy/f4idYT.jpg)
An example of using a constant value in the calculated field can be the following to concatenate Last and First name:
![](https://snag.gy/hGWavO.jpg)
Once the field design is done, enter a name for the custom field, and click on the “Save” button on the top right corner.
![](https://snag.gy/wxpL9S.jpg)
Once you “Save”, the custom field will be added to the list of selected fields.
![](https://snag.gy/3B4D2N.jpg)
Now you can save and run the report.
![](https://snag.gy/Ym6tjq.jpg)
A restriction to keep in mind with custom fields, you can use data fields only within the same table to create a custom field. You cannot combine data fields from different tables.