Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hello Guys,my problem is when i print a receipt so i get blank receipt there is no data in receipt please help me or give me the best idea to make receipt in c#

What I have tried:

Console.WriteLine("-------------------------------");
Console.WriteLine("First Name | Last Name  |   Age");
Console.WriteLine("-------------------------------");
Console.WriteLine(String.Format("{0,-10} | {1,-10} | {2,5}", "Bill", "Gates", 51));
Console.WriteLine(String.Format("{0,-10} | {1,-10} | {2,5}", "Edna", "Parker", 114));
Console.WriteLine(String.Format("{0,-10} | {1,-10} | {2,5}", "Johnny", "Depp", 44));
Console.WriteLine("-------------------------------");
Posted
Updated 6-Jan-17 9:28am
Comments
Tomas Takac 7-Jan-17 7:50am    
No idea what you are asking for. This is the output I get from your code, it's definitelly not empty:
-------------------------------
First Name | Last Name  |   Age
-------------------------------
Bill       | Gates      |    51
Edna       | Parker     |   114
Johnny     | Depp       |    44
-------------------------------

1 solution

You do know that you're printing this to the console and not a printer, correct?

Apart from that, there is too little information to go on. If this is the code you're actually using to "print" a receipt, you've got huge problems.

If not, we need to see the code you're using and what printer you're using to have any chance of helping you.
 
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