Board index » delphi » Dot Matrix Reports

Dot Matrix Reports

Hey guys,

I am currently struggling to get a report to print on a dot matrix printer.
It treats the report as a graphic report. I can't seem to get the printer to
just print quickly. Speed of the report is imperative and it has a lot of
detail on it. I have given up using QuickReports and have started doing
everything in code.

If anyone has any idea's as to how I can speed a report up, please let me
know.

Thanks

Ryan

 

Re:Dot Matrix Reports


On Wed, 12 Feb 2003 15:30:39 +0200, "Ryan Gill"
<r...@healthbridge.co.za> waffled on about something:

Quote
>Hey guys,

>I am currently struggling to get a report to print on a dot matrix printer.
>It treats the report as a graphic report. I can't seem to get the printer to
>just print quickly. Speed of the report is imperative and it has a lot of
>detail on it. I have given up using QuickReports and have started doing
>everything in code.

>If anyone has any idea's as to how I can speed a report up, please let me
>know.

Sounds like everything is going through the windows printer drivers
and being formatted into bitmap graphic format, which is how most
things get printed.

If you want to print in raw text using the printers native font you
just send the ascii characters direct to lpt1.

Unfortunately I have no experience of doing this from Delphi, I've
never printed anything from a Delphi app...

One thing I know that works however is actually doing
COPY filename.txt LPT1
from a command prompt.

So you could create the txt file from Delphi, then shell the copy
command. Hardly elegant, but it might get you out of trouble.

There are a few standard codes for extra features, but probably the
only one you'll need is #12 for page feed. There'll be other ones for
changing font and setting tab positions (#9 for next tab position) in
the printer manual.

I'm sure there's a nice way of doing it from Delphi (which someone
will post), but as I mentioned I've never done it, and I don't have a
printer plugged into my PC at the mo, so I can't even experiment.

Dodgy.
--
MUSHROOMS ARE THE {*word*202} OF THE MOOSES

Re:Dot Matrix Reports


Quote
Dodgy wrote:

> One thing I know that works however is actually doing
> COPY filename.txt LPT1
> from a command prompt.

Google finds links to previous postings to those examples, how
to print directly to LPT port.
http://groups.google.com/groups?as_q=writeln%20lpt1%20reset%20textfil...

If you want to make it look slightly more like Windows printing
style, you'll have to do the printing using Win API Escape
and ExtEscape calls. Samples about these also available
from Google.

But with both these LPT and Escape methods, you'll of course
have to forget QuickReport, and do all the print formatting
by hand.

Markku Nevalainen

Re:Dot Matrix Reports


You might be able to print faster if you define the printer as
"Generic/Text" instead of the actual printer model.  This driver sends only
the text part ot the pritner.

It will either work well or make the output look like {*word*99} (and you'll be
able to do little to fix that).

-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
   http://www.newsfeed.com       The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----

Re:Dot Matrix Reports


Hehe, I was thinking the speed issue was because of the dot matrix trying to
print graphics...  You may be right!

-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
   http://www.newsfeed.com       The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----

Re:Dot Matrix Reports


On Thu, 13 Feb 2003 06:50:12 -0800, "Gabriel Gonzalez"

Quote
<no-s...@no-spam.com> wrote:
>Hehe, I was thinking the speed issue was because of the dot matrix trying to
>print graphics...  You may be right!

But I expect it *is* because it is trying to print graphics
- after it has gone through the Spooler

A simple test sending 56 lines of 'Hullo World' then Chr(12) to the
printer will show what is causing the delay

Quote

>-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
>   http://www.newsfeed.com       The #1 Newsgroup Service in the World!
>-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----

Re:Dot Matrix Reports


There is a text only report writer out there, but I cannot remember the name
of it.  I looked like it was a banded report writer similar to QR but output
was text only.  Do a google or search www.torry.net  for "Dot Matrix",
"Report Writer".

Sorry, couldn't be more help,

Lee

Other Threads