Exception:
Error    1    [rsInvalidReportParameterDependency]  The report parameter ‘productModelID’ has a DefaultValue or a ValidValue that depends on the report parameter “productModelID”. Forward dependencies are not valid.    C:\Projects\Temp\Report Project1\Report Project1\Products.rdl    0    0   

This error occurs, because I used the same dataset for the report table and filling of the parameter values

Solution
Create 2 datasets

— Dataset 1
select
   
p.*
from
   
Production.Product p
where
   
isnull(@productModelID, p.ProductModelID) = p.ProductModelID order by p.ProductID

— Dataset 2
select
   
pm.ProductModelID, pm.Name
from
   
Production.ProductModel pm
union select null as ‘ProductModelID’,‘[All models]’ as ‘Name’

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.