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

User Name capture

Status
Not open for further replies.

Glennski

Programmer
Joined
May 13, 2003
Messages
6
Location
GB
I wish to capture the User Name (login ID for Active portal) and use it for filtering in a report.

Any idea anyone?

Cheers

Glenn



 
There is GetServerUserName() Function available. Do help on Actuate ERDPro you will see an example.
Muthu
 
Muthu,thanks a lot that function did exactly what I asked for. Unfortunately I asked for the wrong thing. What I actually need is access the the roles associated with the logged on user to use in my SQL. This has proved difficult. I have tried to use GetUserACL but have had no success as yet. Any ideas, Glenn
 
Glen,
I saw these statments in ERDPro help. See if this helps


----Override the report component’s GetUserACL( ) method as shown in the following example:
Function GetUserACL( acl AS String ) As String
GetUserACL = Super::GetUserACL( acl )

'Get the list of security IDs fo rthe user
CurrentUserACL = GetUserACL
End Function
Drag a text control and drop it into the page.
Override the text control’s GetText( ) method as shown in the following example:
Function GetText( ) As String
'Displays a list of security IDs for the user
'Uses custom variable CurrentUserACL and
'Overridden GetUserACL in the report component

GetText = GetValue( GetReport( ), "CurrentUserACL" )
End Function


If the report is viewed with secure read privilege, the GetText( ) function returns a list of Security IDs for the current user. If the report is viewed with standard read privilege, the GetText( ) function returns nothing.

Muthu
 
Also look at sample report under Example folder Examples->PageSecurity. Read the readme.txt. This might give you an idea of what you are missing.
Muthu
 
Well
I did do it but in a long drawn out fashion.
Cos I needed the name at execution time GetUser was no good.
Instead I ended up using Java to carry out a SOAP call to the server to get the users roles. This works fine if a little slow.

Thanks for you help

Glenn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top