Change aging captions

This requires ForNAV Customizable Report Pack version or later.

Sometimes, it might be necessary to change the captions of the aging buckets in the ForNAV Customer Statement and Aged Accounts reports. These captions are dynamically generated depending on the date range that is specified in the reports. However, the text parts of these captions can be translated with the ForNAV Language tool.

These captions are related to the Not Due, Before, Days, and More Than fields in the ForNAV Aging Buffer table. However, because these captions are generated in the ForNAV code, they cannot be changed through the ForNAV language directly. We need to replace the texts with JavaScript.

They can be translated with the following settings:

After this is set, you need to replace the autogenerated text in the captions. Because the captions are generated when the aging is calculated, you need to find and replace the text in the actual captions. The first step is to load the ForNAV Captions table in the report. You do that with a Record. Open the report properties and find the records. Then add table 6189371, ForNAV Captions.

After you have added the record, you can find and replace the text with JavaScript. Open the source expression for the relevant text box and add the JavaScript to replace a part of a string with another string. Here is an example for Caption5:

AgingBuffer.Caption5.replace(AgingBuffer.FieldCaptions.Before, ForNAVCaptions.FieldCaptions.Before)


After you have done this, the result will be the following: