SSRS 2008: error message saying my parameter doesn't exist but it clearly does?

江枫思渺然 提交于 2019-12-03 04:22:41

I found in my situation that it was actually the parameters name casing was slightly changed and it was throwing this same error.

I had to change the name to the correct casing, and then search in the code behind to anything that refers to that parameter and correct its casing. Deployed fine after that.

charles

Try changing the order of the parameters using the up/down arrows.

They should appear in the order of dependence.

Re-ordering the report parameters based on their dependency fixed the issue for me. I had the report parameter at the bottom of the list but the one above it was dependent on this bottom one. So when you are creating / re-creating the report parameter make sure the order is right.

Had the same problem. Check the Parameters tab of the Dataset Properties and click the expression (fx) button. The parameters don't seem to refresh automatically here, one of my parameters still had uppercase instead of lowercase spelling

This could mostly be due to the parameter name not being updated in the dataset.

This article helped me resolve it

When editing Parameters (names or case) for a Dataset within SSRS you may encouter the previous error message when you preview the report. While on the surface it may appear that the parameter has the same case in the Parameter settings and the Dataset query – there is another place where a change is required.

  1. Open the Dataset properties for the Dataset (s) that use the Parameter in the error message.
  2. Select the Parameters property in the left list pane.
  3. Click the Expression Editor button for the specified Parameter.

  1. Here you will notice that the Expression is underlined in red. This is where you will need to correct the case of the Parameter name.

The problem also occurs if you reference a parameter "too early", e.g. from within an overriden OnInit. In that case it's not possible anymore to use a dataset for the available values nor for the default values of any parameter, even if the dataset itself is unrelated to the parameter in question.

I made a new report and copied the code over to the new report and saved it. It works perfectly now in that new report... I deleted the old one and renamed the new one, deployed to server and it everything is good. I wish I would have thought of this a lot sooner. SSRS is so funny, I don't even know what was actually causing the problem now, though...

any ideas on that?

(I had restarted SSRS a few times, restarted my computer a few times, deleted the .data files, deleted the copy off the server even though this was happening on my computer just to be safe... during all of this, btw)

I experienced similar problems with SSRS. The code was correct, the SQL parameters correct but the report was throwing parameter errors. I was using a Shared Dataset. I copied the same SQL to an Embedded Data Set and the report worked perfectly. So, I agree that the SSRS software has bugs that cause strange behavior.

I also had this issue, following the all the answers above deinetely helped.

The tricky one with mine is that the dataset was an SSAS dataset therefore it was hidden. I had to search the code for the parameter to see where it was used and thats where I found it.

To view hidden datasets right click the Datasets folder in the Report Data tab and tick the 'Show Hidden Datasets' box.

Happened to me too

There was one Parameters depending on another one

But the order of the depending one was on top

Used the arrows to move the calculated parameter to the end of all parameters.

For me, I had to open rdl file and add my new parameter to the order/position(xml nodes) I want.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!