Print Invoice C# Winforms

Afnan Bashir picture Afnan Bashir · Dec 6, 2010 · Viewed 13.2k times · Source

I have written an application in c# and now i want to print its content in form of invoice as shown in figure i want to print costumer data only once but jobs he has asked to be performed on his car shown in datagrid view should be there in form of list with labour and total labour at the end of invoice. some people suggested to use crystal reports I have never used them so looking for a simpler solution cutting it short how can we print required values from formalt text

Answer

theChrisKent picture theChrisKent · Dec 6, 2010

The easiest and quickest solution is to use the Visual Basic PowerPack's PrintForm control (You can use it in C# projects as well).

http://msdn.microsoft.com/en-us/vbasic/bb735936.aspx

Just drag the control on to your form then from code call

printForm1.Print();

This will print whatever is on the form, so just design your report on a form then call that code, and you're done.