I'm building an SSRS report using visual studio 2008 in a SQL 2008 environment. The report uses the following parameters: EmployeeID, Payroll Date and an employee PIN. The dataset for the main report returns a list of active employee IDs and their associated pins. It calls a sub report that displays clock in / clock out and work transaction data for the selected employee ID. I need to hide the subreport if the pin entered does not match the pin on file for the employee ID selected from the dropdown.
The problem I'm encountering is that the expression for the visibility property of the sub report is comparing the entered pin parameter to only the 'First' record from the employee list dataset rather than that of the record for the 'selected 'employee ID. If the pin for the 'first' record is entered subreport will display the correct results for the selected employee.
Here is the text of the expression:
=Parameters!Pin.Value <> First(Fields!Pin.Value, "EmployeeSelect")
If I remove the 'first' from the expression I end up with this error:
"The Visibility.Hidden expression for the subreport myreportname contains an error: [BC30198] ')' expected."
This seems like it shouldn't be that difficult but obviously what I am doing is wrong. I don't know how to make it compare against the selected employees pin instead of the first employees pin. Can anyone offer some direction on how to accomplish this? Thanks in advance!