Skip to Content
0
Former Member
Mar 15, 2010 at 01:36 PM

CR 2008 Get logged in user ID

18 Views

Hi all,

I am working on a CR 2008 report that connects to a SQL Server 2008 database.

The data on the report is retrieved using a stored procedure that takes the NT user ID as a parameter to get the correct results.

As the SQL Server connection uses a generic user, I need Crystal Reports to retrieve at run time the currently logged in user that's executing the report in CR Viewer to pass it to the stored procedure.

Is there any way to accomplish this? I've seen some UFL's that do that, but if I use them, when opening the report in viewer it crashes saying it can not correctly compile the function (but it works if I open the report in CR 2008 Developer).

Anyone can please help me?

Thanks!

Jordi.