Home Devices
New Blog Posts: Merging Reports - Part 1 and Part 2

Printing Problems

edited February 2003 in Devices
When printing to an Epson 880 dot matrix printer, we have had numerous
problems .e.g. The first (of over 100 pages) page is printing fine, then mid
way through the second, it would print a line of control characters, then
stop printing.

The report is text based, and contains no graphics.

Any suggestions?

Cheers

Stuart

Comments

  • edited March 2003
    Try printing the report to a report emulation text file as shown in the main
    report demos #107 and then send that text file to the dot matrix printer.


    -----------------------------------------------
    Tech Tip: Send TextFile to Printer
    -----------------------------------------------

    I designed a application that exports the report to a .txt
    file using ReportTextFile device.

    How can I Send the text file to the printer?

    The following procedure will send the .txt file to
    the printer using Delphi's TPrinter object.



    uses
    Printers;


    procedure SendTextFileToPrinter(aFileName: String);
    var
    lsLines: TStringList;
    lOutputFile: TextFile;
    liIndex: Integer;
    begin

    lsLines := TStringList.Create;

    try
    lsLines.LoadFromFile(aFileName);

    AssignPrn(lOutputFile);
    Rewrite(lOutputFile);

    for liIndex := 0 to lsLines.Count-1 do
    Writeln(lOutputFile, lsLines[liIndex]);

    CloseFile(lOutputFile);

    finally
    lsLines.Free;
    end;


    end;



    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.