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

Announcements

No record found.

News and Announcements icon
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,363 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 545 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 408

#3
Adis Profile Picture

Adis 267 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans