c#FastReport打印机设置,设置打印机名(FastReport版本 2013.2.5)
以下是FastReport打印机名设置的代码
//*************************************************************************
void setprint()//这是一个方法
{
DialogResult Resultm = printDialog1.ShowDialog();
report1.PrintSettings.Printer = printDialog1.PrinterSettings.PrinterName;//这句是打印机设置
label9.Text = “当前打印机:” + printDialog1.PrinterSettings.PrinterName;
label9.Left = comboBox1.Left - label9.Width - 3;
if (Resultm == DialogResult.OK)
{
printm();
//MessageBox.Show("点了取消");
}
}
//*******************************************************************************
说明:实现FastReport打印机设置的前提条件,加打印机对话框printDialog控件,第1次添加时控件名称为printDialog1;添加report控件,添加report控件实例有两种方法,通过代码添加及通过工具箱添加,代码添加方法:FastReport.Report report1 = new FastReport.Report();当然,用代码添加首先得引入相应的包件,包件引用方法为
1、右键点击引用

本文介绍了如何在C#中使用FastReport 2013.2.5版本设置打印机名。通过printDialog1控件显示打印机选择对话框,并将选定的打印机设置到FastReport的PrintSettings中。实现这一功能需要先添加printDialog和report控件,引用FastReport库,并创建FastReport.Report的实例。
最低0.47元/天 解锁文章
1107

被折叠的 条评论
为什么被折叠?



