Tuesday, March 06, 2007

This report requires a default or user-defined value for the report parameter

I just spent couple of hours fighting "This report requires a default or user-defined value for the report parameter" error.
Report worked fine in report designer, but refused to properly render in serverReport.Render(...) method.

I tried Google Search and all voodoo magic, including:
- Renaming my parameter;
- Set default value for my parameter;
- Restarting VS.NET;
- Re-creating my report from scratch.
Nothing helped.
I even though about manual rebuilding OLAP cube in Analysis Server ...

But then I simply changed "Available values" [for my parameter] from "From query" to "Non-queried".

That helped.

Enjoy!
:-)


Keywords: VS 2005, VS2005, Visual Studio .NET 2005, OLAP, Microsoft Reporting Services, Microsoft Analysis Services, Microsoft SQL Server 2005, C#, VB.NET.

5 comments:

Anonymous said...

I have the same issue as you, but my available values are intended to come from a query. I have another report which has the same parameter but is works fine.

Any idea?
ppstay@hotmail.com

Dennis Gorelik said...

The idea is to drop OLAP Cube and use regular SQL.

Drewberry said...

I made a LINK to my report and set that parameter like you suggested! Fixed a problem I had since 3 days!!! Much Thanks.

FredZ said...

This can be caused by SSRS failing to validate the supplied parameter values against it's valid values. In the case of an OLAP report, the supplied values may need to be in MDX format and NOT the displayed (label) value you see in the report drop down. If you want to know the valid values, check the return object from the SetExecutionParameters in debug mode.

execInfo = rs.SetExecutionParameters(parameters, "en-us");

Drill into the paramaters and you will find ValidParameters.

Anonymous said...

just to add 2 cents, I had same issue with query base parameters for the report and in my case, the parameters are referential and thus when one is selected, others are filtered. To make a long story short, the parameters I was passing in did not match the filtering criteria (i.e. in my report I have 2 dropdowns, if dropdown1 had a,b and c as options dropdown2's options change based upon dropdown1's selected item. So if dropdown1 had "a" selected then dropdown2 would display 2,4,6. If dropdown1 had "b" selected then dropdown2 would display 1,3,5. My error was caused by trying to pass in dropdown1 = "a", dropdown2 = "1"...they don't mesh based on filtering criteria.
HTH
Dave

Followers

About Me

My Photo
Email me: blogger at dennisgorelik.com