hello
i want to print crystal report generated from VB in Dos Mode
please can anyone help me
Thanx for prompt response
Printable View
hello
i want to print crystal report generated from VB in Dos Mode
please can anyone help me
Thanx for prompt response
Hi. If you want to print to a DOS printer, then you need to send all the data, line by line, to the printer. If you need to use the different fonts that the printer has built in, then you send them also, by using escape codes. Generally, escape codes will be a Chr(27), followed by the codes that you want to use. For instance, to get italic on a typical printer using Epson LQ-850 emulation, you would send this:
Now to turn Italic off, do this:Code:Print #1, Chr(27); Chr(52); 'italic on
To print an entire page of data, you will need to do all the formatting yourself, which is not that big a deal once you get the hang of it.Code:Print #1, Chr(27); Chr(53); 'italic off
Here are some codes you may want to use:
Have fun!!Code:Print #1, Chr(27); Chr(64); 'reset
Print #1, Chr(27); Chr(67); Chr(32); 'page length in lines
Print #1, Chr(27); Chr(107); Chr(3); 'font
Print #1, Chr(27); Chr(77); 'pitch 12
Print #1, Chr(27); Chr(119); Chr(1); Chr(14); 'double high & wide
Print #1, Chr(27); Chr(120); Chr(1); 'letter quality
Print #1, Chr(27); Chr(65); Chr(5); '5/60 inch line feed
Print #1, Chr(27); Chr(52); 'italic
Print #1, Chr(27); Chr(53); 'italic off
Print #1, Chr(27); Chr(119); Chr(0); Chr(20); 'double high & wide off
Print #1, Chr(27); Chr(48); '1/8 inch line feed