0
votes

I am trying to pass a parameter in ssrs and realize it should be very easy but I'm not getting anywhere with it. When I try to do so by adding ?Agency=296 to the end of my call in my classic asp page it simply tells me that "The 'Agency' parameter is missing a value"

I have many reports I call from the page that work fine. It's just when I try to pass a parameter that it doesn't work. Within the report I have the parameter set up and hidden. I've also tried it as Internal but it still breaks.

My call to the ssrs is: https://testserver.adomain.net/Reports/Pages/Report.aspx?ItemPath=%2fname%2fReports%2fIYSANew%2frptBilling&rs:Command=Render&Agency=296

Note: I've substituted my testserver.adomain.net and 'name' in this post but have the correct ones in the call.

If I have the parameter visible and input when the report comes up it works fine.

I really appreciate any and all help I get with this. Thanks!

2

2 Answers

0
votes

Use ReportViewer.aspx instead of Report.aspx

0
votes

Two things to think about when calling the report web service via URL:

  1. DO YOU HAVE ACCESS by your user or automated code to that location? If you cannot get to the url of

    http:// (servername)/ReportServer/(pathtoreport)
    

    without parameters then there is an issue with permissions.

  2. Ensure your label of the parameter is the same as the actual name of the parameter and ensure you can pass in the correct string, int, or datatime you expect. It should be appending:

    & + (ParameterName) + =(value)
    

    I know this works as I just did it on my Dev Server with a parameter called 'Test' that accepts a 'Text' value with:

    http:// ru___:81/ReportServer/Pages/ReportViewer.aspx?%2fTest%2fTest&rs:Command=Render&Test=abc
    

You need to try the URL method directly in a browser if you are not already before attempting to do the calls in code on a page.