Last post Jul 04, 2013 12:34 PM by sridhar_rs
Jul 03, 2013 12:02 PM|johnaspnet|LINK
I have a 2012 asp.net web application and one of an aspx web for page contains an aspx.net report viewer control. That report viewer control will work with remote SQL Server 2012 SSRS reports.
Each user will login the web application and will have a user identity (user name) as .net forms authentication gives to him or her. However, on SSRS reports, the global @UserId parameter is shown with a value that differs from real web user name I expect.
Instead, the value of @UserId is shown as "IIS APPPOOL\<my web application IIS pool name>", and this issue happens regardless of who logs in my web site.
How can I set/code the @UserId parameter from my aspx page code behind so it will show correct user-login names (got from asp.net Forms Authentication Cookie) on SSRS reports?
Thank you in advance.
Jul 03, 2013 02:06 PM|kedarrkulkarni|LINK
the userid from form authentication can be passed to SSRS report as a parameter (like other report parameters)
then, u will have to make changes in SSRS report to use report parameter instead of global parameter for userid field
u can pass parameter to SSRS report through query string... check this
hope this helps...
Jul 04, 2013 08:56 AM|johnaspnet|LINK
Thank you for your reply.
If I pass that userId parameter to ssrs report through query string, then on ssrs rdl reports, then how can such reports consume/extract/parse that passed parameter? Is there built-in function in rdl reports to do query string parse?
Jul 04, 2013 11:52 AM|kedarrkulkarni|LINK
how can such reports consume/extract/parse that passed parameter? Is there built-in function in rdl reports to do query string parse?
once u deploy report to server... and access direct report link via browser, u will see the parameter filter where, u can enter the value and geenrate report....
once u click on generate report button, u can note that it invokes the report by passing filter values in querystring... that means, deployed SSRS reports already manage report parameter via querystring values....
u can pass same querystring key through u r application to pass the parameter values
Jul 04, 2013 12:34 PM|sridhar_rs|LINK
Have a look at this link.
Passing UserId via querystring: