display company informaton on a report

I want to display company information on my report i used following code under Gen. Journal Line

CompanyInfo.GET;

IF RespCenter.GET(“Responsibility Center”) THEN BEGIN
FormatAddr.RespCenter(CompanyAddr,RespCenter);
CompanyInfo.“Phone No.” := RespCenter.“Phone No.”;
CompanyInfo.“Fax No.” := RespCenter.“Fax No.”;
END ELSE BEGIN
FormatAddr.Company(CompanyAddr,CompanyInfo);
END;

but it says array must be same dimension, what is this problem is. i have following data items

Gen. Journal Line and Vendor Ledger Entry .

You have to check the length of the variable CompanyAddr. Not the length of the text strings, but the length of the array. Click on the property called Dimension for this variable. It must be 8 (depending on version and if your version has been customized).

Hi NS,

Are you not getting the error related to “Responsiblity Centre” now, as you mentioned in your other post?

And for resolving the dimension related error, as Erik mentioned check in the Global Variable, for CompanyAddr and then press Shift+F4 and make sure the dimension is 8.

Hi Erik and Dhan,

I’m really confusing with this, now i’m not getting error regarding array. But still I’m getting error regarding "responsibility center and following error near to the company(CompanyAddr,CompanyInfo);

error is "there must be a ‘[’ because the variable is an array.

Much appreciate if any one help me to solve this problem as I’m really struggling with this.

thanks.

Did you read the replies to your query in the following post?

http://dynamicsuser.net/forums/t/29354.aspx

yes

And? Did it help you solve your problem? If yes, then please very the correct answer, otherwise please let’s know what you need to solve it.

Hi Erik,

As Dhan suggested I used only following code

CompanyInfo.GET;

CompanyInfo.CALCFIELDS(Picture);

But I need to display company information such as Name,Address,Telephone no. Not the company logo. But at the moment it displays only Gen. Journal Line and Vendor Ledger Entry details.

Thanks.