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

Object reference failure, debug not available

4 Answers 64 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 22 Jul 2013, 11:38 PM
I'm having a problem with my report and so far i have not been able to debug it at all. I've set debug points on my data source but it just does not hit any of them. The report seems to have broken after i enabled SQL session state. I have a webviewer set to display the report and it is returning this instead. 

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 1692
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Mon, 22 Jul 2013 23:23:11 GMT

<html>
<head>
<link rel="stylesheet" type="text/css" href="/mysite/Telerik.ReportViewer.axd?name=Resources.ParametersArea.css&amp;optype=Resource&amp;version=6.0.12.215" />
</head><body style="margin:0;padding:0;background-color:white;">
<form name="mainForm" method="post" action="Telerik.ReportViewer.axd?instanceID=3f7311afc6d84ca6ae6a67c924abbd0b&amp;optype=Parameters&amp;bgColor=white" id="mainForm" onclick="FormClick();" style="width:100%;border-width:0px;padding:0px;margin:0px;">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUBMA9kFgJmDxYEHgdvbmNsaWNrBQxGb3JtQ2xpY2soKTseBXN0eWxlBTN3aWR0aDoxMDAlO2JvcmRlci13aWR0aDowcHg7cGFkZGluZzowcHg7bWFyZ2luOjBweDsWAmYPZBYCZg9kFgRmD2QWAmYPDxYEHgVXaWR0aBsAAAAAAABZQAcAAAAeBF8hU0ICgAJkZAIBD2QWAmYPDxYEHwIbAAAAAAAAWUAHAAAAHwMCgAJkZGRlmxY10PAf8eqiqtIji5qJxpZjvg==" />
</div>


<script src="/mysite/Telerik.ReportViewer.axd?name=Resources.Parameters.js&amp;optype=Resource&amp;version=6.0.12.215" type="text/javascript"></script><div id="ParametersDiv"><table id="parametersTable" cellspacing="0" cellpadding="0" border="0" style="width:100%;border-collapse:collapse;">
<tr style="height:2px;">
<td style="width:100%;"></td>
</tr><tr id="parametersRow">
<td id="editorsCell" style="width:100%;"><table id="editorsTable" cellspacing="0" cellpadding="0" border="0" style="width:100%;border-collapse:collapse;">

</table></td>
</tr>
</table></div></form>
</body>
</html><script type="text/javascript">
var ParametersPage = new ParametersPage(null, 'init', false, false, false, '', '<br />Object reference not set to an instance of an object.');
</script>

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 25 Jul 2013, 12:40 PM
Hello Chris,

Check out the Design Considerations for Out-proc Session State help article.

Additionally we have noticed that you use Q1 2012 and our recommendation is to check our latest official Telerik Reporting relase if it fixes the error.

Give it a try and if you still experience any difficulties please open a support thread and send us a runnable sample to review on our end.

Regards,
Peter
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

0
Chris
Top achievements
Rank 1
answered on 25 Jul 2013, 05:19 PM
Peter, 

Thank you for the link, i have reviewed the design considerations and my project appears to be in line. 

  • The report should have a default constructor (constructor without parameters i.e. parameterless constructor).
All my reports have a parameterless constructor and all events are created using the designer
  • The data source for the report should always be binary serializable.
I am using the report designer to specify an SQL datasource
  • There would be a call to the default constructor on each action from the report viewer.
The constructor is not being hit before the exception occurs. 
  • Report events should be attached in the default constructor.
Report events are specified in the designer


I currently have two reports using the telerik controls and one of them works and the other one does not. I also can not upgrade to the 2013 version.

Do you have any more thoughts as to why the application fails right after it has reached the constructor? 
0
Chris
Top achievements
Rank 1
answered on 26 Jul 2013, 06:50 PM
I believe i managed to get a handle on the actual exception that is being thrown. I had to enable CLR exceptions during my debug process and it produced this. 

{"Object reference not set to an instance of an object."}
mscorlib
   at System.Object.GetType()
   at Telerik.Reporting.Expressions.FunctionNode.Eval(Object row, Object context)
0
Elian
Telerik team
answered on 30 Jul 2013, 08:13 AM
Hello Chris,

This exception usually occurs when you have user functions in a separate assembly which is not referenced in the project and when the engine tries to resolve the function it throws an exception since the type is not loaded. Can you please verify if that is the case with your or not?
If not, please give us as much information on your project structure and setup as possible.
It would be best if you open a support thread and attach a runnable project that reproduces the problem. 
 

Regards,
Elian
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

Tags
General Discussions
Asked by
Chris
Top achievements
Rank 1
Answers by
Peter
Telerik team
Chris
Top achievements
Rank 1
Elian
Telerik team
Share this question
or