• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 374
  • Last Modified:

Parameters in SSRS URL

I have a ssrl url http://reports-dev/ReportServer/Pages/ReportViewer.aspx?%2fReports%2fSoftwareDevelopment%2frs_test&rs:Command=Render&rs:Format=EXCEL&pr_active_trader_id=Temp UndOpt and I pass value as Temp UndOpt and since it has space I am getting Internal Server error. How to endcode any parameter which has space in it.
1 Solution
Chris LuttrellSenior Database ArchitectCommented:
Well %20 is normally what a space is encoded into.  As to how to do that, it depends on what is generating the url string.  There is usually an URLENCODE type comand in most tools/languages, you will have to look for it in yours.
CGLuttrell is correct - spaces are encoded into %20. I have a report which refers to parameters which may have spaces in them. The URL looks like this -


The report is accessed by clicking a button on an aspx page with the following code -

    protected void btn_GetManifest_Click(object sender, EventArgs e)
        string DelDate = dd_DelMonth.SelectedValue;
        string DelShip = dd_ShipNames.SelectedValue;
        string reportURL = "http:/" + "/serverX/reportserver?" + "/POsByShipment/ShipmentManifest&rs:Command=Render&DELIVERY_MONTH=" + DelDate + "&CONTAINER=" + DelShip;

Note that I am not specifically encoding the url - the %20 replaces the space automatically.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now