Forum Discussion

pbiuser1234's avatar
pbiuser1234
Helper I
4 years ago
Solved

Passing parameters from power bi report server to SSRS RDL does not work

Hello,
I'm using ?rp:parameter=value in a URL of SSRS RDL uploaded to the power bi server,
But it doesn't work - the report is not filtered by the passed parameter.

Is it only working with power bi service? not on server,

or maybe I should use Report builder instead of SSRS to build the RDL?
Thanks in advandced

12 Replies

    • pbiuser1234's avatar
      pbiuser1234
      Helper I

      WOW Amazing!! Thank you so much it works great now with one value passed in the url,
      If I need multiple values, is there a way in DAX syntax for some kind of loop? If so do you have an example?
      I need to pass multiple values for the parameter "Emloyee" like this:
      https://ReportServer/Reports/ReportName?Employee=1&Employee=2
      This is my code that works for one value:

      PaginatedaReportURL =
      var _baseurl = "https://ReportServer/reports/ReportName"
      var _selectemployee = SELECTEDVALUE(Query1[Employee])
      var _reportparameterEmployee = "?Employee="&_selectemployee
      var _result = _baseurl&_reportparameterEmployee
      return
      _result

      Also I want the rdl to open up automaticly in excel so I've added "&rdl:format=excel" to the URL - but this also doesn't work (also tried "&rs:Format=excel" or "&Format=excel"). Maybe syntax also should be different for the server version?
      Thanks a lot!
      • d_gosbell's avatar
        d_gosbell
        Super User

        pbiuser1234 wrote:

        If I need multiple values, is there a way in DAX syntax for some kind of loop?


        Yes, you could use the CONCATENATEX function

         

        PaginatedaReportURL =
        var _baseurl = "https://ReportServer/reports/ReportName"
        var _selectemployee = CONCATENATEX(VALUES(Query1[Employee]), "&Employee=")
        var _reportparameterEmployee = "?Employee="&_selectemployee
        var _result = _baseurl&_reportparameterEmployee
        return
        _result

         


        pbiuser1234 wrote:
        Also I want the rdl to open up automaticly in excel so I've added "&rdl:format=excel" to the URL - but this also doesn't work (also tried "&rs:Format=excel" or "&Format=excel"). Maybe syntax also should be different for the server version?

        The "rs:Format=EXCEL" should get you an xls file, if you use "rs:Format=EXCELOPENXML" it will return an xlsx file. (see https://docs.microsoft.com/en-us/sql/reporting-services/url-access-parameter-reference?view=sql-server-ver15 ) - I don't think the upper/lower case matters

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Community Support

    Hi pbiuser1234 ,

     

    Whether the advice given by d_gosbell  has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


    Looking forward to your feedback.


    Best Regards,
    Henry