Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing logged-on user name

Status
Not open for further replies.

ryangus

IS-IT--Management
May 19, 2002
14
AU
Is it possible to identify the user logged on to the PC within a Select criteria?

The report is to be deployed via an intranet using IE5/6, but I'm not sure what version of Crystal we have on the server. I want the report to only show data pertaining to that logged on user.

Regards,
Ranga
 
That depends on the database, but the answer is yes.

I use the following to determine the login for SQL Server:

(substring(suser_sname(),(charindex('\',suser_sname()) + 1),25))

This parses out the server name and just returns the user portion.

-k
 
Can this formula be added to a Crystal report? When I copy it to a formaula in my report, it gives an error
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top