Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

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

(0) ShareShare
ReportReport
Posted on by 3,027

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans