Posted on 2018-10-12 03:34:40
Download Source Code / FileAn Easy way to print c# dataGridView in few seconds. No need to add crystal report. You can create your own template using DGVPrinter. Click on the download button.
dgvprinter printer = new dgvprinter(); printer.title = "my report"; //give your report name printer.subtitleformatflags = stringformatflags.linelimit | stringformatflags.noclip; printer.pagenumbers = true; // if you need page numbers you can keep this as true other wise false printer.pagenumberinheader = false; printer.porportionalcolumns = true; printer.headercellalignment = stringalignment.near; printer.footer = "footer"; //this is the footer printer.footerspacing = 15; printer.printdocument.defaultpagesettings.landscape = true; printer.printdatagridview(datagridview1);