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

Shifting TppDBMemo at print time

edited September 2002 in General
I would like to shift the TppDBMemo at print time relative to the TppDBText
before it. I've set the TppDBText.AutoSize to true and I would like to move
the memo to the right of it depending on the DBText's size. I've tried
using the OnPrint and OnDrawCommand, but it would seem that the DBText.Width
is always this same, even though the AutoSize property is set to true.
Obviously I', doing something wrong. Help please?

Comments

  • edited September 2002
    Before the memo prints, you could grab the text data from the pipeline for
    the dbtext and measure the width of it by using the
    Report.Printer.Canvas.Textwidth method. Don't forget to assign the font
    from the dbText to the canvas so that it can provide the correct
    measurement.

    All autosizing text width is determined by the device for which the draw
    command is being rendered. So, you may not get the best results on the
    screen if you position the memo based on measurements from the printer
    canvas (the printer resolution is more accurate). You can use the screen
    device canvas to measure the text when previewing to the screen to work
    around this.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.