Click here to Skip to main content
15,905,616 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to print selected columns from access database on click of the print button which is in my form ...
for example i have two columns name and age ..on click of the button it print two columns.
Posted

It is the same as any other print job in .NET - try MSDN for a tutorial on how to, or have a look at Printing a DataGridView on DotNet Framework[^]

I haven't tried it, but it looks like it works.

This is way to complex to give as a quick answer...
 
Share this answer
 
There is a a complex way and a simple but dirty way.
The complex way requires you to know the layout, pass it on to print dialogs, etc. The simple way just requires you to save the datagridview to an excel file and print it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900