Passing CurrentCEUserName value into SQL variable for security reasons
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,