SSRS Pass UserId!UserId as Parameter to Data Set

Evening All! The following is on SSRS 2008.
I have a report set up which currently works by pulling the GUID of a User from our HR application and passes this as a parameter to an SSRS Report. It all works well and the report filters correctly.
However, it is obviously better to not pass the GUID as a parameter (even though the chances of a user figuring out someone else's GUID is minimal) and also using this method requires using a new window in the launching app to pull through the value; pulling the UserId in the report would enable me to place the report link on the main dashboard.

I've read around on Google and clearly the solution is to pass UserId!UserId as the parameter to  the Data sets. The data sets are Stored Procedures which will accept the UserId as a parameter. I've added a Parameter to the report called @UserId and set the default value as =UserId!UserId. The parameter in the data set is set as @UserId. I can't see anything wrong there!

At this point it's worth mentioning that the UserId itself is actually the person's employee number; we have custom authentication so there are no issues with domain names etc. getting in the way. I have tested this by running a report without the paramter but having UserId displayed in a text box and it returns the expected value.

The problem is that when I call the report from our web application I see the following error:

Microsoft.ReportingServices.Diagnostics.Utilities.UnknownReportParameterException: An attempt was made to set a report parameter 'UserID' that is not defined in this report.;

I'm not sure why I am seeing this error. The parameter in the stored procedures is called @GlobalID, but surely that can't be the cause can it? (I can't currently change it anyway as the data source is a database snapshot and for some reason the snapshot update job doesn't seem to be working - have to wait until the dba comes in tomorrow). Is there any other reason why I would get this message?
Karl_markAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sachiekCommented:
This error basically pops up when there is a discrepancy in the parameter being sent from your front end to the parameter defined in the report. Please make sure that you have spelled your parameter correctly and it is exactly as you are passing from the front end.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Karl_markAuthor Commented:
Thanks Sachiek. It is now loading (or trying) to load the report at least!
The problem I'm having is that it doesn't seem to be applying the parameter (if I'm understanding the error correctly). I'm getting an error loading a dataset because of a "divide by zero error".
So, it is accepting UserID as a parameter (it would seem), but not generating any results as this is the same error I would get on the report server if I put in a non-existent UserID.
Is there any way of tracing what parameters are being applied to a report at runtime? The stack trace only tells me the data set name and the error message.
Karl_markAuthor Commented:
The parameter is now being accepted....
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SSRS

From novice to tech pro — start learning today.