如何保存报表.文档.打印机设置?
我想将 Report.Document.Printer 设置存储在数据库中, 我怎样才能保存它? 有没有类似 Report.SaveLayout() 方法的方法?
I want store the Report.Document.Printer settings in a database,
how can I Save it?
Is there any way like the Report.SaveLayout() method?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
没有像 SaveLayout 这样的内置保存方法,但您可以自己将这些设置保存到文本或 XML(例如)中,以保存在数据库中并稍后手动重置它们。
您可以在 打印机类文档页面。根据您的需要,您只需从数据库(文本/xml)中检索这些设置,而不是像示例中那样对它们进行硬编码。
There is no built in save method like SaveLayout, but you could save these settings yourself into text or XML (for example) to save in your database and manually reset them later.
You can see an example of setting those properties in the Printer class documentation page. For your needs, you would just retrieve those settings from your database (the text/xml) instead of hard coding them as is done in the example.
尝试 PrintDocument.PrinterSettings
try PrintDocument.PrinterSettings