Thursday, February 9, 2012

SQL Server Reporting Services error: The report parameter has a DefaultValue or a ValidValue that depends on the report parameter . Forward dependencies are not valid.

For an application we are using SQL Server Reporting Services. However we had issues with one report. In this report, we have 2 parameters, e.g. OrderId & CustomerId. The value for CustomerId is calculated by executing a first query using the OrderId parameter. This is something that can be done easily in reporting services. However after configuring the parameters, compilation failed with the following error message:

[rsInvalidReportParameterDependency] The report parameter ‘CustomerId’ has a DefaultValue or a ValidValue that depends on the report parameter “OrderId”. Forward dependencies are not valid.

 

Build complete -- 1 errors, 0 warnings

It sounds like a parameter can not depend on another parameter but why did they provided this functionality? Obviously there must be something else that we did wrong.

After trying almost everything you could imagine, we finally discovered that the order of the parameters are wrong. In the parameters list of your SQL Server Report it is important that you place the parameters in the correct order(!).

So after putting the OrderId first and the CustomerId second, everything worked…Verwarde emoticon

4 comments:

Anonymous said...

I didn't even realize you could reorder the parameters. Saved the day for me! THANK YOU!

Anonymous said...

me too! saved me a lot of time! A big Thank You!

Anonymous said...

Great!
I still can't believe how stupid it could sound, but it worked. Thank you for your help,

Luiz Oliveira said...

Very Good!!!!
SAVED