使用Crystal Report打印DotMatrix [英] Print DotMatrix Using Crystal Report
问题描述
朋友,我已经使用C#和Crystal Report XI创建了一个发票Windows应用程序...我想在Dotmatrix中生成报告.我已经创建了Crystal Report,并且可以在Laser打印机中很好地打印.我可以使用Crystal Report在Dotmatrix中进行打印而无需进行缓慢的处理..
在此先感谢...
Hi Friends I''ve Creating an Invoice Windows Application using C# and Crystal Report XI...I want to generate Report in Dotmatrix..I''ve already Created Crystal Report and its Print fine in Laser printer..How can i Print in Dotmatrix using Crystal Report Without Slow Process..
Thanks in Advance...
推荐答案
请阅读以下文章:
http://blog.mayurtendulkar.com/2010/07/experience-with-crystal- report.html [ ^ ]
然后:
http://www.techrepublic.com/forums/questions/crystal -reports-printing-on-dot-matrix-printers/ [
Please read following article below:
http://blog.mayurtendulkar.com/2010/07/experience-with-crystal-reports.html[^]
and it:
http://www.techrepublic.com/forums/questions/crystal-reports-printing-on-dot-matrix-printers/[^]
Regards,
Alex.
要使用dotmatrix打印机进行快速打印,必须将原始字节发送到打印机.我会这样做的:
1.使用以下代码将rpt文件导出为txt:
Hi,
To get fast printing with a dotmatrix printer, you have to send raw bytes to the printer. I''d do this:
1. Export the rpt file to txt by using this snipped code:
ReportDocument myReport = new ReportDocument();
myReport.Load(Server.MapPath("~/MyReport.rpt"));
string txtReportContent = null;
using (MemoryStream ms = (MemoryStream)myCrystalReport.ExportToStream(ExportFormatType.Text))
{
txtReportContent = System.Text.Encoding.UTF8.GetString(ms.ToArray());
}
2.安装Windows附带的"Generic/Text Only"驱动程序,并将其附加到您的dotmatrix打印机上.
3.使用此代码在 http://support.microsoft.com/kb/322091 [ ^ ]并为其指定txtReportContent和打印机名称
2. Install the "Generic / Text Only" driver that comes with Windows and attach it to your dotmatrix printer
3. Use this the code available at http://support.microsoft.com/kb/322091[^] and specify to it the txtReportContent and the printer name
这篇关于使用Crystal Report打印DotMatrix的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!