How can I set the multiple default values for multi-valued parameter in the report?

9 posts, 1 answers
  1. Hardik
    Hardik avatar
    10 posts
    Member since:
    Jan 2015

    Posted 16 Jan 2015 Link to this post

    Hi,

    I have a multi-value report parameter whose value is coming from database. I want set all values selected by default when report runs first.

    How can I set the multiple default values for multi-valued parameter in the report?

    I went through the report guide http://www.telerik.com/help/reporting/designing-reports-parameters-using-multivalue-parameter.html

    but could not understand the implementation.

    I did not find AllValues function in the report designer. I have also tried Array function but did not work. Array function selects multiple values when we pass hardcoded values in it.

    I am using standalone report designer. Please advise.

    Thanks,
    Hardik
  2. Answer
    Stef
    Admin
    Stef avatar
    3053 posts

    Posted 20 Jan 2015 Link to this post

    Hi Hardik,

    In the Using Multivalue Parameters article is illustrated how to use a custom function to set the default value of a multivalued parameter. To use such in the Standalone Report Designer you will have to build a library with the functions and load it in the designer by extending its configuration.

    For more details check Extending Report Designer and the tutorials linked at the bottom of the article.


    Let us know if you need any further help.

    Regards,
    Stef
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
  4. Donnie
    Donnie avatar
    2 posts
    Member since:
    Nov 2014

    Posted 29 Jan 2015 in reply to Stef Link to this post

    I have the same problem and I have followed the steps from the documentation quoted above, but I've not been able to make it work completely, right now it's just partial.

    I created the data source parameter and the report parameter and then set the report parameter multivalue property to true and yet it doesn't work. It only works when I select one value but when I select multiple values it doesn't return any data. I even made the parameter value visible to make sure that the
    Parameter receives the correct value but it doesn't work until I click on the parameter value and them click on the preview button.

    Is there another way to view the report with multiple values from first run without using functions and all... I really need help I've been looking for a solution for the past 4 days
  5. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 02 Feb 2015 Link to this post

    Hello Donnie,

    It is not possible to view the report with multiple default values without using functions. The Specifying Default Values for a MultiValue Parameter section of the Using Multivalue Parameters explains in detail how to use functions to set multiple values as default for a multivalue parameter.

    Regards,
    Nasko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Srinivas
    Srinivas avatar
    3 posts
    Member since:
    Mar 2015

    Posted 09 Mar 2015 in reply to Stef Link to this post

    Hi, I am new to Telerik and i am trying to have multivalue parameters. I have stored proc in sql server which accepts multiple values. But from Standalone report designer how do i send multivalues to parameter. I have even set multivalue to true for parameter. What else i could do. I am worried this have to be done by tomorrow morning and i wanted a quick help.

    Thanks very much in advance.
  7. Hardik
    Hardik avatar
    10 posts
    Member since:
    Jan 2015

    Posted 09 Mar 2015 in reply to Srinivas Link to this post

    Hi Srinivas,

    You can use Join() function to pass multiple values to a parameter. This function will generate comma separated values. You can split the values in stored procedure if required.

    Regards,
    - Hardik
  8. Srinivas
    Srinivas avatar
    3 posts
    Member since:
    Mar 2015

    Posted 10 Mar 2015 in reply to Hardik Link to this post

    Hi Hardik,

    Could you please let me know where to apply this Join function. I will await on your response.
    Stored procedure part already i have handled it. Problem is with Telerik side only.

    Thank You
    Srinivas
  9. Hardik
    Hardik avatar
    10 posts
    Member since:
    Jan 2015

    Posted 10 Mar 2015 in reply to Srinivas Link to this post

    You must be passing parameter values to the stored procedure. You have to write expression to use Join() function while configuring datasource where you have defined stored procedure name.

    Look at the screenshot attached herewith.
  10. Srinivas
    Srinivas avatar
    3 posts
    Member since:
    Mar 2015

    Posted 10 Mar 2015 in reply to Hardik Link to this post

    Thank you this works...
Back to Top
DevCraft banner