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

Report Parameters Select All?

3 Answers 1056 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Henry Derstine
Top achievements
Rank 1
Henry Derstine asked on 01 Aug 2008, 02:46 PM
Is there a way to default to have all the items selected when you use a multivalue report parameter in a filter?

i.e. I have a report parameter that can be any of the 50 states. By default I would like the filter to have all 50 selected when the report runs.
Thanks

3 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 04 Aug 2008, 11:59 AM
Hi Henry Derstine,

You can specify the default selection of a multi-value parameter the same way you specify the default value of a single-value parameter: simply assign it to the Value property of the corresponding report parameter. In the case of a multi-value parameter you should provide a collection or an array of selected values, that match the values specified by the ValueMember property of the report parameter. The attached test report illustrates how this can be done programmatically.

Greetings,

the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Srinath
Top achievements
Rank 1
answered on 25 Jul 2012, 12:51 AM
Hi,

Can we do this at design time, by setting the parameters?
I have defined the datasource at design time using sql data source wizard. In this case can you show me a sample code snippet of how to set the value of multi value parameter.

Thanks.
Srinath.
0
Steve
Telerik team
answered on 25 Jul 2012, 06:52 AM
Hello Srinath,

Please review the Using Multivalue Parameters help article that elaborates on how to set default Value for a multiValue report parameter, when bound to SqlDataSource component.

Kind regards,
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 >

Tags
General Discussions
Asked by
Henry Derstine
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Srinath
Top achievements
Rank 1
Steve
Telerik team
Share this question
or