Page 1 of 1

Report without Print Dialog shown craches at customer site

Posted: Mon Apr 23, 2012 7:30 am
by Tapir
Hi I have a report generated on using the Stimulsoft Web.
So a web page generates a report dynamically and sends it to the printer:

Stimulsoft.Report.StiReport report = new Stimulsoft.Report.StiReport();
report.Load(Server.MapPath( Page.ResolveUrl(@"~/Reports/CIAOReport.mrt")));
DataSet roster = Session["roster"] as DataSet;
UpdateLabels(report);
report.RegData(roster.COB);
report.Compile();
report.Print(false);
}

This works fine when i test this on my enviroment
But the customer gets the following exception


Application information:
Application domain: /LM/W3SVC/1/ROOT/CrewOS-1-129796442310552154
Trust level: Full
Application Virtual Path: /CrewOS
Application Path: C:\inetpub\wwwroot\CrewOS\
Machine name: VVIEIGN03

Process information:
Process ID: 4192
Process name: w3wp.exe
Account name: IIS APPPOOL\ASP.NET v4.0 DefaultAppPool

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 CrewOS.CheckInCheckOut.PrintTheRoster()
at CrewOS.CheckInCheckOut.InitPage()
at CrewOS.CheckInCheckOut.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Is this because some restrictions so it cant read printer settings, or?

Thanx

Report without Print Dialog shown craches at customer site

Posted: Wed Apr 25, 2012 2:40 am
by Alex K.
Hello,

In this case, it turns out that the printing is called on the server.
For a web application it will not be possible to do so on the client. Please read the article from our knowledgebase:
http://stimulsoft.helpserve.com/index.p ... icleid=310

Thank you.