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

List Month Names as Report Parameter

3 Answers 286 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ricky
Top achievements
Rank 1
Ricky asked on 21 Dec 2012, 11:51 AM
Hi

Is there a way to list all the month names as a report parameter?
I want the user to select the month and pass the number of the month to the filter.

Thus, ParameterMonth.Label = Month Name, ex "December" and ParameterMonth.Value = Number of Month, Ex "12".

Preferably I would like to do this with an Array in code.

I'm using Visual Studio 2012 and Telerik reporting Q3 2012.

Thank you.

3 Answers, 1 is accepted

Sort by
0
Hadib Ahmabi
Top achievements
Rank 1
answered on 26 Dec 2012, 02:51 PM
Yes, you can. Simply create an array of objects and assign it to the ReportParameter.AvailableValues.DataSource property, then set ReportParameter.AvailableValues.ValueMember (the month numbers) and ReportParameter.AvailableValues.DisplayMember (the month names). The last two properties are string and should reflect the property names of the objects that you use as DataSource. 
0
Ricky
Top achievements
Rank 1
answered on 15 Jan 2013, 06:16 AM
Where do I create the array of objects, and assign data to it? (initialize the array of objects)

I am developing in MVC3.

Thank you.
0
Hadib Ahmabi
Top achievements
Rank 1
answered on 16 Jan 2013, 01:32 PM
I would do it in the report constructor.
Tags
General Discussions
Asked by
Ricky
Top achievements
Rank 1
Answers by
Hadib Ahmabi
Top achievements
Rank 1
Ricky
Top achievements
Rank 1
Share this question
or