No parameterless constructor defined for this object

2 posts, 0 answers
  1. Ahmet
    Ahmet avatar
    1 posts
    Member since:
    Aug 2014

    Posted 27 Jun Link to this post

    Hi,

     

    ObjectDataSource business.Component not connection 

     

    Error !

    No parameterless constructor defined for this object

  2. Stef
    Admin
    Stef avatar
    3049 posts

    Posted 27 Jun Link to this post

    Hello Ahmet,

    In general, the purpose of the ObjectDataSource component is to provide data to the report in a declarative manner. The ObjectDataSource.DataSource should be the assembly qualified name or Type of the data access layer (class), where the reporting engine will use System.Reflection to create the instance of the class (by using its default constructor) and to execute its method specified by the ObjectDataSource.DataMember.

    Having the above into account, the data access layer must have a default parameterless constructor in order to be instantiated.


    In case it is a data model created via Entity Framework, please consider switching to the EntityDataSource component.

    Regards,
    Stef
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top