print data grid view
-
2012年3月23日 19:07
hi i have data grid view in vb 2008 i need to print it without use report ???
can i do ???? how ???
すべての返信
-
2012年3月26日 3:56モデレータ
Hi Mustafa_it,
Welcome to the MSDN forum.
How to print the data of datagridview is a FAQ. And you can find lots of information in MSDN forum.
In general, there are two solutions:
1. Using the print the function or class provide by .Net.
You can print out the form with your datagridview using Print Form powerpack: http://social.msdn.microsoft.com/forums/en-US/vbpowerpacks/thread/ee619ae3-a437-46b6-9045-b2848e40e20a/
If you want to print the contents in datagridview, the printdocuments class can be the one you are looking for: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx
2. Another solution is exporting the data into EXCEL or Word, and use the print function form Office, here is also a sample: http://social.msdn.microsoft.com/Forums/en-US/vblanguage/thread/388f5779-3f4c-4b49-940c-e02e2eb62af2
By the way, here also some project samples for printing datagridview.
Printing a DataGridView on DotNet Framework: http://www.codeproject.com/Articles/25638/Printing-a-DataGridView-on-DotNet-Framework
Another DataGridView Printer: http://www.codeproject.com/Articles/18042/Another-DataGridView-Printer
Hope this helps.
Mark Liu-lxf [MSFT]
MSDN Community Support | Feedback to us
- 回答としてマーク Mark Liu-lxfModerator 2012年4月3日 6:30
-
2012年4月3日 6:31モデレータ
Hi Mustafa_it,
We haven’t heard from you for several days. I’d like to mark my reply as answer firstly. If you have any additional questions, you also can unmark the replay and post your question here.
Sorry for any inconvenience and have a nice day.
Mark Liu-lxf [MSFT]
MSDN Community Support | Feedback to us

