Print on a matrix printer.
Because is very difficult to design a report for a matrix printer for print
with the highest speed of the printer (not in graphic mode) with
Reportbuilder, i have done those tricks to solve this problem:
1. every report is designed whit component with the autosize set to false
and correctly aligned;
2. the font is always courier new 12;
3. i don't have any graphics character;
4. when the print process start, my application know that the report is
designed for a matrix printer and automatically print it on a text file
(dtReportTextFile); then this file is loaded into a tstrings and with
the RawPrinter components is printed directly to the matrix printer.
In the preview the reports are always correct.
Unfortunately, when i print those reports on the matrix printer some rows
random disapper or some new blank row appear.
Thanks for any help, i have an accounting project that required to print
correctly to a matrix printer!
Massimo.
with the highest speed of the printer (not in graphic mode) with
Reportbuilder, i have done those tricks to solve this problem:
1. every report is designed whit component with the autosize set to false
and correctly aligned;
2. the font is always courier new 12;
3. i don't have any graphics character;
4. when the print process start, my application know that the report is
designed for a matrix printer and automatically print it on a text file
(dtReportTextFile); then this file is loaded into a tstrings and with
the RawPrinter components is printed directly to the matrix printer.
In the preview the reports are always correct.
Unfortunately, when i print those reports on the matrix printer some rows
random disapper or some new blank row appear.
Thanks for any help, i have an accounting project that required to print
correctly to a matrix printer!
Massimo.
This discussion has been closed.
Comments
You might try the dot matrix export tool that comes with Waler's
TExtraDevices. This could potentially help with the problem you are having.
http://www.waler.com
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
extract the report to the text file.
Infact, if i open with Notepad the text file that is created by
Reportbuilder some rows random disapper or
some new blank rows appear.
Why when i print the report in preview mode is all right and only when i
export the report to a text file, ReportBulder delete some rows and insert
some blank rows?
There is some fix to this problem ?
I think that this problem is very important for all Reportbuilder users that
must print to a matrix printer !
Thanks in advance.
Massimo.
"Nico Cizik (Digital Metaphors) wrote
having.
Rendering a report to a text file and/or matrix printer is much different
than rendering it to your screen. You will need to be sure each line on
your report is positioned so that it can be exported to a text file and is
able to print on a normal text line. Below is an article on printing to a
dot-matirx printer but the same applies for a text file.
-----------------------------------------------
Article: Printing to Dot Matrix Printers
-----------------------------------------------
Dot matrix printers are natively line and character based. Most dot matrix
printers can emulate graphical (i.e. pixel based) printing, but there is
additional overhead which degrades printing speed.
Some options for maximizing performance:
1. Use native printer fonts.
Each dot matrix printer normally has some built-in fonts. You can choose
these fonts when using the ReportBuilder Report Designer. Choose File |
PageSetup and select the dot matrix printer (or optionally use the object
inspector to set Report.Printersetup.PrinterName). The fonts displayed in
Report Designer's font drop down list located on the format toolbar will
display the printer native fonts (indicated by a special printer icon next
to the font name).
2. Vertically position and size objects in 1/6 inch increments.
A standard dot matrix printer can print 66 lines per 11 inch portrait page.
This translates to a line height of 1/6 inch. Therefore the height of each
band should be a multiple of 1/6 as should the size of the margins, the
vertical position of each object etc.
Tip: When designing the report, use the PrinterSetup property to specify a
printer that contains 600 dpi. Then set Report.Units to PrinterPixels. Now
100 pixes = 1/6 of inch when specifying the positions of objects in the
layout.
3. Keep the layout simple, avoid using graphics of any kind.
Alternatives to using the dot matrix printer driver:
1. Use the generic text printer driver.
When using the generic text printer you will need to use the courier or
courier new font and apply the layout techniques described above.
2. Use ReportBuilder's ReportTextFile device output format.
This ReportTextFile device can exports the report to a .txt file which you
can then send to the printer. Demo dm0107.pas in the main reports demo app
shows an example of printing a report to a .txt file and previewing the
results.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com