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

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

8 Answers 1228 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Hardik
Top achievements
Rank 1
Hardik asked on 16 Jan 2015, 07:32 AM
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

8 Answers, 1 is accepted

Sort by
0
Accepted
Stef
Telerik team
answered on 20 Jan 2015, 01:31 PM
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.

 
0
Donnie
Top achievements
Rank 1
answered on 29 Jan 2015, 09:34 AM
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
0
Nasko
Telerik team
answered on 02 Feb 2015, 02:39 PM
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.

 
0
Srinivas
Top achievements
Rank 1
answered on 09 Mar 2015, 05:59 PM
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.
0
Hardik
Top achievements
Rank 1
answered on 10 Mar 2015, 04:46 AM
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
0
Srinivas
Top achievements
Rank 1
answered on 10 Mar 2015, 06:40 AM
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
0
Hardik
Top achievements
Rank 1
answered on 10 Mar 2015, 07:04 AM
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.
0
Srinivas
Top achievements
Rank 1
answered on 10 Mar 2015, 11:01 AM
Thank you this works...
Tags
Report Designer (standalone)
Asked by
Hardik
Top achievements
Rank 1
Answers by
Stef
Telerik team
Donnie
Top achievements
Rank 1
Nasko
Telerik team
Srinivas
Top achievements
Rank 1
Hardik
Top achievements
Rank 1
Share this question
or