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

Pull the username and print it on a report as a signature...

Status
Not open for further replies.

bessebo

IS-IT--Management
Jan 19, 2001
766
US
We currently use Crystal Enterprise 9 and we print certificates that are sent to our customers using Crystal Enteprise. The document is simply a report that I developed using Crystal Reports 9. We have had to modify this certificate and now it will require a number of signatures on the document before we ship them with our product to the customer.
So I would like to be able to pull the account name and specifically their full name as seen in Manage Users and have that Full name probably print out in italics at the bottom of each certificate (e.g. an electronic signature).
I understand that this account name and full name is in a local group on the Crystal Enterprise server called Crystal NT Users. Has anyone out there been able to get this fullname or even the account name (which is essentially the NT username) onto a report? Any help would be appreciated.
 
k-,
I don't think this will work for us because I think what it is pulling is the username tied to the report for accessing the database, not the Crystal Enterprise user. Therefore, it always will put 'sa' in the field for all users. I need the Crystal Enterprise username which, in our case since we are using NT Authentication, should pull the network logon. This is what I need.

Thanks...
 
From what I can tell, the full name is not available, but with csp you can get the account and description with...

iStore.EnterpriseSession.UserInfo.UserName

iStore.EnterpriseSession.UserInfo.UserDesc
 
I have never done anything with csp pages so I would not even know where to start as far as getting those variables onto a specific report. Any help on that one. Maybe steering me in the right direction?
 
In v10/XI it is built in, so one option is to upgrade.

In v9 - as mdwyer said - You would need to code a custom csp page to pass this information in via a parameter on the report (or you could let them type it in, but then they could enter anything!).

There are many csp samples on the BusinessObjects web site, and the CE SDK help file is on the CD.

Also, you should not use 'sa' as you database login. :)

Kingfisher [CECP]
 
I am thinking that I may be able to do this another way. Since this report utilizes a SQLServer stored procedure I may be able to grab the NT username from within SQLServer and pass it to the report. Since I can code in Transact-SQL and have never done anything with cspo pages I am hoping that I can do this. I will have to research this option. Thanks for your help.
 
Hi Bessebo,

I don't think that this will work either - it may depend on how you have set Crystal Enterprise up - but I think that when CE runs reports it uses its own NT Account to access the database/run sps etc, not the user logged in. I think you'll just get this same account name everytime you run the report. I think mdwyers suggestion is the only one that will work.

I know this has caused confusion before when reports seem to run fine in Crystal Reports (uses your own NT account) - but fails in Enterprise (uses Enterprises NT Account).

mrees
 
Yeah, you are correct. I tried playing with modifying CSP pages yesterday. Now I have to figure out how to pass a variable (the username) that I get from a CSP page into a specific report. If there is the concept of global variables once I gather the username maybe Crystal Reports will be able to see it. Any help on this? I pass parameters from stored procedures all the time but this is a bit different.
 
Hi,
I use CE 10, Oracle and I have a similar issue.
I have scheduled a report to run and print on different users' printers. My name appears as user name on all instances, but I want to have that specific user name printed on the report. Is it possible to do this and how?

Thank you for any help.

Dana
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top