Printing a database
I would like to print all the tables in my database in my program which holds the databases and works with them, Any suggestions?
Thanks
Anthony
I would like to print all the tables in my database in my program which holds the databases and works with them, Any suggestions?
Thanks
Anthony
you can use the System.Drawing.Printing namespace/classes to print to printer:
http://msdn2.microsoft.com/en-us/library/5ekk3hse.aspx
http://msdn2.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx
Thanks for the link, unfortunately ive been there... I received this from a discussion on here...but it doesnt quite work...and another unfortunate fact is that im not a very skilled programmer. =( Im learning though. =)
' Dim line As String
' For Each row As DataGridViewRow In CustomersDataGridView.Rows'line = String.Empty'For Each cell As DataGridViewCell In row.Cells' line += cell.Value.ToString() & vbNewLine' Next' Dim font As New Font("Times New Roman", 12)' Dim brush As Brush = Brushes.Black' Dim x As Single = 20' Dim x2 As Single = 100' Dim y2 As Single = 100' Dim y As Single = 20' e.Graphics.DrawString(line, font, brush, x2, y2)' NextIll settle with anything really...maybe a way to generate a text file from the database, then print the text file...
Or perhaps, put all of the information into a rich text box, or some other type of object...I would just really like to be able to print...
thanks in advance
VS2005 is .NET 2.0, not 1.1. Anything in 1.1 code can usually be done in .NET 2.0 unless otherwise stated in the articles/documentation
take a look at this:
http://www.codeproject.com/vb/net/datagridex.asp
its .NET 1.1 but should be the same for .NET 2.0, just changing the name of the components and its properties.