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

Passing the CE username to a specific report

Status
Not open for further replies.

bessebo

IS-IT--Management
Jan 19, 2001
766
US
I have never developed a custom csp page before but I need to pass the Crystal Enterprise (we use version 9) username to a specific report when a user runs the report. What I am trying to do is have an electronic signature printed on the report in lieu of someone having to repeatedly sign the document. This is a certificate that gets sent to our customers with our product.

This is a parameter that I would like all reports to have access to so I could actually print a username somewhere on any report that we currently have out there.

Would I have to specifically reference the report within the csp page that I want to pass the username to? Would I also have to create a parameter within the Crystal Report?

This sounds like something that someone would've already done out there. Any sample code would be appreciated or some more guidance on what to do here. Any books out there that would help me out that someone could recommend?

Thanks,
Bessebo
 
In v.10 there is a special field called 'Current CE User ID'; is this not available in 9?
 
Are you saying that I would see this field under special fields within Crystal Reports (we use version 9 or Crystal REports also)?
 
Yes, that's what I'm saying, at least for v.10; I have never used it, so can't speak for how well it behaves once published.
 
Can you also pass this parameter to the SQL?

We use a database view to limit the rows returned to the user but we need to reference the userid (that was used to log in to Crystal) in the query's SQL.

We're using CE 10.

Thanks!
 
Looks possible. It is a value listed here:
go to record selection formula editor>functions> document properties>currentceuserid

maybe it will work; who knows :)
 
I don't see that value under formula editor>functions> document properties>currentceuserid
in CR9. I am wondering if I can use CR10 with CE9.
 
rana5, yes you can pass the users login name as a parameter if the report is stored in the enterprise folder in CE10. Once the report is stored in CE10 the current user id and current login name are available. The most useful will be the login name since the user id is an internal number. If you go into a formula or the select criteria and type in:
currentceusername
If this turns blue it is available as a variable. This will contain your NT or AD login name. I am using this as you suggest to restrict data to the logged in user. As you suggest all that is necessary is to link a table in your database that contains this value in a column and pass it as a parameter in your select criteria. If you just save you Crystal 10 report in the file system then the name will not be available since it is stored in CE10.
I evaluated business views and this is much simpler and more flexible to implement. In effect, this gives you security by value or also known as view time security. In my opinion this is a great feature in CE10.
 
cmmrfrds, i'm using CE version 8.5 and SQL Server 2k and wanting to restrict data to the login in user. is it possible to accomplish this in ver 8.5? if so, can you please give me the steps or explanation of how i can accomplish this. your help is greatly appreciated.
 
CRystalVis,

Yes, you can restrict data based on the logged in user. You need to write Processing Extensions and this functionality is available from CE 8.5 onwards.
 
techie2,

thank you for your respond. can you please provide more detail or point me to the documentation that shows how to write Processing Extension. I'm not farmiliar with the web/server site processing. your help/suggestion is much appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top