Anyone who has tried to add a global field (such as company name or companyID) into a function used in a calculated field within report writer for Dynamics (GP), has probably become very frustrated.
For some reason Report writer handles global fields differently. To make matters worse several of these fields are non string values and have integer data types so can not be used within concatenation functions.
Well there is a way round this and it is in essence very simple.
If we take the global field of CompanyID for example. This has a data type of INT5 (integer) and so can not be used in a concatenation in a calculated field. Therefore you need to use the INT_STR function in the calculated field to change its data type to string. However because it is a global field it won’t let you do this.
So to get round this simply create a calculated field with a result type of Integer and insert the global field of companyID. This has effectively created a calculated field with the same value as the global field.
Now because it is a Calculated field Report writer will treat it normally. This means you can now use the INT_STR function but instead of using the global field you use your new calculated field.
This technique will work for all those global fields and will allow you to include them in functions within report writer and with this technique you can add global fields into functions such as STRIP, CAT and INT_STR within Dynamics (GP).
Thanks to Jon Eastman (Touchstone Consultant) who came up with this handy hint.
If you have any questions please contact firstname.lastname@example.org