Set multivalue parameter in designer

10 posts, 0 answers
  1. Darren
    Darren avatar
    20 posts
    Member since:
    Sep 2011

    Posted 06 Sep 2012 Link to this post

    Hi,

    Is there a way to set the value of a multivalue parameter in the data source wizard for debugging purposes?  The design time property value I mean.

    Thanks,
    Darren
  2. Squall
    Squall avatar
    174 posts
    Member since:
    Feb 2011
  3. DevCraft banner
  4. Darren
    Darren avatar
    20 posts
    Member since:
    Sep 2011

    Posted 11 Sep 2012 Link to this post

    I mean I would like to just type it into the designer as a design time property for testing purposes...

    Like so:

    'QX', 'AA', 'EF'

    Something like that.
  5. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 17 Sep 2012 Link to this post

    Hello Darren,

    Currently the expression editor does not support list of values. But you can do that in the report constructor right after InitializeComponent like this:

    this.ReportParameters["MyReportParameter"].Value = new string[] { "QX", "AA", "EF" };

    Greetings,
    Steve
    the Telerik team

    BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

  6. Ioan
    Ioan avatar
    34 posts
    Member since:
    Dec 2012

    Posted 29 Oct 2014 in reply to Steve Link to this post

    how about two years later?
  7. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 29 Oct 2014 Link to this post

    Hi Ioan,

    Please check the updated help article regarding multivalue report parameters - Using Multivalue Parameters.

    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.

     
  8. Kyle
    Kyle avatar
    15 posts
    Member since:
    Mar 2016

    Posted 20 Jul Link to this post

    So there's basically still no way to do this at design time? That article still doesn't suggest any way to do this. This is very frustrating from a development standpoint.
  9. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 21 Jul Link to this post

    Hi Kyle,

    Please check the Specifying Default Values for a MultiValue Parameter section of Using MultiValue parameters.

    You can use the Array built-in function to specify multiple initially selected values. The listed values must be available in the ValueMember fields of the parameter.


    Regards,
    Stef
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  10. Kyle
    Kyle avatar
    15 posts
    Member since:
    Mar 2016

    Posted 21 Jul in reply to Stef Link to this post

    I still can't preview the report doing this though. If I try to set design-time parameters using "Array" it says something along the lines of "undefined function reference Array". So what you're suggesting works when the report is opened in the browser, which at that point I'll just pass those parameters myself since I'm using the HTML5 viewer.

    Also, I ended up just using an object data source and passing the parameters in from the client side (JavaScript), as Object parameters. Then I convert them to the appropriate types (List<int>) and call the stored proc.

    This was necessary anyways as the parameters have to be sent to the proc as a user-defined Table type.

  11. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 25 Jul Link to this post

    Hi Kyle,

    Multivalue parameters are evaluated as arrays of object, and require additional handling in the SQL query to be turned into a custom variable.

    In addition to the found by you approach, you can use a stored procedure in which values are read, turned into a Table-valued parameter that is passed to another stored procedure.

    Regards,
    Stef
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
DevCraft banner