How to pass the login user as parameter to Stored Procedure
To pass the login user to a stored procedure in the Bold Reports® Standalone Report Designer, set the stored procedure parameter to the =User.UserID expression. The stored procedure then returns the data for that user. Follow these steps:
-
Create a dataset using the stored procedure, which having a UserID as parameter from
Datasetdialog box. -
Select the dataset from
Datapanel and click the highlighted icon to open context menu with list of options. SelectParameters...option in the menu to openParametersdialog box as shown in the following image.
-
Now, click the highlighted square icon of
UserIdparameter to open context menu with two options and selectExpression...to openExpressiondialog box as shown in the following image.
-
Then, select
Useroption underBuilt-in-Fieldsfrom the highlightedOptionscombo box as shown in the following image.
-
Select
UserIDand double click it to setUserIDvalue as shown in the following image.