0

I have passed one parameter to report server url.

http://<your server>/ReportServer?/<folder>/<reportname>&UserID=Name

How can I read UserID value in report.

Or

How can I print this value in any of the textbox to check what is passed to it?
For example: Above url should show 'Name'.

3 Answers 3

1

Based on your comments I think you've figured this out already, but all you should need is the parameter UserId to exist on the report and it will get its value from the query string.

A couple other problems that can crop up when trying to pass a parameter:

  • Report parameters are case sensitive
  • Report parameters with visibility set to Internal can't be passed a value through URL

See also: Pass a report parameter within a URL on MSDN

Sign up to request clarification or add additional context in comments.

Comments

0

You can try with the Built-In SSRS fields ...

Try using Expression -> Built-In-Fields -> UserId should work in this case, if I understood your question correctly...

OR

Try manipulating the report server URL. Provided below one for example ...

=mid(Globals!ReportServerUrl , InStr(Globals!ReportServerUrl,"&UserID=")+8)

4 Comments

actually it will not show the query string parameter value of userID. For example I am passing Pedram but showing SERVER1\PC1
From where you are passing Pedram ? Is it defined by you ?
from web application in query string. btw can you please delete your answer as I wanted to this delete this question. it is due to my silly mistake I wan not getting parameter name in report.
It is ok. Check for the updated answer. This should work in this scenario. It would help others also...
0

Issue was with my parameter UserId.

I have set it as Internal that's why it was set to default value blank space instead of passed parameter UserId value. (Now I am using hidden)

Note: Report parameters are case sensitive so in my case it must be UserId

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.