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

programatically filter report parameters: A list of questions

1 Answer 255 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gersh
Top achievements
Rank 2
Gersh asked on 14 Nov 2009, 03:45 AM
1) I understand that to have a default value for a parameter, it's ReportParameter rp.Value, even with MultiValue turned on. But there appears to be a select all choice when i use multivalue. How can i do this w/o throwing a  whole list of values to that field?

2) With the DateTime filter, is there a way to do a range of dates using 1 report parameter?

3)Is there a way to programmatically fix the size of field itself, I have a double parameter that's huge when I only need at most 4 chars in it?

1 Answer, 1 is accepted

Sort by
0
Milen | Product Manager @DX
Telerik team
answered on 18 Nov 2009, 03:31 PM
Hello Gersh,

Before addressing your questions, we would like to ask you to please contact the purchase holder in your company and request from him/her to add you as a License Developer to the purchase your company holds. You can find more information on License Developers and instructions on how to accomplish this here: www.telerik.com/account/faqs.aspx. Being a License Developer will give you full access to our support ticketing system, will ensure proper responses from our support team, and will guarantee you faster response times.

To your questions:
1. In our current implementation you cannot set a default multiple value of a parameter using the report designer. However, you can do it using a single line of code. Just assign an IEnumerable containing the desired initial values to the Value property of your parameter after the call of the Initialize component:

this.InitializeComponent()
// any data pulling
this.ReportParameters["MyParameter"].Value = new string[] { "Mountain Bikes", "Road Bikes" };


2. No, you need to use two single value datetime parameters - FromDate and ToDate.

3. No, you cannot change the Appearance of the auto generated UI for the report parameters.

Keep in mind that the automatic UI provides only basic controls that allow user input and you always may choose to use your own controls so that you can customize and style them. Same is true for point two: You may use your own control that allows the input of two dates and then pass that values to the report parameters.

Hope this information helps.
 

Best wishes,
Milen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Gersh
Top achievements
Rank 2
Answers by
Milen | Product Manager @DX
Telerik team
Share this question
or