troubleshooting Question

SSRS Pass UserId!UserId as Parameter to Data Set

Avatar of Karl_mark
Karl_mark asked on
3 Comments1 Solution719 ViewsLast Modified:
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?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 3 Comments.
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>


Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 3 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004