Click here to Skip to main content
15,796,456 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I wrote code to print directly to printer in crystal reports. it is by default printing one copy.but i want to take input number from user and pass that number to code to print number of copies mentioned by user.

What I have tried:

i searched for that but not find any suitable answer
Posted
Updated 2-Aug-17 2:42am
v2
Comments
[no name] 2-Aug-17 7:43am    
please don't forget to mark my good rating. :)

1 solution

Include library:
using System.Drawing.Printing;


C#
PrinterSettings printerSettings = new PrinterSettings();
printerSettings.DefaultPageSettings.PrinterSettings.PrintRange = PrintRange.SomePages;
                    printerSettings.DefaultPageSettings.PrinterSettings.FromPage = Convert.ToInt32(PrintFromOrignal.Text);
                    printerSettings.DefaultPageSettings.PrinterSettings.ToPage = Convert.ToInt32(PrintToOrignal.Text);


It's my running code for the same issue that you have right now. Hope it will helpful for you.
 
Share this answer
 
Comments
[no name] 2-Aug-17 7:44am    
Please don't forget to mark my good rating. :)

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