You can customize the layout of your ARW data by joining two similar fields into one. For example, rather than having separate columns for Salesperson Code and Salesperson Name, you can combine them into one column "01: John Smith", which gives you a more readable report.
Although you perform this customization using calculated fields, no actual calculations are performed. This customization is for layout only.
- Create a report with two types of data that you would like to join, such as Salesperson Code and Salesperson Name. For example, Sample ARW: Simple customer YTD Sales Report.
- In this report, notice how far apart the Salesperson Code and the Salesperson Name fields are. In this procedure, you will join those fields separated by a colon.
- Click Edit, and then click the Layout tab.
- In the upper-left panel, expand Fields.
- Right-click Calculated, and then click Add.
- Set the properties of that field, including name, type, and formula.
- For best practice, name your new field so you can easily identify it later. At the bottom of the Report Layout in the Designer section, under Design, set the Name property. For example. SalesNameCode.
- Under Misc, set the Field Type property to String. Other Field Types
- String: used to concatenate multiple fields. Can also be used to add a value to a field. For example, adding a prefix to item numbers or combining the Product and Description fields.
- Int32 (Integer): whole numbers only.
- Float: less precise decimal value.
- Double: numbers with decimal values.
- Boolean: true or false only. Typically used to indicate if the value in one field is equal to the value in another field.
- In the Formula value, type the data fields that you want to join into one column, separated by +. Note that you can add any additional alphanumeric characters you want, as long as they are surrounded by quotes.
- Delete the txtCustomer_Salescode and the txtCustomer_Salesperson fields from the GroupHeader in your Layout section. On the confimation messages that appear, click OK.
- Click and drag the field you just created SalesNameCode into the GroupHeader section of your report. Make sure you click and drag to extend the size of the field to fit all of the data.
- You may also use the toolbar to change the font color and layout to help it stand out.
- To see the results, click Run Preview.
Bound fields are those that you have added to the report directly. Calculated fields are those based on the comparison of two or more existing bound fields.
A new calculated field, Field1 appears.
For example, the following formula
CUSTOMER_SalespersonCode+CUSTOMER_SalespersonNameWill appear as
With no spaces or formatting between the code and name. For readability, you can add a colon and space to separate them by adding
+ ": "
Giving you the formula
CUSTOMER_SalespersonCode + ": " + CUSTOMER_SalespersonName
If you do not know the exact name of the fields that you want to use in your string, click the field in the report, and then right-click to copy the name from the DataField property. Click your new calculated field again, and paste the name into your Formula.