Forward dependencies are not valid in SSRS
Asked Answered
R

7

51

I got a problem while creating a report in SSRS.

The ERROR shows:

Error 1 [rsInvalidReportParameterDependency] The report parameter ‘COUNTRY’ has a DefaultValue or a ValidValue that depends on the report parameter “COUNTRY”. Forward dependencies are not valid. C:\Users\wiksat\Desktop\New Folder\New folder\Visual Studio 2008\Projects\Report Project2\Report Project2\matrix_cascading.rdl 0 0

What I am suppose to do now? Any suggestions?

Ranged answered 22/10, 2010 at 7:32 Comment(0)
F
104

The other reason you will see this error is if you have the order of report-wide parameters incorrect. For instance if you have the following:

@Param1
@Param2
@Param3

and you are trying to use @Param3 in a query populating @Param1, it will throw this error. You need to use the up/down arrows at the top of the report designer to order the parameters appropriately.

Frankpledge answered 7/8, 2013 at 21:0 Comment(1)
Explanation: Reporting Services first performs the queries in the same order as the Parameters have been set. Therefor, if the dataset of a given parameter needs the value of a second parameter, you need to make sure that this second parameter is standing above the first parameter in the parameter list.Bollinger
T
19

I had the same problem and found by moving the parameter up in the report parameters window, the error disappeared and report displayed.

Tripe answered 13/11, 2013 at 14:28 Comment(2)
This worked for me when implementing a single dropdown that was driven off of a passed in value from my code. I had added the dropdown and dataset first then added the parameter. This ordering added the passed in parameter (param1) AFTER the the parameter that required it (param2). Moving param1 before param2 fixed the error.Downe
To move the report parameter higher on the list, select it and then use CTRL + up-arrowLazos
I
13

Seems like you've somehow set up a report parameter that's referring to itself, in other words "cascading parameters" with just one parameter. That's not going to work.

To show a list of countries, the dataset for your report would be something like:

select CountryID, CountryName from Country

CountryID would be the Value field and CountryName the Label field for your parameter's Available Values.

In case you're interested in cascading parameters: http://msdn.microsoft.com/en-us/library/aa337169.aspx

Ingleside answered 13/5, 2011 at 5:55 Comment(1)
+1. This is especially useful to me because of the link to cascading parameters.Irvin
V
7

I caused the problem by myself - I tried to use same dataset for populating parameter values and this same dataset was used for also query results. Previously it worked fine, but back then I had another dataset for this parameter. In my great wisdom, I decided to remove this "futile" dataset, just to cause a problem. Classic egg or hen problem :)

Valma answered 4/2, 2015 at 7:10 Comment(1)
I had this issue as well, and just to be clear for others, you need two datasets that return the same query, one un-filtered for the parameter source and another filtered by the parameter to use in the report.Leafage
I
4

When you have added default values to the parameter at the Report level and also declared that parameter in the stored procedure which you are using to pull up the data, This error occurs.

Solutions:

  1. Try removing the declared parameter at stored procedure and use Arrow keys at the report to move the parameter up or bottom accordingly

  2. Remove the default values at report level, instead add them in your stored procedure.

Itol answered 15/9, 2015 at 20:57 Comment(0)
A
0

Create a new data source Read the parameter you need for the report, from the new data source

Apeak answered 3/11, 2020 at 15:10 Comment(0)
N
0

You Must make order considering dependency

  1. 1 A Parameter
  2. 2 B Parameter
  3. 3 C Parameter

this mean C depend on B and B depend On A this order must in parameter window, otherwise getting error

Nucleo answered 31/3, 2021 at 7:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.