locked
How to pass multiple value report parameter in the URL? RRS feed

  • Question

  • Hi All,

    I would like to run the report setting a few parameters. I am forming the URL as below.

    https://<servername>/CRMReports/viewer/viewer.aspx?action=run&helpID=<reportname>.rdl&id=%7b<Id>%7d&p:StartDate=<StartDate>&p:UserName=<UserId>&p:EndDate=<EndDate>

    When the report runs, the Start Date and End Date parameters are passed correctly to the report, but the UserName parameter isn't. It comes as blank when the report runs. UserName parameter is a multiple values parameter.

    Is there any specific way to set the multiple value parameter in the URL? How can I set this parameter so that the report runs with it?

    Thanks,

    Swaroop


    • Edited by Swaroop_d Wednesday, February 24, 2016 9:36 PM
    Wednesday, February 24, 2016 9:35 PM

All replies

  • I've not tried this with the CRM report viewer, but it's syntax is modelled on the RS URL access, in which you'd repeat the parameter name for each value, so try:

    https://<servername>/CRMReports/viewer/viewer.aspx?action=run&helpID=<reportname>.rdl&id=%7b<Id>%7d&p:StartDate=<StartDate>&p:UserName=<UserId1>&p:UserName=<UserId2>&p:EndDate=<EndDate>


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Thursday, February 25, 2016 9:20 AM
    Moderator
  • Hi David,

    Thanks for your reply but its still not working for me.

    The dataset for UserName parameter is a set of systemuser references and the way the parameter is set is that the value fetched is a GUID and the displayed value is the SystemUserName.

    In that case, should I pass my UserName parameter as "&p:UserName=<FirstName LastName>" or "&p:UserName=<GUID>" ?

    Thanks,

    Swaroop

    Friday, February 26, 2016 4:52 PM