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…