Presentation of data is really important for reports since it is an effective way to show users key data they will be interested in.
In this demonstration, we will go over a quick NAV 2013 R2 report trick that will display information in a user-friendly manner. If you are going to have a string that will be concatenated, you have the ability to show each value that will be added to the string on new lines by adding a special character in your string. We will be able to replace the special character in Visual Studio by the new line function.
- Define a text variable
- Navigate to the report global variables by going to View > C/AL Globals
- BinRecord will be a text variable that will hold multiple values for the Bin Code field
- Add a special character
- Modify the report
- Navigate to the report layout by going to View > Layout
- Add the BinRecord variable to a textbox in the report layout
- Modify the code to replace the “|” with the new line function “VBCRLF”
- This code change will replace “|” after each Bin Code value with a new line
- Report output
The appearance of the data after the code change presents the data in a way that will be easy to read and understand. Identifying ways to improve the report layout will help users understand the information that will be portrayed to them and make the report look meaningful.