0

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

user_rhee
  • 55
  • 1
  • 12

1 Answers1

0

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;

Vijunav Vastivch
  • 4,153
  • 1
  • 16
  • 30
  • Yes I have checked them, using Windows 2008 server for server and other nodes are using Windows7 professional or above. I have used crystal report runtime for 64bit in all nodes. the problem is that crystal report is not breaking after first page. – user_rhee Jul 27 '16 at 00:49
  • what do you mean not breaking..can you add some sample image here? – Vijunav Vastivch Jul 27 '16 at 00:57
  • paper size is half of an A4 page,So the data prints in the first page and then goes on printing to the second page and then stops. the second page will be blank . but printing is not stopping.. It stops printing only after second page. – user_rhee Jul 27 '16 at 01:02
  • as you've said above, this is happen in the deployment machine, but its working fine in your development machine? – Vijunav Vastivch Jul 27 '16 at 01:06
  • try to check server Microsoft Visual c++ Redistributable and compare it on your working machine.. – Vijunav Vastivch Jul 27 '16 at 01:14
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/118370/discussion-between-reds-and-user-rhee). – Vijunav Vastivch Jul 27 '16 at 01:16