Collapse

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:

  1. Create a dataset using the stored procedure, which having a UserID as parameter from Dataset dialog box.

  2. Select the dataset from Data panel and click the highlighted icon to open context menu with list of options. Select Parameters... option in the menu to open Parameters dialog box as shown in the following image. Select Parameter

  3. Now, click the highlighted square icon of UserId parameter to open context menu with two options and select Expression... to open Expression dialog box as shown in the following image. Open Expression Dialog

  4. Then, select User option under Built-in-Fields from the highlighted Options combo box as shown in the following image. Select UserID

  5. Select UserID and double click it to set UserID value as shown in the following image. UserID set as the parameter value

See also