مرجع تخصصی برنامه نویسان

انجمن تخصصی برنامه نویسان فارسی زبان

کاربر سایت

nima nosrati

عضویت از 1394/03/08

مشکل پرینت فایل استیمول سافت در asp.net webform

  • سه شنبه 3 مرداد 1396
  • 20:48
تشکر میکنم

با سلام 

در زمانی که در ویژوال استدیو از استیمول سافت استفاده می کنم بدون هیچ مشکلی پرینت انجام می شود اما وقتی فایل پابلیش شده رو استفاده می کنم با ارور زیر مواجه می شم

پاسخ های این پرسش

تعداد پاسخ ها : 5 پاسخ
کاربر سایت

سهیل علیزاده

عضویت از 1396/04/09

  • سه شنبه 3 مرداد 1396
  • 20:50

متن خطا را قرار دهید.

کاربر سایت

nima nosrati

عضویت از 1394/03/08

  • سه شنبه 3 مرداد 1396
  • 20:52

Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application

[InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.] System.Windows.Forms.Form.ShowDialog(IWin32Window owner) +1780 Stimulsoft.Base.StiExceptionProvider.Show(Exception exception) +142 Stimulsoft.Report.Print.StiPrintProvider.Print(StiReport report, Boolean showPrintDialog, Int32 fromPage, Int32 toPage, Int16 copies, PrinterSettings printerSettings) +3042 Stimulsoft.Report.StiReport.Print(Boolean showPrintDialog, Int32 fromPage, Int32 toPage, Int16 copies, PrinterSettings printerSettings) +470 Stimulsoft.Report.StiReport.Print() +56 Setad.InfraStructure.StimulLetter.Letter(String type, String id, String mounth, String day, String place, String replynumber, String dateEnd, String dateStart, String dateletter) +8894 Setad.SetUnitSoldier.btnPresubmit_OnClick(Object sender, EventArgs e) +235 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +11773405 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +150 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5062

کاربر سایت

سهیل علیزاده

عضویت از 1396/04/09

  • سه شنبه 3 مرداد 1396
  • 20:56

از MessageBox یا مشابه آن استفاده کرده اید ؟

کاربر سایت

nima nosrati

عضویت از 1394/03/08

  • سه شنبه 3 مرداد 1396
  • 21:01

خیر 

   

    public void Letter(string type,string id,string mounth,string day,string place,string replynumber,string dateEnd,string dateStart,string dateletter)
        {
            var personels = _db.Personels.FirstOrDefault(u => u.PersonelNumber == id);
            if (personels!=null)
            {
                string title = place;
                string father = personels.FatherName;
                string personel = personels.PersonelNumber;
                string soldiers = personels.Stripe.StripName + " وظیفه" + " " + personels.Name + " " + personels.Family;
                var now = PersianDateTime.Now;
                var today = now.ToString(PersianDateTimeFormat.Date);
           dateletter =(dateletter == string.Empty) ? today : dateletter;
                var rpt = new Stimulsoft.Report.StiReport()
                rpt.Load(_p.Server.MapPath(type));

rpt.print();

این بخشی از کد هست 

کاربر سایت

emm1353

عضویت از 1395/09/28

  • پنجشنبه 27 دی 1397
  • 11:07

من هم این مشکل دارم بجای پرینت return StiMvcViewer.GetReportSnapshotResult(report) صفحه dialog چاپ stimul بیاورد مستقیم به خروجی چاپگر می دهم 

report.Print(showPrintDialog: false); در publish  خطای زیر را می دهد.

Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

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.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: 

[InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.]
   System.Windows.Forms.Form.ShowDialog(IWin32Window owner) +1850
   Stimulsoft.Base.StiExceptionProvider.Show(Exception exception) +140
   Stimulsoft.Report.Print.StiPrintProvider.Print(StiReport report, Boolean showPrintDialog, Int32 fromPage, Int32 toPage, Int16 copies, PrinterSettings printerSettings) +3003
   Stimulsoft.Report.StiReport.Print(Boolean showPrintDialog, Int32 fromPage, Int32 toPage, Int16 copies, PrinterSettings printerSettings) +443
   Stimulsoft.Report.StiReport.Print() +56
   Working.Controllers.WorkSanadsController.GetReport(Int32 id) +1778
   System.Web.Mvc.<>c__DisplayClass1.<WrapVoidAction>b__0(ControllerBase controller, Object[] parameters) +15
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +229
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +39
   System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +67
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +72
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +386
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
کاربرانی که از این پست تشکر کرده اند

هیچ کاربری تا کنون از این پست تشکر نکرده است

اگر نیاز به یک مشاور در زمینه طراحی سایت ، برنامه نویسی و بازاریابی الکترونیکی دارید

با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)