I have a Crystal Report that calculates staff hours with two parameters - Username and period so it brings back hours for a specific period.
I am quite happy for the user to select the appropriate period.
However, I do not want them to be able to enter another user as they could look at data that they should not.
It works perfectly if I put in 'senglish' as the username but what I want to do is use CE User Name (the logged in user) to drive the stored procedure and hence the report.
I realise that you may suggest to create some sort of temp table and then select 'where user = username' but it in itself would not be easy because we are doing a recursive loop with the stored procedure to get not only the people who directly report to the manager but the people who report to them and so one.
Can anyone tell me how I might use CE User Name as a parameter for a stored procedure please?
Thanks
Stephen
I am quite happy for the user to select the appropriate period.
However, I do not want them to be able to enter another user as they could look at data that they should not.
It works perfectly if I put in 'senglish' as the username but what I want to do is use CE User Name (the logged in user) to drive the stored procedure and hence the report.
I realise that you may suggest to create some sort of temp table and then select 'where user = username' but it in itself would not be easy because we are doing a recursive loop with the stored procedure to get not only the people who directly report to the manager but the people who report to them and so one.
Can anyone tell me how I might use CE User Name as a parameter for a stored procedure please?
Thanks
Stephen