Wednesday, March 21, 2012

Error on one of SQL Reporting Services Samples

Hi there,
I am running the reports that comes with the samples one and I'm getting
this error when I run this code;
="SELECT c.firstname, c.lastname, e.title, d.departmentID " &
"From HumanResources.EmployeeDepartmentHistory D " &
"INNER JOIN HumanResources.Employee E " &
"ON D.EmployeeID = E.EmployeeID " &
"INNER JOIN Person.Contact C " &
"ON E.ContactID = C.ContactID " &
Iif(Parameters!Department.Value = 0, "", "WHERE D.DepartmentID = " &
Parameters!Department.Value) &
"ORDER BY C.LastName"
The error is saying that all those columns can not be bounded. can anybody
tells me where the error is this piece of code?
Thanks very much in advance.
Midway.The IIF in there is for internal RS expressions and not T-SQL. This appears
to have been modified ('). Which report and dataset is this from?
SalesEmps within the Employee Sales Summary report looks similiar:
SELECT E.EmployeeID, C.FirstName + N' ' + C.LastName AS Employee
FROM HumanResources.Employee E INNER JOIN
Sales.SalesPerson SP ON E.EmployeeID = SP.SalesPersonID INNER JOIN
Person.Contact C ON E.ContactID = C.ContactID
ORDER BY C.LastName, C.FirstName
RDA Corp
Business Intelligence Evangelist Leader
www.rdacorp.com
"Midway" wrote:
> Hi there,
> I am running the reports that comes with the samples one and I'm getting
> this error when I run this code;
> ="SELECT c.firstname, c.lastname, e.title, d.departmentID " &
> "From HumanResources.EmployeeDepartmentHistory D " &
> "INNER JOIN HumanResources.Employee E " &
> "ON D.EmployeeID = E.EmployeeID " &
> "INNER JOIN Person.Contact C " &
> "ON E.ContactID = C.ContactID " &
> Iif(Parameters!Department.Value = 0, "", "WHERE D.DepartmentID = " &
> Parameters!Department.Value) &
> "ORDER BY C.LastName"
> The error is saying that all those columns can not be bounded. can anybody
> tells me where the error is this piece of code?
> Thanks very much in advance.
> Midway.

No comments:

Post a Comment