Hi everyone,
I'm using Visual Studio 2008 and the crystal reports that come with it.
I made some graphs using the Crystal Reports.
When I'm running my code on localhost everything is working fine.
When I'm deploying my code on IIS I get the following error after I click the link to see the graph.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 6: </asp:Content>
Line 7: <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
Line 8: <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
Line 9: AutoDataBind="true" ReportSourceID="CrystalReportSource1"
Line 10: onload="CrystalReportViewer1_Load1" DisplayToolbar="False"/>
Source File: c:\ttsap\ict2\CedefopUsersGraph.aspx Line: 8
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
CrystalDecisions.Web.CrystalReportViewerBase.get_ReportSource() +25
CrystalDecisions.Web.CrystalReportViewer.set_ReportSource(Object value) +15
CrystalDecisions.Web.CrystalReportViewerBase.set_ReportSourceID(String value) +46
ASP.cedefopusersgraph_aspx.__BuildControlCrystalReportViewer1() in c:\ttsap\ict2\CedefopUsersGraph.aspx:8
ASP.cedefopusersgraph_aspx.__BuildControlContent2(Control __ctrl) in c:\ttsap\ict2\CedefopUsersGraph.aspx:7
System.Web.UI.CompiledTemplateBuilder.InstantiateIn(Control container) +12
ASP.masterpage_master.__BuildControlContentPlaceHolder1() in c:\ttsap\ict2\MasterPage.master:83
ASP.masterpage_master.__BuildControlform1() in c:\ttsap\ict2\MasterPage.master:14
ASP.masterpage_master.__BuildControlTree(masterpage_master __ctrl) in c:\ttsap\ict2\MasterPage.master:1
ASP.masterpage_master.FrameworkInitialize() in c:\ttsap\ict2\MasterPage.master.cs:912308
System.Web.UI.UserControl.InitializeAsUserControlInternal() +31
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +2028700
System.Web.UI.Page.get_Master() +48
System.Web.UI.Page.ApplyMasterPage() +18
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +685
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
I don't know why I'm getting this. Please help me to deal with it!
Thank you all
I'm using Visual Studio 2008 and the crystal reports that come with it.
I made some graphs using the Crystal Reports.
When I'm running my code on localhost everything is working fine.
When I'm deploying my code on IIS I get the following error after I click the link to see the graph.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 6: </asp:Content>
Line 7: <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
Line 8: <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
Line 9: AutoDataBind="true" ReportSourceID="CrystalReportSource1"
Line 10: onload="CrystalReportViewer1_Load1" DisplayToolbar="False"/>
Source File: c:\ttsap\ict2\CedefopUsersGraph.aspx Line: 8
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
CrystalDecisions.Web.CrystalReportViewerBase.get_ReportSource() +25
CrystalDecisions.Web.CrystalReportViewer.set_ReportSource(Object value) +15
CrystalDecisions.Web.CrystalReportViewerBase.set_ReportSourceID(String value) +46
ASP.cedefopusersgraph_aspx.__BuildControlCrystalReportViewer1() in c:\ttsap\ict2\CedefopUsersGraph.aspx:8
ASP.cedefopusersgraph_aspx.__BuildControlContent2(Control __ctrl) in c:\ttsap\ict2\CedefopUsersGraph.aspx:7
System.Web.UI.CompiledTemplateBuilder.InstantiateIn(Control container) +12
ASP.masterpage_master.__BuildControlContentPlaceHolder1() in c:\ttsap\ict2\MasterPage.master:83
ASP.masterpage_master.__BuildControlform1() in c:\ttsap\ict2\MasterPage.master:14
ASP.masterpage_master.__BuildControlTree(masterpage_master __ctrl) in c:\ttsap\ict2\MasterPage.master:1
ASP.masterpage_master.FrameworkInitialize() in c:\ttsap\ict2\MasterPage.master.cs:912308
System.Web.UI.UserControl.InitializeAsUserControlInternal() +31
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +2028700
System.Web.UI.Page.get_Master() +48
System.Web.UI.Page.ApplyMasterPage() +18
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +685
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
I don't know why I'm getting this. Please help me to deal with it!
Thank you all