SSRS Strip Domain from User!UserID

In SSRS, if you want to be fancy and display the USER NAME in the header or footer of your reports, like what I do.  SSRS uses Domain\UserName format... So someone this morning was asking in the forums about how to strip the domain out.

So I provided two solutions...


="Welcome " & MID(User!UserID,InStr(User!UserID,"\")+1, Len(User!UserID))

="Welcome " & =right(User!UserID, InStr(StrReverse(User!UserID),"\")-1)

Hope that helps someone...

                                           


Comments

  1. Merely wanna state that this is very beneficial , Thanks for taking your time to write this. webflow developers

    ReplyDelete
  2. You might comment on the order system of the blog. You should chat it's splendid. Your blog audit would swell up your visitors. I was very pleased to find this site.I wanted to thank you for this great read!! creative business names

    ReplyDelete

Post a Comment

Popular posts from this blog

Run a VBscript using SQL Server.

Practical Web Scraping with Python: A Clean, Safe Pattern for Pulling Company Names & Emails

SSIS to Sybase OLEDB connection error [IM002]. [Native Code: 30136]