在设计的时候将printoptions中的ShowDialog设置为false,但调用print方法直接打印时仍然弹出打印设置的窗口。解决办法:
在打印前用代码重新设置下这个属性为false即可,也就是在设计器设计是不起作用的:
autoRpt.PrepareReport;
//autoRpt.ShowReport;//打印预览
autoRpt.PrintOptions.ShowDialog := False;
if autoRpt.Print then updateState(lID);