locked
passing parameter values to ssrs report RRS feed

  • Question

  • For an existing ssrs 2008 report that is running on a ssrs 2012 report server, I believe the call from the .net application that will call the report server will look something like the following:
    https://test.sch.org/AL/att/letter.aspx?schoolyear=2017&schoolnum=341&term=9&milestonecode=005&startdate=12/8/2016%2010:03:06%20AM&enddate=12/9/2016%2012:00:00%20AM&language=ALL&studentlink=ALL&UniqueID=999999

    Since this is my first time obtaining parameter values from a call from an application, I have the following questions:
    1. Does the name of the parameter need to be exactly like what is passed in the url. For example listed above, there 'schoolyear=2017'. Does the SSRS report name need to be exactly 'schoolnum' or can the name be something else?
    2. How does the ssrs report know what parameter field applies to the values listed above?  For example, how does the ssrs report know where 'schoolnum=341' should be applied in the report? Does having the parameter marked as hidden make a difference? Does the order of parameters listed make a difference?
    3. There are the first two parameters called admin and userid that are not listed in the url? These 2 parameters have default values. Do I need to pass those 2 parameters in the url? Can you tell me why or why I would not need to pass those parameter values in the url (link)?





    Thursday, December 8, 2016 5:00 PM

Answers

  • Hi wendy elizabeth,

    Question 1:
    The name of the report parameter must be exactly the same as what is passed in the url. Also, report parameters are case-sensitive.

    Otherwise, error message will be prompt like:
    An attempt was made to set a report parameter 'ReportParamete2' that is not defined in this report. (rsUnknownReportParameter)

    Question 2:
    As per my knowledge, the parameter values will be passed to matching report parameter based on parameter's name.

    Setting the parameter to hidden makes no difference. But, setting parameter to internal will cause error: Parameter validation failed. It is not possible to provide valid values for all parameters. (rsParameterError)

    The order of parameters in URL will not influence the running of report.

    Question 3:
    If the report parameters have been specified with default values, there is no need to pass values in URL. If you pass some other values for those parameters with default values, the report will render data according to the new values that passed via URL instead of using default values.

    If you have any other question, please feel free to ask.

    Best regards,
    Yuliana Gu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, December 9, 2016 4:56 AM