zoukankan
html css js c++ java
(原)XtraGrid打印过程中不同的报表使用不同的打印机
场景:
系统内各种报表格式、大小均不统一,有用A4纸的,有A3纸的,而各部门配置的打印机又不同,所以需要根据报表的大小可以指定不同的打印机。
解决方法:
1、
XtraReport 有
PrinterName 属性,在打印之前指定即可,如不指定则为系统默认打印机
。
2、取系统中所有打印机
private
void
sBtnRefresh_Click(
object
sender, EventArgs e)
{
foreach
(String pkInstalledPrinters
in
PrinterSettings.InstalledPrinters)
{
cbEditPrinter.Properties.Items.Add(pkInstalledPrinters);
}
cbEditPrinter.Properties.Sorted
=
true
;
}
3、指定不同的报表使用不同的打印机。
private
void
sBtnPrint_Click(
object
sender, EventArgs e)
{
XtraReport1 xr
=
new
XtraReport1();
xr.PrinterName
=
cbEditPrinter.Text;
xr.Print();
}
private
void
sBtnPrint3_Click(
object
sender, EventArgs e)
{
XtraReport3 xr
=
new
XtraReport3();
xr.PrinterName
=
cbEditPrinter.Text;
xr.Print();
}
private
void
sBtnPrint2_Click(
object
sender, EventArgs e)
{
XtraReport2 xr
=
new
XtraReport2();
xr.PrinterName
=
cbEditPrinter.Text;
xr.Print();
}
查看全文
相关阅读:
Practice II 字符串
Euleriar Path 入门
2-SAT 入门
Practice I 图论
游戏中寻找学习JAVA的乐趣之坦克大战系列5-坦克的动态参数
JQuery教程:实现轮播图效果
HTML表格应用
菜鸟Vue学习笔记(三)
Java成神路上之设计模式系列教程之一
JVM垃圾回收机制之对象回收算法
原文地址:https://www.cnblogs.com/spymaster/p/950707.html
最新文章
[poj] 3974 Palindrome
[codeforces] 633C Spy Syndrome 2
[poj] 1816 Wild words
[poj] 2945 Find the Clones
[codeforces] 526D [51nod] 1554 欧姆诺姆和项链
[poj] 3461 Oulipo
[poj] 2749 building roads
[poj] 3678 Katu Puzzle
[poj] 2942 Knights of the Round Table
[poj] 1523 SPF
热门文章
[poj] 3177 Redundant Paths
[poj] 1236 networks of schools
[poj] 3180 the cow prom
[poj] 2618 popular cows
poj1006 Biorhythms
poj2720 Last Digits
CF449C Jzzhu and Apples
poj3090 Visible Lattice Points
poj3421 X-factor Chains
poj2689Prime Distance
Copyright © 2011-2022 走看看