web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Company Address in SSRS reports

(0) ShareShare
ReportReport
Posted on by 1,270

Hi All,

  When generating reports such as a PO or sales invoice the company details seems to be coming from the primary address listed in the legal entity I'm logged in with.  I thought I heard someone say recently that in some or all cases the site information would override this if it was available (which is what we want).  I've has a few goes at this but the legal entity details still keep coming up.  The  code in the insetIntoSalesInvoiceHeaderFootertmp looked like it was searching a few different areas for the address but I'm still new to this and couldn't be sure.

  Can anyone confirm or deny if the site address / phone / fax / email details should be overriding the company details if available or does this some code to get the address of the branch?

Thanks,

David

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    dolee Profile Picture
    11,279 on at

    Hi David,

    I take a look at the insertIntoSalesInvoiceHeaderFooterTmp method. The version I am on is AX2012 R2 and the company address / phone / fax are all directly taken from CompanyInfo without any conditional statements.

    I recommend writing a post-event handler to get the logic you want. =]

    Cheers

  • David Rose Profile Picture
    1,270 on at

    Thanks Dolee,

     I should have said I'm on AX 2012 (not R2).  I see the following code in the iinsertIntoSalesInvoiceHeaderFooterTmp.

       salesInvoiceHeaderFooterTmp.CompanyName = companyInfo.name();

       salesInvoiceHeaderFooterTmp.CompanyTeleFax = companyInfo.teleFax();

       salesInvoiceHeaderFooterTmp.CompanyAddress = companyInfo.postalAddress().Address;

    Name comes straight from the field (which is fine).  The postal address has logic behind it in the postalAddress() method.  Is this the same as you?  I'll look into post-event handlers.

    Cheers

  • Verified answer
    dolee Profile Picture
    11,279 on at

    Hi David,

    Yes, they are the same. In companyInfo.postalAddress method it is a one-liner:

    return DirParty::primaryPostalAddress(this.RecId);

    and in the primaryPostalAddress method it is a straight forward X++ select.

    So it doesn't look like it's doing anything other than digging up the primary company address.

    Cheers

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans