Remove option to Print to PDF

2019-07-01 22:41发布

When clicking the print button for my Crystal report, I see this:

enter image description here

I don't want to Export to PDF first, I just want to print immediately when the Print button is pushed. How can I configure this behavior?

1条回答
Lonely孤独者°
2楼-- · 2019-07-01 23:38

Sounds like you want to use the PrintToPrinter method. According to MSDN:

Prints the specified pages of the report to the printer selected using the PrintOptions.PrinterName property. If no printer is selected, the default printer specified in the report will be used.

You'll need to pass the number of copies, whether or not it should be coallated, and the start/end pages as parameters. Something like:

public void PrintToPrinter (5, false, 1, 3);
查看更多
登录 后发表回答