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...
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...
No comments:
Post a Comment