"No parameterless constructor defined for this object" error on Telerik Reporting

6 posts, 0 answers
  1. Lea
    Lea avatar
    9 posts
    Member since:
    Nov 2014

    Posted 17 Dec 2014 Link to this post

    I created a report and I'm encountering this error. My main report is doing fine, but my sub-reports are not. The error is 

    "An error has occurred while processing SubReport 'SubReport1': Invalid report type ------------- InnerException ------------- No parameterless constructor defined for this object."

    I have 2 sub-reports both of them have this error. The way I connected my main report to its data source which is an XML file located on my hard disk is the same with connecting 2 sub-reports. Can someone tell me what causes this error?

    Environment: vb.net, xml data source, .net 4.0, visual studio 2012
  2. KS
    KS avatar
    165 posts
    Member since:
    Oct 2012

    Posted 18 Dec 2014 in reply to Lea Link to this post

    Hi,

    Now, if it is a web app, and the session state is StateServer or other out-of-process mode set all of these rules - Design Considerations for Out-proc Session State. And if anything is specified via Type.AssemblyQualifiedName, the type must have default parameterless constructor (via reflection there must be created an instance with that name).

    -KS
  3. DevCraft banner
  4. Lea
    Lea avatar
    9 posts
    Member since:
    Nov 2014

    Posted 18 Dec 2014 in reply to KS Link to this post

    Hi Ks, thanks for always responding to my inquiries. 
  5. Scott
    Scott avatar
    15 posts
    Member since:
    Dec 2015

    Posted 21 Aug Link to this post

    How do we deal with this exact same error when using C# Winforms?

    Thank you!

  6. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 24 Aug Link to this post

    Hello Scott,

    Make sure that all of your reports have a parameterless constructor. If you want to pass any data to the report, please use report parameters instead of passing arguments via the report's constructor.

    Modifying the default report's constructor to accept arguments is not a recommended practice.

    Regards,
    Nasko
    Telerik by Progress
    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
  7. Scott
    Scott avatar
    15 posts
    Member since:
    Dec 2015

    Posted 24 Aug in reply to Nasko Link to this post

    Hi Nasko-

    That was exactly it.  Thank you!

    -Scott

Back to Top
DevCraft banner