Lenka.Guo 发表于 2017-2-23 17:01:49

szpzr 发表于 2017-2-23 16:52
?

在任何时候调用区域报表都需要调用Run() 这个方法。 //打印List
            for (int j = 0; j < 3; j++)
            {
                rptlist.Run();
                rptlist.Document.Print(true, false, false);

            }

szpzr 发表于 2017-2-23 17:11:18

一直“正在等待localhost"?

Lenka.Guo 发表于 2017-2-23 17:41:16

您可以加断点调试下。

整体思路和接口就是这样。

szpzr 发表于 2017-2-24 08:49:23

开发环境中可以运行,弹出打印设置框不在前端,发布到服务器后,在客户端运行,出现错误:
“/”应用程序中的服务器错误。当应用程序不是以 UserInteractive 模式运行时显示模式对话框或窗体是无效操作。请指定 ServiceNotification 或 DefaultDesktopOnly 样式,以显示服务应用程序发出的通知。
说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。            

异常详细信息: System.InvalidOperationException: 当应用程序不是以 UserInteractive 模式运行时显示模式对话框或窗体是无效操作。请指定 ServiceNotification 或 DefaultDesktopOnly 样式,以显示服务应用程序发出的通知。

源错误:



执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。                  

堆栈跟踪:



   System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner) +3239390   System.Windows.Forms.CommonDialog.ShowDialog() +6   GrapeCity.ActiveReports.Viewer.Win.Printing.PrintImpl.#zs(#q0B documentPrintAdapter, Action`1 action, Boolean useStandardDialog) +355   GrapeCity.ActiveReports.Viewer.Win.Printing.PrintImpl.Print(#q0B documentPrintAdapter, Boolean showPrintDialog, Boolean showPrintProgressDialog, Boolean usePrintingThread, Boolean useStandardDialog, Action`1 action) +92   GrapeCity.ActiveReports.PrintExtension.Print(SectionDocument sectionDocument, Boolean showPrintDialog, Boolean showPrintProgressDialog, Boolean usePrintingThread, Boolean useStandardDialog) +154   GrapeCity.ActiveReports.PrintExtension.Print(SectionDocument sectionDocument, Boolean showPrintDialog, Boolean showPrintProgressDialog, Boolean usePrintingThread) +25   RcXt.Play.ColorCardNew.ButSave_Click(Object sender, EventArgs e) in E:\RcXt\RcXt\Play\ColorCardNew.aspx.cs:603   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9644118   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724                  


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.36373

Lenka.Guo 发表于 2017-2-24 10:50:12

这个好像是在部署IIS 的时候要设置一些属性,我在这边找找资料后给您答复。

szpzr 发表于 2017-2-24 10:54:33

好的,非常感谢!

Lenka.Guo 发表于 2017-2-24 11:51:51

IIS 管理器> Applications Pools > (selected pool) > Advanced Settings... > Process Model > 设置可以访问打印机的用户。

szpzr 发表于 2017-2-24 13:02:27

IIs>应用程序池(选择相应项)>高级设置>进程模型>标识>设置为管理员,是这样设置吗?可是还是这样,再说我想客户端打印。

Lenka.Guo 发表于 2017-2-24 14:14:55

》》可是还是这样,再说我想客户端打印。

是这样设置啊,这样设置之后在客户端就可以正常打印啊,您是设置之后没有起作用??

szpzr 发表于 2017-2-24 14:20:07

帮我看下啊有问题?不好意思!
页: 1 2 [3] 4 5
查看完整版本: 直接打印