SSRS Report Parameter Wildcard Search

This SSRS article shows how to create a report parameter and perform a wildcard search to filter the table data with an example.

Right-Click on the Datasets folder to create a new DataSet. The screenshot below shows the data set we use for this Report Parameter wildcards example.

DataSet

The Sql query that we used above SSRS example is:

Right-click on the Parameters folder and choose Add Parameter option to open the following window. Add Product as name and Enter product Name as prompt text.

Create a Parameter

Double-click on the CatDSet (primary dataset) and go to the Filters tab to add a filter. We have chosen Product Name as an expression and Like Operator. Next, click the ƒx button to add a parameter value combined with the * operator on both sides. Here, * acts as the wildcard.

=“*” & Parameters!Product.Value & “*”
Expression for SSRS Report Parameters Wildcard Search

Click Ok to close the Dataset Properties window.

DataSet Filter

And the final report of SSRS Parameter Wildcard Search is.

Table Report

In the report preview, if we type Bike, it returns all the Product name which contains Bike at any position.

SSRS Report Parameters Wildcard Search Preview

When I type Mountain, it returns all the rows whose product name contains Mountain.

SSRS Report Parameters Wildcard Search Preview 2

To get the products that end with Bikes, change the expression as below and type Bikes

=“*” & Parameters!Product.Value

Products Start with Bikes

=Parameters!Product.Value & “*”

If you want to do it at the query level, you can concat the parameter value with the % symbol on both sides. So, create a new report with the below code and design table to see the preview.

SSRS Report Parameters Wildcard Search Query