采用C#语言写哦
tableRow 怎么TableCell怎么加到table里
C#怎么使用table
关注:247 答案:2 手机版
解决时间 2021-02-26 10:17
- 提问者网友:心魅
- 2021-02-25 09:51
最佳答案
- 二级知识专家网友:他拾裏鰅妳
- 2021-02-25 11:00
大约是这个样子的
Table TB = new Table();
TableRow TR = new TableRow();
TableCell TC = new TableCell();
TR.Cells.Add(TC);
TB.Rows.Add(TR);
具体请阅读MSDN,上面非常明白
Table TB = new Table();
TableRow TR = new TableRow();
TableCell TC = new TableCell();
TR.Cells.Add(TC);
TB.Rows.Add(TR);
具体请阅读MSDN,上面非常明白
全部回答
- 1楼网友:白胡子大佬
- 2021-02-25 11:33
myreport= new report(); //实例化一个报表已经做好的报表
myreport.setdatasource(加载数据集);
//获取打印设置上面打印机名称
myreport.printoptions.printername = printdialog1.printersettings.printername;
//设置打印机纸张 下面这句要不要无无谓,在我看来,不起作用
myreport.printoptions.papersize = crystaldecisions.shared.papersize.papera4;
//直接打印
myreport.printtoprinter(printdialog1.printersettings.copies(获取打印份数), false, 0, 0);
到此也可以打印,可是每次打印的时候出来的都是默认纸盒1的纸张,也可就是说在打印之前的页面设置,仅打印机名起了作用,其它不起作用,不管你之前页面设置是纸盒1还是纸盒2上,每次都从纸盒1进纸,我想问问大家如何根据页面设置动态的选择纸盒来源。
myreport.printoptions.papersource =在这里应该怎么赋值;
//我是这样赋值,提示不能隐式转换类
myreport.printoptions.papersource =myprintdg.printersettings.papersources;
具体赋值信息如下
report.printoptions.papersource=xxx
auto 打印纸张来源于打印机自动选择的纸盒。
cassette 打印纸张来源于 cassette 纸盒。
envelope 打印纸张来源于 envelope 纸盒。
envmanual 打印纸张来源于手动信封送纸器。
formsource 打印纸张来源于格式源纸盒。
largecapacity 打印纸张来源于大容量纸盒。
largefmt 打印纸张来源于大号纸盒。
lower 打印纸张来源于 lower 纸盒。
manual 打印纸张来源于 manual 纸盒。
middle 打印纸张来源于 middle 纸盒。
smallfmt 打印纸张来源于小号纸盒。
tractor 打印纸张来源于 tractor 送纸器。
upper 打印纸张来源于 upper 纸盒。
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!