This is a migrated thread and some comments may be shown as answers.

Set multivalue parameter in designer

9 Answers 1194 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Darren
Top achievements
Rank 1
Darren asked on 06 Sep 2012, 03:06 PM
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

9 Answers, 1 is accepted

Sort by
0
Squall
Top achievements
Rank 1
answered on 11 Sep 2012, 02:41 PM
0
Darren
Top achievements
Rank 1
answered on 11 Sep 2012, 02:50 PM
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.
0
Steve
Telerik team
answered on 17 Sep 2012, 08:34 AM
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 >

0
Ioan
Top achievements
Rank 1
answered on 29 Oct 2014, 03:07 PM
how about two years later?
0
Stef
Telerik team
answered on 29 Oct 2014, 03:56 PM
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.

 
0
Kyle
Top achievements
Rank 1
answered on 20 Jul 2016, 07:03 PM
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.
0
Stef
Telerik team
answered on 21 Jul 2016, 09:21 AM
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
0
Kyle
Top achievements
Rank 1
answered on 21 Jul 2016, 12:47 PM

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.

0
Stef
Telerik team
answered on 25 Jul 2016, 01:28 PM
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
Tags
General Discussions
Asked by
Darren
Top achievements
Rank 1
Answers by
Squall
Top achievements
Rank 1
Darren
Top achievements
Rank 1
Steve
Telerik team
Ioan
Top achievements
Rank 1
Stef
Telerik team
Kyle
Top achievements
Rank 1
Share this question
or