Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

How to display Company Logo and Company Address in a report.

(0) ShareShare
ReportReport
Posted on by 3,039

Hi

How to display Company Logo and Company Address in a report.

Thanks

*This post is locked for comments

  • Verified answer
    Marcellus Profile Picture
    Marcellus 2,735 on at
    RE: How to display Company Logo and Company Address in a report.

    Hi Jsshivalik,

    As an example please take a look at report 206.

    Company Logo

    You will see in the OnInitReport trigger a case statement where the Company Information is retrieved and the Picture field is calculated. If you would like to display a single image just create a record variable for the Company Information table, GET the company information and calculate the Picture field.

    CompanyInfo.GET;
    CompanyInfo.CALCFIELDS(Picture);


    Add the CompanyInfo.Picture to your dataset

    ImageProp1.png

    In the RDLC layout you can right click the report and click Insert/Image

    InsertImage.png

    Right click the image and choose the image properties

    ImageProp.png

    Select Image Source: Database and select Image/BMP in the use this MIME Type field.

    ImageProp1.png

    Go to the use this field and open the expression with the FX button:

    Enter this code:

    =Convert.ToBase64String(Fields!CompanyInfoPicture.Value)


    Company Address

    In the Sales Invoice report you can find this line of code:

    FormatAddr.Company(CompanyAddr,CompanyInfo);

    This is using the Format Address codeunit 365.

    The method takes the address array and the company information record and it will populate your array with the elements of the address.

    The CompanyAddr is an array declared like this:

    CompanyAddr.png

    The elements of the array are added to the dataset like this:

    CompanyAddrDataset.png

    After this you can select these fields in a textbox or tablix as values.

    I hope this helps.

    I think after this you will be interested in how the Code.GetData and Code.SetData is implemented in these reports as the Company Address lines are displayed in report 206 this way. Please refer to this videoHow Do I: Use SetData and GetData in Microsoft Dynamics NAV 2013 R2


Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,468 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,289 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans