Documentation about FORMATADDR function

Hello to all,

I’m working with de R206 Sales-Invoice Report. I need to change de address block on the header up-right corner (where Send-To Address) is displayed, and show the general address set of the Customer register.

I’ve seen that in all reports it’s used the FORMATADDR function that fills an 8 dimension text array. But I have no idea on what parametres this function is specting and how can I tell it what register on what table I want to show.

Can somebody help me? I’m looking for some piece of information about this function, and if posible, get a full range documentation about how the different functions in the codeunit work.

I’m related with SDK’s and that kind of books in other programming languages but in NAV2009 I’m lost.

I’ll be pleased.

(I’m studying English, so if I have commited any error I’ll be pleased too of being fixed).


You won’t find any real documentation. Look at the Format Address codeunit. You’ll see different functions for various types of addresses (Customer, Vendor, Responsibility Center, etc). Each function takes in an empty array and the appropriate record variable.

Thanks for your answer Matt,

I’m afraid I haven’t explained well at all. Althogh my company has a developer licence we only can open/edit reports and dataports. Not modules nor codeunits. So I can’t check how that code works.

Do you mean that there is no way to know the parametres needed by a function of the standard?

Thanks again.

If you want to see all of the functions associated with a variable hit F5 when on a code screen. Find the FormatAddr variable on the left and you can see all of the functions and the parameters they take.

In the C/AL Symbol Menu (F5) tick/select the Paste Argument option. That will copy the list of parameters into you code along with the function.

For example:

FormatAddrCodeunit.Company(CompanyAddr,CompanyInfo) where

CompanyAddr is a text variable array of 8 in the report to hold the formatted address and CompanyInfo is the source variable (tyep Rec).

You must investigate the different options.

The formatting of different adresses is determined in the Countries/Region Table.

Is that OK?

If no documentation can be get, knowing the function parameters is a good clue to guess how the function works. I didn’t realize about that before.

Thanks to both.