Click here to Skip to main content
15,895,656 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Getting error : System.NullReferenceException: Object reference not set to an instance of an object in Local Report using report viewer and RDLC

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.Reporting.WebForms.ReportViewer.get_ReportControlSession() +37
Microsoft.Reporting.WebForms.ReportViewerClientScript.SetViewerInfo(ReportViewer viewer, String reportAreaId, String promptAreaRowId, String docMapAreaId, String fixedTableId, String promptSplitterId, String docMapSplitterId, String docMapHeaderOverflowId, String directionCacheId, String browserModeCacheId) +1594
Microsoft.Reporting.WebForms.ReportViewer.OnPreRender(EventArgs e) +3335
System.Web.UI.Control.PreRenderRecursiveInternal() +80
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
Posted
Comments
♥…ЯҠ…♥ 3-Oct-13 6:45am    
Have you ever heard about the word debugging in Visual Studio?
Thanks7872 3-Oct-13 7:15am    
Where is the code? Don't you understand that we can not assume your code?

We can't help you - you need access to your code while it is running in order to work out which variable is causing the problem.
So run your code in the debugger, and when the exception occurs look at the variables in your code to see which is null...
 
Share this answer
 
AS you haven't posted any snippets of code all I can suggest is that you have a read of this.

Normally this error is when you have not instantiated an object correctly.

http://social.msdn.microsoft.com/Forums/en-US/a14e8eb9-927f-4083-837d-8d4c6676515e/i-want-any-example-for-reportviewer[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900