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 :
Dynamics 365 Community / Forums / Finance forum / Current user in SSRS R...
Finance forum

Current user in SSRS Report

(0) ShareShare
ReportReport
Posted on by

Hello experts,

I am new to this so I need a little help. I want to show current user Id or Name in a SSRS report in D365. I tried this expression: "=User!UserID" but it gives me this result "NT AUTHORITY\NETWORK SERVICE". I know this worked in AX 2012 R3. I would appreciate any help or guidance.

Thanks

  • Verified answer
    André Arnaud de Calavon Profile Picture
    307,149 Super User 2026 Season 2 on at

    Hi add,

    Did you actually fetch a correct record from the "User" datasource? What exact table is used for the "User" variable?

  • add Profile Picture
    on at

    Hi André,

    I use the "Built-in Fields":  Built-in Fields -> Item -> UserID, in the report design.

    Can't I use it as it is or I have to connect it to some data source?

  • André Arnaud de Calavon Profile Picture
    307,149 Super User 2026 Season 2 on at

    Hi add,

    I'm not familiar with SSRS reports, but know about where to find the data in Dynamics AX. So, I was trying to help from my areas of knowledge.

  • Verified answer
    venkatesh vadlamani Profile Picture
    3,180 on at

    Network service is the user which is used for ssrs service.

    Its better you add addtional column in you report temporary table.

    Fill it using CurUsr() function in you dataprovider class and use this in your report design

  • Verified answer
    add Profile Picture
    on at

    Hi venkatesh,

    My report has a query based data set but I think I did it. What I did is create a new query with a new view as data source. In the view I created a display method. Then I created new data set for the report with data source the new query. Then I load the data returned from the method as a normal field in the expression. I am not sure if it's the best way but it works.

    This is my method:

       public display UserName userNameDisplay()

       {

           return DirPersonuser::userId2Name(curUserId());

       }

    Thank you all for the help.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans