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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Cross-company queries where linked table records are in different companies

(0) ShareShare
ReportReport
Posted on by 282
Hi all
Running AX 2012 R3 CU9. Couldn't find any documentation on this subject
This is my situation:
Our AX environment has two legal entities - I'll call them LEA and LEB for this example.

We often create purchase orders in LEA which automatically create sales orders in LEB. In order to report on this, we've been using an external database connection to our SQL Server - however I'm trying to consolidate this report onto an AX SSRS report.
Created an example cross-company query. I can be in LEA and run an SSRS report which uses this query, and return SalesTable and SalesLine records in LEB.
However, when I try to link with PurchLine (PurchLine.PurchId == SalesLine.PurchOrderFormNum) (PurchLine.LineNumber == SalesLine.LineNum) - it doesn't return any values. To repeat, this link definitely works both in external databases, and in the SQL Server instance on the server running the SQL service for the environment.

When I change the query link to OuterJoin, it still returns all the SalesLine records as expected, but with no PurchLine attached. From this I've taken to mean that it can't see the associated record even though it's there in the other company. I've also tried running this from both companies with the same results.
Is this a known issue, and is there a workaround? Or am I missing something?
Thanks very much in advance for your help
Cheers
Luke

*This post is locked for comments

I have the same question (0)
  • lukbel Profile Picture
    282 on at
    RE: Cross-company queries where linked table records are in different companies

    Hi Crispin

    Is this the official workaround? I'm still confused as to what causes the method I described to not work in this fairly common use case

    Also, if this is legitimately the only way I may need some more info - what do you mean by "takes ranges (instead of join)". A range filters a recordset and a join links two recordsets together, right?

    Why do temptables work but not, for example, a view?

    I only ask because, while it's solely for an SSRS report now, it's expected in the next year we'll need it to feed Enterprise Portal reports. If you're describing an RDP-type solution, this may not be suited for that.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#1
Community Member Profile Picture

Community Member 4

#3
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans