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 :
Finance | Project Operations, Human Resources, ...
Unanswered

Print SSRS report from another legal entity

(0) ShareShare
ReportReport
Posted on by 260

Hello guys,

I have a weird request where I need to print some SSRS report using data from another legal entity.

Originally, I thought it was easy to do since I just had to use changecompany fetch the data and send args to the report.
It is working, but when the report runs it opens the SSRS report form to print on the other legal entity.

For example:
All my data is on USMF legal entity, and I want to print from CUSTOM legal entity

I created a form on the Custom legal entity where when I click a button it will print a report using data from USMF

It uses changecompany to print from USMF, but the company header changes  

There is any way to not change the company name on the top right corner of dynamics? 
I tried research, refresh and everything but when it prints the report, the value change to USMF and just change back when I manually refresh the form
pastedimage1620131395144v1.png

Thanks,

I have the same question (0)
  • WillWU Profile Picture
    22,361 on at

    Hi bois0155,

    Changecompany() method is used to change current session to specific company.

    Please try the crossCompany key word.

    Just get data like this:

    while select
            crossCompany
                : conCompanies
            * from YourTable
            where YourTable.dataAreaId = 'USMF'
            
    ......        

  • bois0155 Profile Picture
    260 on at

    Thank you for the help Will, but surprisingly the report had a new UserConnection and it was changing the Session. When I removed it the changecompany worked normally without switching the legal entity on the lookup.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans