且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从VB.Net 2008中的DataGridView打印数据

更新时间:2023-10-19 22:03:22

您尝试了什么?标准打印代码应该可以解决这个问题,您只是在打印屏幕上的内容,对吧?
What have you tried ? Standard printing code should handle this, you''re just printing what''s on screen, right ?


我建​​议您搜索GDI +上的文章,尤其是诸如DrawString之类的方法, DrawRectangle等.如果您想从头开始创建自己的报告,则还需要阅读有关PrintDocument类和PrintPreview的文章.从DataGridView获取数据与从其他任何地方获取数据没有什么不同.

Happy Coding
I suggest that you search for articles on GDI+, in particular methods such as DrawString, DrawRectangle etc. You would also need to read articles on the PrintDocument class and PrintPreview, if you want to create your own reports from scratch. Getting the Data from a DataGridView is no different than getting your Data from anyplace else.

Happy Coding


一个简单的google搜索或在此站点上的搜索将提供有关如何执行此操作的大量信息.如果您不了解如何进行类似的简单搜索,那么您就错了.如果只是不确定要使用哪些关键字,那么您的业务有误.

我们不从事为某人做研究的业务.如果需要,请雇用研究助理.

如果您对某些代码有特定问题,或者在实现某些代码时遇到问题,请随时提出这些问题,我们将竭诚为您服务.但是,当您提出的问题如此基本,以至于google的***结果可以为您提供所需的所有信息时,我们就不会乐于提供帮助.
a simple google search or a search on this site will provide a wealth of information on how to do just that. If you don''t understand how to do a simple search like that, then you''re in the wrong business. If you''re just not sure what keywords to use, then you''re in the wrong business.

We''re not in the business of doing research for someone. If you want that, hire a research assistant.

If you have specific questions about some code, or if you are having issues implementing some code, then feel free to ask those questions and we will gladly try to assist you. But when you ask a question that is so basic that the top result in google can give you all of the information you would need, we don''t feel inclined to help.