Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Forward dependencies are not valid in SSRS

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?

like image 805
satwik Avatar asked Oct 22 '10 07:10

satwik


5 Answers

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.

like image 129
Brendan Hannemann Avatar answered Nov 02 '22 10:11

Brendan Hannemann


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

like image 43
Benno Avatar answered Nov 02 '22 09:11

Benno


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

like image 12
Valentino Vranken Avatar answered Nov 02 '22 09:11

Valentino Vranken


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 :)

like image 6
RonVibbentrop Avatar answered Nov 02 '22 11:11

RonVibbentrop


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.

like image 4
Sri Harsha Avatar answered Nov 02 '22 10:11

Sri Harsha