Report.Print() NullReferenceException Error
Posted: Tue Mar 24, 2015 8:53 am
Dear,
Kindly note that i am trying to print a report using .Print(true) method; but, it gives me NullReferenceException when hosting the application on the server.
When testing it locally, the print dialog box correctly shows up and I am able to print (I am using the version '2013.1.1600.0').
below is the full event viewer log:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 3/24/2015 9:33:50 AM
Event time (UTC): 3/24/2015 7:33:50 AM
Event ID: c0f4f818ab3d41c48ff7eb1241cd1831
Event sequence: 21
Event occurrence: 2
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/3/ROOT/...
Trust level: Full
Application Virtual Path: <Application Pool>
Application Path: C:\inetpub\wwwroot\...
Machine name: <servername>
Process information:
Process ID: 27040
Process name: w3wp.exe
Account name: <Account>
Exception information:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.
at Stimulsoft.Base.StiExceptionForm..ctor(Exception exception)
at Stimulsoft.Base.StiExceptionProvider.Show(Exception exception)
at Stimulsoft.Report.Print.StiPrintProvider.Print(StiReport report, Boolean showPrintDialog, Int32 fromPage, Int32 toPage, Int16 copies, PrinterSettings printerSettings)
at Stimulsoft.Report.StiReport.Print(Boolean showPrintDialog, Int32 fromPage, Int32 toPage, Int16 copies, PrinterSettings printerSettings)
at Stimulsoft.Report.StiReport.Print(Boolean showPrintDialog)
at btnPrint_Click(Object sender, ImageClickEventArgs e)
at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Request information:
Request URL: <RequestURL>
Request path: <RequestPath>
User host address: <IP>
User: <User>
Is authenticated: True
Authentication Type: Negotiate
Thread account name: <Account>
Thread information:
Thread ID: 11
Thread account name:
Is impersonating: False
Stack trace: at Stimulsoft.Base.StiExceptionForm..ctor(Exception exception)
at Stimulsoft.Base.StiExceptionProvider.Show(Exception exception)
at Stimulsoft.Report.Print.StiPrintProvider.Print(StiReport report, Boolean showPrintDialog, Int32 fromPage, Int32 toPage, Int16 copies, PrinterSettings printerSettings)
at Stimulsoft.Report.StiReport.Print(Boolean showPrintDialog, Int32 fromPage, Int32 toPage, Int16 copies, PrinterSettings printerSettings)
at Stimulsoft.Report.StiReport.Print(Boolean showPrintDialog)
at btnPrint_Click(Object sender, ImageClickEventArgs e)
at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
Any help would be very appreciated.
Thank you in Advance
Charles
Kindly note that i am trying to print a report using .Print(true) method; but, it gives me NullReferenceException when hosting the application on the server.
When testing it locally, the print dialog box correctly shows up and I am able to print (I am using the version '2013.1.1600.0').
below is the full event viewer log:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 3/24/2015 9:33:50 AM
Event time (UTC): 3/24/2015 7:33:50 AM
Event ID: c0f4f818ab3d41c48ff7eb1241cd1831
Event sequence: 21
Event occurrence: 2
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/3/ROOT/...
Trust level: Full
Application Virtual Path: <Application Pool>
Application Path: C:\inetpub\wwwroot\...
Machine name: <servername>
Process information:
Process ID: 27040
Process name: w3wp.exe
Account name: <Account>
Exception information:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.
at Stimulsoft.Base.StiExceptionForm..ctor(Exception exception)
at Stimulsoft.Base.StiExceptionProvider.Show(Exception exception)
at Stimulsoft.Report.Print.StiPrintProvider.Print(StiReport report, Boolean showPrintDialog, Int32 fromPage, Int32 toPage, Int16 copies, PrinterSettings printerSettings)
at Stimulsoft.Report.StiReport.Print(Boolean showPrintDialog, Int32 fromPage, Int32 toPage, Int16 copies, PrinterSettings printerSettings)
at Stimulsoft.Report.StiReport.Print(Boolean showPrintDialog)
at btnPrint_Click(Object sender, ImageClickEventArgs e)
at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Request information:
Request URL: <RequestURL>
Request path: <RequestPath>
User host address: <IP>
User: <User>
Is authenticated: True
Authentication Type: Negotiate
Thread account name: <Account>
Thread information:
Thread ID: 11
Thread account name:
Is impersonating: False
Stack trace: at Stimulsoft.Base.StiExceptionForm..ctor(Exception exception)
at Stimulsoft.Base.StiExceptionProvider.Show(Exception exception)
at Stimulsoft.Report.Print.StiPrintProvider.Print(StiReport report, Boolean showPrintDialog, Int32 fromPage, Int32 toPage, Int16 copies, PrinterSettings printerSettings)
at Stimulsoft.Report.StiReport.Print(Boolean showPrintDialog, Int32 fromPage, Int32 toPage, Int16 copies, PrinterSettings printerSettings)
at Stimulsoft.Report.StiReport.Print(Boolean showPrintDialog)
at btnPrint_Click(Object sender, ImageClickEventArgs e)
at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
Any help would be very appreciated.
Thank you in Advance
Charles