Monday, October 20, 2008

Displaying Report Generated User at the Report Footer only with User Name

Displaying Report Generating user name without Domian or System name:

Hope we guys know the usual way to display Report Generating User, using the Expression:

="Report Generated by : " & User!UserID

which will display as:

Eg.  Report Generated by : MSSOL\ssrsuser1 


MSSOL is Domain/System Name

ssrsuser1 is Domain User

if we want to display only the User Name excluding Domain name/ System name

The following Expression would really helps:

="Report Generated by : " & User!UserID.Substring(User!UserID.LastIndexOf("\")+1)

which will display as:

Eg. Report Generated by : ssrsuser1

Thats it... no system name/Domain name.. only UserName 

SSRS Expression.... Always Rocks!!!!!...



No comments: