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

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

5 Answers 576 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lea
Top achievements
Rank 1
Lea asked on 18 Dec 2014, 05:31 AM
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

5 Answers, 1 is accepted

Sort by
0
KS
Top achievements
Rank 1
answered on 18 Dec 2014, 12:22 PM
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
0
Lea
Top achievements
Rank 1
answered on 19 Dec 2014, 01:06 AM
Hi Ks, thanks for always responding to my inquiries. 
0
Scott
Top achievements
Rank 1
answered on 21 Aug 2016, 05:26 PM

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

Thank you!

0
Nasko
Telerik team
answered on 24 Aug 2016, 02:03 PM
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
0
Scott
Top achievements
Rank 1
answered on 24 Aug 2016, 03:46 PM

Hi Nasko-

That was exactly it.  Thank you!

-Scott

Tags
General Discussions
Asked by
Lea
Top achievements
Rank 1
Answers by
KS
Top achievements
Rank 1
Lea
Top achievements
Rank 1
Scott
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or