how i generate invoice bill like this using report or any other way please see link for image ......
http://www.codeproject.com/KB/cs/PrintInvoice_CS/Img027.JPG[
^]
i take products details form DatagridView and add to the listView
id>> product name>> quantity >> price
1 >> abc >> 1 >> 12
2 >> abc >> 5 >> 15
this all info i store in listView like above. now tell me how this listview data show in my invoice .
this is my print view code
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawString("Invoice No: " + txtInvoiceNo.Text, new Font("Arial", 12, FontStyle.Regular), Brushes.Black, new Point(25, 180));
e.Graphics.DrawString("Invoice Date: " + DateTime.Now, new Font("Arial", 12, FontStyle.Regular), Brushes.Black, new Point(25, 220));
e.Graphics.DrawString(label1.Text, new Font("Arial", 12, FontStyle.Regular), Brushes.Black, new Point(25, 250));
e.Graphics.DrawString("Item No", new Font("Arial", 12, FontStyle.Regular), Brushes.Black, new Point(25, 280));
e.Graphics.DrawString("Product Name", new Font("Arial", 12, FontStyle.Regular), Brushes.Black, new Point(180, 280));
e.Graphics.DrawString("Quantity", new Font("Arial", 12, FontStyle.Regular), Brushes.Black, new Point(400, 280));
e.Graphics.DrawString("Unit Price", new Font("Arial", 12, FontStyle.Regular), Brushes.Black, new Point(550, 280));
e.Graphics.DrawString("Total Amount", new Font("Arial", 12, FontStyle.Regular), Brushes.Black, new Point(670, 280));
e.Graphics.DrawString(label1.Text, new Font("Arial", 12, FontStyle.Regular), Brushes.Black, new Point(25, 300));
e.Graphics.DrawString("Total:", new Font("Arial", 12, FontStyle.Regular), Brushes.Black, new Point(550, 400));
e.Graphics.DrawString("Rs." + txtSubTotal.Text, new Font("Arial", 12, FontStyle.Regular), Brushes.Black, new Point(670, 400));
e.Graphics.DrawString(label1.Text, new Font("Arial", 12, FontStyle.Regular), Brushes.Black, new Point(25, 380));
}