Skip to Content
0

Crystal Report Printing Problem

Jul 05, 2017 at 06:07 PM

22

avatar image

Hi,

I am using vs15. i developed a web application. Try to print the all pages from crystal report, but only single page is print.

i am used below code for printing but not working.

private string GetDefaultPrinter() {

PrinterSettings printerSettings = new PrinterSettings();

foreach (string printer in PrinterSettings.InstalledPrinters)

{

printerSettings.PrinterName = printer;

if (printerSettings.IsDefaultPrinter) return printer;

}

return null;

}

protected void btnPrint_Click(object sender, EventArgs e) {

string printer = GetDefaultPrinter();

crystalReport.PrintOptions.PrinterName = printer;

crystalReport.PrintToPrinter(1, false, 0, 0);

}

Thank you...

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Don Williams
Jul 05, 2017 at 06:09 PM
0
Share
10 |10000 characters needed characters left characters exceeded