随时打印大量报告 [英] Printing a lot of reports at time

查看:54
本文介绍了随时打印大量报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在时间(大约200)打印大量报告时,我的程序会引发异常并且变得如此简单。
在循环中我创建每个报告然后使用PrintToPrinter()方法来打印它,但是我有问题:
1)这很容易,因为我向打印机发送了200个工作。
2)有时会抛出一个Exceptoin

有没有办法加入报告,只有这样才能将一个作业发送到打印机。

打印200个报告我这样做:
for(int i = 0; i ++。i< 200)
{
CRMyReport rep = createNewReport() ;
rep.PrintToPrinter():
}


对不起我的可怜的Enghish,我来自西班牙。
谢谢。

解决方案

您将无法加入报告以仅发送一份工作。


您获得的例外情况是什么?



在您的代码中,您应该通过调用close然后dispose来打印报告对象。


My program throws a exception and comes so easy when I try to print a lot of reports at time ( about 200).
In a loop I create every report and then use PrintToPrinter() method to print that, but I have to problems:
1) It's very easy, because I send to the printer 200 jobs.
2) Sometimes throws a Exceptoin

Is there any way to join reports and in this way only send one job to the printer.

To print 200 reports I do that:
for(int i=0;i++.i<200)
{
   CRMyReport rep = createNewReport();
   rep.PrintToPrinter() :
}


Excuse me for my poor Enghish, I'm from Spain.
Thanks.

解决方案

You will not be able to join the reports to send only one job.

What is the exception that you are getting?

 

From your code, you should be cleaning up the report object once you have printed it by calling close then dispose.


这篇关于随时打印大量报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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