Wednesday, June 26, 2013

Fix to "Object must implement IConvertible" error when using objectdatasource withy multivalue parameter under Telerik Reports

If you want to pass multivalue parameters to an objectdatasource you have to make sure the argument type of the objectdatasource's method is object array. You cannot pass a List or array integer or etc.
In the method body convert the object [] to the needed array type  . You can do it this way:
parameter is:
(object[] eventTypes)
   
            int[] eventTypeIDs = eventTypes.Select( Convert.ToInt32).ToArray();

Tuesday, June 25, 2013

Telerik Report doesnt see referenced classes/methods

I have static classes which has the DAL methods which I want to use in my Telerik Report
To do that I drag an objectDataSource to my report and none of those classes I referenced show up in Configure Object Data Source wizard.
Here is a quick solution:
Just add a public struct like  this to each one of your static class , recompile DAL and Telerik now will see your methods
        public struct  ShowMyClass{};