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

Dot matrix printers and generic text printer driver.

edited December 2001 in General
Hi, all

I use ReportBuilder Enterprise v. 6.03

I have designed a report for dot matrix printer and generic text printer
drive with CourierNew Font 12 dpi without any kind of graphics but i have
those problem :
1) in the detail band i have two rows; on each row I have two tppdbtext
component that contain a description; each dbtext components have the same
alignment, width and left position on the report; when i print the report
the component in the second row is not printed in the same position of the
component in the first row but after one character;
2) in the header band i have two dbcalc components that have the same
alignment, width and left position of two dbtext components in the detail
band but when i print those component are not in the same position on the
paper.

I have just read your article "Printing to Dot Matrix Printers" but those
problems persist.

There is some clear example for learn the technique to print on a dox matrix
printer with generic text driver without have those problems?

Can anyone give me any advice ?

Thank you in advance.

Massimo.

Comments

  • edited December 2001
    There is demo # 107 in the main reports demo project. Does this print
    correctly?


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited December 2001
    Thank you for the answer.

    I have try with the demo 107 but i have those problems when i print directly
    to a generic text printer:
    1) the Total of the column Amount is printed two character to the right and
    is not aligned;
    2) some description in the header are not correctly aligned to the detail
    text as I saw in the preview (sales rep, via, date, method);
    3) the dates are cut after the first character of the year;
    4) the word credit is printed as credi;
    5) the last character of the header 'Sales rep' is printed over the 'V' of
    the Via word.


    Thanks
    Massimo


  • edited December 2001
    For some reason, it looks like the demo doesn't use Autosizing. Set
    Autosize to True on the dbTexts in demo #107. That should fix the problem
    with the truncated text.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited December 2001
    I have set the autosize to true but the only problem that is fixed is that
    the dates and the credit word are printed correctly.

    But now between the first date field and the Sales Rep fields there is not a
    space characters so the two fields are concatenated.

    The other problems that I have found in the demo 107 already persist.

    Thanks.

    Massimo



  • edited December 2001
    What if you print to Report Emulation Text File and then send this 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


  • edited December 2001
    I'm working to change my application for print to a text file and then print
    the text files with your procedure.

    Thank you very mach for your support !

    Massimo.




This discussion has been closed.