on 09-18-2008 10:24 PM
Hi All,
I'm new to Crystal but I have to fairly complex reports that require me to know the user's ID from within SQL for security reasons.
My reports are to be run from within InfoView. Both reports run as subreports of a single report which allows the user to enter full/partial values into any of 9 different prompts. This then generates a dynamic SQL statement which returns records meeting the users criteria.
The two subreports (on which security is required) are on-demand subreports which run off of the resulting row of the top-level report by passing a parameter, called material_id, from the top-level report to the subreport.
If possible, I need to also pass the CurrentCEUserName value along with the material_id parameter passed into the subreport.
I cannot use row by row security to display or not display a row (or rows) as the table relating the user id to what rows to display are held within the database as another table.
I talked with a corporate BO guy and he told me to build a universe to handle this but it's late in the process and I don't know if I can get more IT support to build a universe (or buisness view)
If possible, could I get very specific instructions on how to get the value for CurrentCEUserName and pass it into a variable within SQL?
All help is appreciated,
Thanks
Phil
Thanks for your response Raghavendra.
Because I need security for both report levels (main report and subreports), I'm thinking that I have to prompt the user for their User Id then verify it and then pass the parameter to the subreport.
I will still use your response as I have other reports to run requiring security only at the subreport level.
Regards,
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Phil,
I think if you want to pass the CEUserName to sql then you must have subreport and create some command level parameters like {?User Name} and create a formula in the main report like
@UserName:
CurrentCEUserName
Now right click on subreport and go to subreport links and add this formula to link with sub report parameter ({?UserName}) which will pass the username to your command and get the related output in subreport.
Hope this Helps!
Raghavendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Insert your report which was created using stored procedure and insert this report as a subreport in another new report and in the main report create a formula like this
CurrentCEUserName
Now right click on the subreport and go to change subreport links and add this formua from main report and link it with subreport stored procedure parameter.
Hope this helps!
Raghavendra
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.