i have created the report using the adventureworks2012 database to display the reports of the parameters of product name, product category and product subcategory
using the following steps
main query
SELECT DISTINCT P.Name AS PName, PSC.Name AS PSCName, PC.Name AS PCName
FROM Production.Product AS P
INNER JOIN Production.ProductSubcategory AS PSC
ON P.ProductSubcategoryID=PSC.ProductSubcategoryID
INNER JOIN Production.ProductCategory AS PC
ON PC.ProductCategoryID=PSC.ProductCategoryID
WHERE PC.Name IN (@PCName) AND PSC.Name IN (@PSCName)
and parameter query one of categoryname
SELECT DISTINCT Name AS CategoryName
FROM Production.ProductCategory
and second query of subcategory name
SELECT DISTINCT PSC.Name AS SubCategoryName
FROM Production.ProductSubcategory AS PSC
JOIN Production.ProductCategory AS PC
ON PSC.ProductCategoryID=PC.ProductCategoryID
WHERE PC.Name IN (@PCName)
and third query of product name
SELECT DISTINCT P.Name as ProductName
FROM Production.Product AS P
INNER JOIN Production.ProductSubcategory AS PSC
ON P.ProductSubcategoryID=PSC.ProductSubcategoryID
INNER JOIN Production.ProductCategory AS PC
ON PC.ProductCategoryID=P.ProductSubcategoryID
WHERE PC.Name IN (@PCName) AND PSC.Name IN (@PSCName) AND P.Name IN (@PName)
and after giving the values in the parameter properties
it is showing the following error
an error occurred during local report processing, the definition of the report parameters is in valid
the report parameter PName has a default value or a valid name that depends on the report parameter "PName".forward dependencies are not valid.
anyone help me with the error
thanks you
harish