locked
Issue with multi select parameter while export the report to PDF using script RRS feed

  • Question

  • Hi All,

    We have following issues,

    1. I have one custom report having a drop down of multiple select parameter as below.

     

    I am exporting the report and attaching to email as PDF. For that I am executing following http request;

      var retrieveEntityReq = new XMLHttpRequest();

                        retrieveEntityReq.open("POST", pth, false);

                        retrieveEntityReq.setRequestHeader("Accept", "*/*");

                        retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

     

    var data = "id=" + reportId + "&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" + reportName + "&isScheduledReport=false&CRM_Filter=" + crmFilter + "&p:ParaValue=01";

                

     

                        retrieveEntityReq.send(data);

     

    Here ParaValue (Multiple Select Parameter) is dropdown parameter of few multiple select options on report.

    All works fine if I pass only one select value as parameter that is "&p:ParaValue=01".

    But I want to pass multiple select values for parameter.

    I have tried to pass multiple values as "&p:ParaValue=01&p:ParaValue=02&p:ParaValue=03” but it doesn’t work.

     

    1. I also want to pass Null value to Report parameter i.e "&p:AllowNullParameter=NULL" to those parameter who allowed to set null, I have tried below options but they not worked.
      1. NULL
      2. Null
      3. (Null)
      4. DBNull

    Thanks!

    Any help on this.


    Friday, December 5, 2014 3:55 AM

All replies

  • The syntax you use for multiple parameters looks correct for reporting services, but it may be that the Crm Report viewer doesn't support this. What happens if you try passing multiple values ?

    To pass a null (based on reporting services syntax), use:

    &p:AllowNullParameter:isnull=True


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

    Friday, December 5, 2014 10:18 AM
    Moderator
  • Hi

    I have tried to pass null value as  ”&p:NullParameter:isnull=True”  to  parameter but it not work for Dynamic CRM.

    For multiple select parameters multiple values are not setting for parameter, I get following response html. Which shows parameter value not set for report.

    Any help on this.

    Thanks!

    Saturday, December 6, 2014 11:43 AM
  • Hi,

    for 1, did you try passing multi parameters as mentioned below..

    var data = "id=" + reportId + "&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" + reportName + "&isScheduledReport=false&CRM_Filter=" + crmFilter + "&ParaValue=01&ParaValue=02&ParaValue=03"; 

    refer following article related to this.

    http://stackoverflow.com/questions/8360050/how-to-pass-multi-value-parameter-in-ssrs-2005-url-and-how-to-save-report-direct

    for 2, try setting "&NullParameter:isnull=true" and see if this works..

    refer following article related to this.

    http://technet.microsoft.com/en-us/library/ms155391(v=sql.105).aspx


    MayankP
    My Blog
    Follow Me on Twitter

    Sunday, December 7, 2014 1:08 PM
    Answerer
  • Hi,

    We tried to pass multiple select parameter as "&ParaValue =01&ParaValue =02&ParaValue=03". 

    Similarly we tried to pass parameter value null as ”&NullParameter:isnull=true".

    Both didn’t work for Dynamic CRM.  From our past experience to work we have to pass parameter as "&p:parameterName".

    Thanks!

    Wednesday, December 10, 2014 2:09 PM