Click here to Skip to main content
15,745,973 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

Experts,I have developed an application in C#,it is printing a crystal report through HP printer but not through the Dot Matrix Printer.

Is there any problem with the code...? Or is it something else....?

No exception or error is raised.

Please Help me.

The code is :
C#
rptTML.Database.Tables[0].SetDataSource(g_DT);
rptTML.PrintToPrinter(1, false, 1, 1);
Posted
Updated 28-Feb-12 1:36am
v2

1 solution

If your printer has driver to install, then you can use normal Windows print system. Most printers, including POS ones, have working Windows drivers available. (Most dot-matrix printers are Epson compatible anyway.) Some POS printer drivers allow send escape codes directly to printer too (using special fonts); probably you don't need such functionality.

If this is not the case, then you can add Generic/Text Only printer (driver) with help of Add Printer Wizard. Once done, you can configure certain commands (escape sequences) for it - Font size 10/12/17, Bold on/off, Underline on/off, job start/stop, paper feed and size select.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900