Define Query Parameters dialogue box while creating a report using Report Wizard

I came across this scenario multiple times while creating a Report using the Report Wizard in Sql Server Business Intelligence Development Studio.  While creating report using the wizard, first we set the Data Source. Our next step is to write/paste the query that we need for the report, On clicking next this pop up occurs.

Now most of the times, we would have declared the variables correctly and would have also set values for it but it still shows this dialog box which can be quizzing.

If you click OK here then you get this error.

If you click Cancel, it allows you to move further but then you won’t find any columns to select.

Now, the reason for this pop-up is that report wizard has encountered a parameter which it thinks was not defined properly. Lets take a look at the query.

If you check carefully we can see that the parameter that I defined here is @param , but the parameter which is shown in pop-up is @Param. Yes it’s Upper Case what is the difference. I have used @Param instead of @param in the query after declaring the variable as @param. Matching the parameters with same case will make this pop-up to vanish

Now this is the outcome of a very normal developer error the classic example of ctrl-c \ctrl-v problem.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s