https://social.msdn.microsoft.com/Forums/getfile/854207[
^]
Good day,
as you can see have a link above please click it for you to see.
I want to print that data from datagridview using printdocument without using any connection string connect to database.
I am using printdocument to print text, and here's my code.
e.Graphics.DrawString(dtgREPORT.Rows[l].Cells[1].FormattedValue.ToString(), dtgREPORT.Font = new Font("Arial", 10), Brushes.Black, new RectangleF(0, height, dtgREPORT.Columns[2].Width, dtgREPORT.Rows[0].Height));
What I have tried:
and I tried to create for the image, but it's error because of
FormattedValue.ToString()
and here's my code.
e.Graphics.DrawImage(dtgREPORT.Rows[l].Cells[2].FormattedValue.ToString(), dtgREPORT.Font = new Font("Arial", 10), Brushes.Black, new RectangleF(125, height, dtgREPORT.Columns[2].Width, dtgREPORT.Rows[0].Height));
I hope somebody can help me.