如何从 SQL Reporting Services 2008 报告中获取当前用户的全名?
我知道可以从内置变量 User!UserID 中检索用户帐户的名称,但是如何获取用户的完整用户名?
我想可以连接一些 .NET 代码并进行 Active Directory 查找,但是还有其他选择吗?
I know that the name of the user account can be retrieved from the built in variable User!UserID but how can I get the full user name of the user?
I guess it would be possible to hook up some .NET code and do a Active Directory look up but are there any alternatives?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我的一个项目中,我使用 SQL Server 中的一张表来存储来自 Active Directory 的用户数据(“displayName”、“sAMAccountName”、“userPrincipalName”),并使用 C# 应用程序进行数据传输。 该表每晚更新一次,并且在 Active Directory 发生任何可能影响我的项目用户的更改后也会更新。
就我而言(Sharepoint 上托管的 Infopath 表单),我使用 Web 服务从 Sharepoint 获取当前用户的帐户名,以便显示相应的用户全名。
In one of my projects I used a table in SQL Server to store the user data from Active Directory ("displayName", "sAMAccountName", "userPrincipalName"), using a C# application for data transfer. The table was updated nightly and also after any change in Active Directory which could impact my project users.
In my case (Infopath form hosted on Sharepoint) I was using an web service to get the account name of the current user from Sharepoint, in order to display the coresponding user full name.