How to Force Stored Procedure Execution on Dropdown Change in Bold BI
In Bold BI dashboards, stored procedures may not re-execute when users change a value in a dropdown (combo box). This happens due to caching behavior, causing widgets to display outdated data.
This article explains how to configure your dashboard to force stored procedure execution on every parameter change.
| Section | Summary |
|---|---|
| Problem Statement | Dropdown changes refresh widgets, but stored procedures don’t re-execute; cached/temp data is used. |
| Expected Behaviour | Stored procedures should re-run with updated parameters on each dropdown change. |
| Root Cause | Internal Cache mode reuses results from temporary tables. |
| Solution Overview | Use Dashboard Parameters + Open Query mode, and bind dropdown to parameters. |
Use this approach when:
- You use stored procedures with dynamic filters
- Dropdown changes are not reflecting updated data
- Your dashboard is embedded and requires real-time results
Step-by-Step Solution
Step 1: Create Dashboard Parameters
- In the Bold BI Dashboard Designer, click on the datasource icon.
- Click on Edit to navigate to the Data Source configuration window.
- In the data design section, locate the Parameter icon.
- Create parameters, for example:
- UserID (Used to pass user-specific or dynamic values to the stored procedure.)
- ProjectID (Used to control filtering through the Combo Box widget.)
- Enable Set First Value (recommended for initial execution).
- Save and Update.
Step 2: Reconnect the Stored Procedure Using Open Query
- Create a new datasource using the same SQL Server connection
- In the data source designer, select Stored Procedure and choose the procedure (e.g., dbo.usp_GetProjectDashboard).
- Drag and drop it onto the designer:
- For each input:
- Set Value Type = Parameter
- Map parameters (UserID, ProjectID) to the procedure inputs
- Set the execution mode to Open Query then click Save
Open Query ensures that the stored procedure executes directly against the database whenever parameter values change, preventing cached results from being reused.
If you encounter an Open Query error:
Server is not configured for DATA ACCESS
Cause: Open Query mode requires SQL Server to allow data access operations.
Solution: Enable data access using the below in your SQL Server Management Studio:
EXEC sp_serveroption
@server = '<your-server-name>',
@optname = 'data access',
@optvalue = 'true';
Example in SSMS:
- After enabling, retry saving the data source.
Step 3: Configure Combo Box Parameter Mapping
- In the dashboard designer, Add a Combo Box widget
- Assign a table-based data source and bind:
- Value: ProjectID
- Display Column (Optional) : ProjectName
- Open Parameter Mapping Configuration from the dashboard designer.
- Select the dashboard parameter (ProjectID).
- Configure mapping:
- Widget: ComboBox1
- Target Column: ProjectID
- Click Update to apply the mapping.
This mapping ensures that the selected dropdown value is passed to the stored procedure parameter during execution.
Step 4: Validate Parameter Mapping
- Ensure:
- UserID → set as a dashboard parameter (default or fixed value for testing)
- ProjectID → controlled via Combo Box
Step 5: Publish and Test
- Publish the dashboard.
- Open the dashboard in the Bold BI server or embedded environment and test.
- Change dropdown values to test.
Configuration Summary
| Scenario | Recommended Approach |
|---|---|
| Passing parameters | Dashboard Parameters |
| Dropdown filtering | Combo Box + Parameter binding |
| Avoid caching | Open Query mode |
| Cross-filter usage | Avoid for Stored Procedure execution |
FAQs
| Question | Answer |
|---|---|
| Is this an expected behavior? | Yes. If Internal Cache mode is enabled, Bold BI may reuse cached data instead of re-running stored procedures. |
| Does Bold BI cache stored procedure results? | Yes. Results can be stored in temporary tables and reused during interactions. |
| How can I force stored procedure re-execution? | Use Dashboard Parameters and switch to Open Query mode. |
| Should I use Dashboard Parameters instead of Cross Filters? | Yes. Parameters provide better control for stored procedure execution. |
| Can caching or temp-table reuse be disabled? | Yes. Using Open Query mode ensures queries execute directly without caching. |