0
votes

i am using Crystal Report 11i for my VS2010 application. Now there is an EPSON 350 dot matrix printer installed in the client place and it is causing problems for me. The report is supposed to print in 21.5cmx14cm. I had created a new form "receiptprint" in Windows--> Printer properties with dimensions 21.5cm and 14cm.

I have then assigned this form to the - EPSON printer page properties.

In crystal reports,Page Setup, selected the form "receiptprint".

In my local PC(developer PC), it shows the correct preview with all contents aligned within the custom paper size.

But when deployed to the client site, its still printing as A4, with page break appearing only after second page (like tow half A4 pages).

I have created the form "receiptprint" and assigned to EPSOM printer in one of the node PC, but still its not printing correctly. Data is printing in half page (which is correct) but page doesn't break there, moves to one more page (like A4 page) and then breaks.

in VS code, i have used

Dim c As Integer
    Dim doctoprint As New System.Drawing.Printing.PrintDocument()
    doctoprint.PrinterSettings.PrinterName = "EPSON LQ 350"
    Dim rawKind As Integer
    For c = 0 To doctoprint.PrinterSettings.PaperSizes.Count - 1
        If doctoprint.PrinterSettings.PaperSizes(c).PaperName = "receiptprint" Then
            rawKind = CInt(doctoprint.PrinterSettings.PaperSizes(c).GetType().GetField("kind", Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic).GetValue(doctoprint.PrinterSettings.PaperSizes(c)))
            Exit For
        End If
    Next

    Report1.PrintOptions.PaperSize = CType(rawKind, CrystalDecisions.Shared.PaperSize)
    frmPreview.CrystalReportViewer1.ReportSource = Report1
    Report1.PrintToPrinter(1, False, 1, 1)

Any help please, stuck with this for more than a week now. TIA

1

1 Answers

0
votes

Please check printer settings first on the deployed machine,Drivers,.net framework and run time also(same with crystal report run time), consider also the windows using if it 32 or 64 bit.

Hope it could help you;