How to get current active user

How to get the current user active?

in my old report i’m getting the current user active like this.

DirPartyName        = HcmWorker::worker2Name(HcmWorker::userId2Worker(curUserId()));


i’m just returning the value.

and now …

Converting in SSRS report.

the is like this…

 tmpWizDevPickList.Name         = HcmWorker::worker2Name(HcmWorker::userId2Worker(curUserId()));

I moved your question from the thread about reporting filtering, because this is clearly a different topic. Please don’t reuse threads for other questions; a single thread should be about a single question and ideally it has a clear answer to that one question. If there were more questions, it wouldn’t be clear which answer belongs to which question and the forum would become less useful.

What kind of problem do you have with your code?

it show’s nothing martin?

That method will only get the current Worker is there is a relation assigned between the User and Worker.

Yes Kristian.

Ex.
I’m using AX and i print my report, in my report it will show the user/person print the report which is me.
I’m the current WORKER/USER.

i know that code is correct or may is not?
but i don’t know why is not showing??

Have you tried breaking it down in a job and checking the results?

ie: return each section of the query to verify

curUserId();
HcmWorker::userId2Worker(curUserId());
HcmWorker::worker2Name(HcmWorker::userId2Worker(curUserId()));