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

memo keeptogether not working

edited November 2001 in General
I have a memo in my footer. My memo is set to keeptogether. I am
printing to a dotmatrix printer. When my memo reaches the end of the
page it keeps printing right over the end of the page (over the
perferation) and on to the next page. I want my memo to stay together
and the whole thing to print on the next page. I read the help fiels
and what I got out of it was that keeptogether should do this. How
else can you do this?

Jason

Comments

  • edited November 2001
    The memo should keep together. Sounds like the report engine isn't
    calculating the proper space used on the printer canvas than is really being
    used. Upgrade to the latest printer driver available for your printer
    model. Can you try using a generic text printer driver? There is an
    article in the TechTips newsgroup, in the Printer thread, which discusses
    issues related to printing to dot matrix printers.

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited November 2001
    I am using a generic print driver right now. My margins are all at
    0.25 and all my objects on the report are set to the height of 0.1667.
    I followed that article as best as I could. Well I have a new
    question now, apparently I am dealing with a dbRichText not a
    memo...sorry. My question still remains the same, within enduser how
    do I get the richtext to stop printing past the end of the page, or
    force a page break before the richtext depending on the line
    number.... and how to find the line number if the second option is the
    only way to go.

    Thanks again Jason


    On Tue, 6 Nov 2001 12:27:55 -0600 , "Jim Bennett \(Digital
  • edited November 2001
    Don't know how the generic text driver handles rich text. Usually rich text
    will need to be printed on the dot matrix in graphical mode. You should use
    a memo control and print the report as a report emulation text file and then
    send that text file to the 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.