通过使用ActiveReport在客户端打印机打印 [英] Printing at client printer by using ActiveReport

查看:928
本文介绍了通过使用ActiveReport在客户端打印机打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我用asp.net和C#的工作。结果
我使用的ActiveReports在我的系统报告。结果
我曾尝试与显示preVIEW(我的意思是我不使用Web查看到preVIEW的报告,我直接打印报告)打印报告。

Now I am working with asp.net and C#.
I use ActiveReports for reporting in my system.
I have tried to print my report with showing preview (I mean I don't use WebViewer to preview the report and I print the report directly).

MyAR1    rptMyreport = new MyAR1();    
DataTable dtMydata = new DataTable();    
//add some data in dtMydata    
rptMyreport .DataSource = dtMydata;
if (rptMyreport .Document.Printer.PrinterSettings.IsValid)
{
   try
   {
      rptMyreport .Run();
      rptMyreport .Document.Print(false, false, false);
   }
   catch (Exception)
   {
   // do something
   }    
}      
else  
{  
    //show Error Message  
}  

我的问题是...结果
当我打印此报告,它工作在服务器站点的打印机,并在客户端站点打印机无法正常工作。即(我在4楼工作,服务器位于10楼,当我打印报告。这是由10层的服务器站点打印机打印)。我能做些什么来打印在这是客户端PC打印机的报告连接的。

My problem is ...
When I print this report , it works at server site printer and not work in client site printer. i.e ( I am working at 4th floor and server is at 10th floor . When I print the report . It is printed by the server site printer at 10th floor . ) What can I do to print the report at the printer which was the client PC connected.

与问候,

推荐答案

在C#code,你在上面运行在服务器上实际运行,所以这就是为什么服务器的打印机是一个在接收到打印作业。但是,你要在客户机-the一个具有网络浏览器的接收打印作业。要做到这一点,我们提供了多种选择,但最好的一个帮助主题<下一个描述一步一步的文档中href=\"http://www.datadynamics.com/Help/ActiveReports6/ActiveReports6_start.html?arHOWProvideOneTouchPrintingInTheWebViewer.html\"相对=nofollow> WebViewer中(专业版)提供一键打印。
这将导致打印到从使用Web浏览器,而不是在服务器的机器发生

The C# code you are running above is actually running on the server so that is why the Server's printer is the one receiving the print job. However, you want the client machine -the one with the web browser- to receive the print job. To do that we provide several options, but the best one is described step-by-step in the documentation under the help topic Provide One-Touch Printing in the WebViewer (Pro Edition). This will cause the printing to happen from the machine that is using the Web Browser and not the server.

您可以使用Flash以外的其他浏览器的类型,但也有受到浏览器的强制打印对话框出现(以prevent网页从未经同意随机打印)的限制。有关可用选项和限制的更多信息帮助主题<一中描述href=\"http://www.datadynamics.com/Help/ActiveReports6/ActiveReports6_start.html?arWebViewerPrinting.html\"相对=nofollow> Web Viewer的打印选项的。

You can use other viewer types other than Flash but there are limitations imposed by the browser to force the print dialogs to appear (to prevent web pages from randomly printing without consent). More information about the available options and limitations is described in the help topic Web Viewer Print Options.

这篇关于通过使用ActiveReport在客户端打印机打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆