reporting services - Getting windows account username of the client accessing the ssrs report -


is there way windows account username of client accessing ssrs report. if user accessing reports on server b machine how can user's windows username in ssrs report?

i used user!userid , worked fine since running local machine. deployed different server stopped working because valid user!userid not available.

pls. suggest.


my bad. getting username. seems "code" needed execute on server didnt work. added vb.net code under "report properties -> code" tab. works fine on local machine. right clicked , deployed report server. there step needs performed "code" deployed server or executed. simple vb.net function shown below

public shared function getusername(byval input string) string         try             input = input.replace("<domain>\", "")             dim details(2) string             details = input.split(".".tochararray())             input = string.concat(details(1), ", ", details(0))         catch ex exception             return ex.message         end try         return input end function 

update:
seems reason input=input.replace("\","") not working. remaining part of code seems working. code deployed along report. confused why input.replace() working on local machine , not on server.

update: seems domain name getting on local machine in lowercase while 1 on server in uppercase hence replace not functioning. applying tolower() input before replace , working. bad. should have debugged better.

i hope question useful looking windows username in ssrs report.

thanks

if want display name on report use [&userid]


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -