水晶报表到点矩阵 [英] Crystal report to dot matrix
本文介绍了水晶报表到点矩阵的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好!
我正在使用Crystal Reports直接将报告打印到打印机.将报告发送到打印机后,它将始终打印A4尺寸.以下是我使用的代码:
Hi there !
I am using Crystal Reports to print a report directly to the printer. When the report is sent to the printer, it always prints A4 size. Below is the code I''m using:
Dim pd As New PrintDocument()
pd.DefaultPageSettings.PaperSize = New System.Drawing.Printing.PaperSize("Reserved48", 280, 3276)
Cmd.Connection = Con
Cmd.CommandTimeout = 0
Cmd.CommandType = CommandType.Text
SQL = " Select * from City "
Cmd.CommandText = SQL
DA.SelectCommand = Cmd
DA.Fill(DS, "Rep")
oReport = New CrystalDecisions.CrystalReports.Engine.ReportDocument
oReport.PrintOptions.CustomPaperSource =
Dim strSystemName As String = "\\main\"
Dim strPrinterName As String = "EPSONLQ-"
oReport.PrintOptions.PrinterName = strSystemName & strPrinterName
oReport.PrintOptions.PrinterName = printername
Dim doctoprint As New System.Drawing.Printing.PrintDocument()
doctoprint.PrinterSettings.PrinterName = "\\main\" '(ex. "Epson SQ-1170 ESC/P 2")
Dim i As Integer
oReport.Load("d:\Invoice.rpt")
Response.Write(oReport.PrintOptions.PageContentHeight)
Response.Write(oReport.PrintOptions.PageContentWidth)
oReport.Database.Tables(0).SetDataSource(DS.Tables("Rep"))
oReport.PrintOptions.PaperSize = CType(System.Drawing.Printing.PaperKind.Custom, CrystalDecisions.Shared.PaperSize)
oReport.PrintToPrinter(1, False, 0, 0)
所需的尺寸为3 x 9英寸.请在这方面指导我.
The desired size is 3 by 9 inches. Please guide me in this. Thanks in advance!
推荐答案
我已经在上个月回答了此类问题.
水晶报告更改纸张尺寸 [水晶报告:调整纸张大小 [ ^ ]
Already I have answered for this kind of question on last month.
Crystal report change paper size[^]
Also take a look at this one
Crystal report: resizing papersize[^]
这篇关于水晶报表到点矩阵的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文