Click here to Skip to main content
14,699,126 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,
I need to make direct print a report for a custom paper size, I have set a paper size in
Epson Lx -310 Print server properties , when i sent print command it does not produce print as I expected and it produce Letter size print out. here I attached my coding as well and please help me to find a solution for this issue.

What I have tried:

string refNo = txtTiketNo.Text.Trim();
                        frmPreviewReports Preview = new frmPreviewReports();
                        var cr = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
                        cr.Load(MainClass.reportDirPath + @"\" + @"Direct Print\" + "SupplierReceiptNew.rpt");
                        cr.SetDatabaseLogon("DBusername", "dbpassword");
                        cr.RecordSelectionFormula = "{TIKET_DATA.TiketID} = '" + refNo + "'";
                        cr.PrintToPrinter(1, true, 0, 0);
Richard MacCutchan 24-Sep-20 7:58am
You need to set the paper size in the Crystal Report settings.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900