本文介绍了在水晶报告中给出份数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我在水晶报告中编写了直接打印到打印机的代码。它默认打印一份。但我想从用户那里取输入号码并将该号码传递给代码打印用户提到的份数。 我尝试了什么: i搜索但没找到合适的答案解决方案 包含库:使用System.Drawing.Printing; 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); 这是我运行的代码你现在遇到的同样问题。希望它对你有所帮助。 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 解决方案 Include library: using System.Drawing.Printing;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. 这篇关于在水晶报告中给出份数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-11 04:09