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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print login name on report - currentCE blank? 1

Status
Not open for further replies.

jenlion

IS-IT--Management
Nov 13, 2001
215
0
0
Hi all, I would like to print the DB login name on the report. I expected that CurrentCEUserName would do this, but it's blank. Using CR10 logged in to SQL2K DB. The currentCEUserID is 0.

What do I need to display the user name?

Thanks
 
Hi,
The CurrentCeUserName ( and the ID) are created when the user logs into the CE system to run a published report..

It does not exist when running a .rpt file ( not published)
or when no login is needed to run a published one.

The database login name is not ( as far as I know) available to be shown on the report.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
If SQL Expression fields are available to you, you can create one with text of CURRENT_USER to get the database login name for a SQL Server db.
 
Scratch the above. The text should be SYSTEM_USER instead of CURRENT_USER.
 
Thanks Turkbear, didn't realize I was looking at the wrong field.

Vidru, Awesome! I tried current_user and kept getting dbo but system_user works perfectly. Thanks!!!

Jennifer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top