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

justification within a 'memo'

edited January 2016 in RAP
Hi Team,
Win 10, D10S.
I have the following code for a Calc Variable..
{code}
if Trim(AR_Tax_Invoice['Zipcode']) <> '' then Value := Value + '
'+Trim(AR_Tax_Invoice['Zipcode']);
if Trim(AR_Tax_Invoice['Country']) <> '' then Value := Value +
Chr(10)+Trim(AR_Tax_Invoice['Country']);
if Trim(AR_Tax_Invoice['Invoiceno']) <> '' then Value := Value +
Chr(10)+Trim(AR_Tax_Invoice['Invoiceno']);
{code}

First issue - Although I want the 'Calc Variable' to be DataType
dtMemo it keeps defaulting to dtString.

Second issue - How can I right justify the last line in the 'Calc'
please?

Observation - At design time, if I make the height of the 'Calc' less
than what will be required it doesn't expand down. If I make it larger
than the needed height it collapses to the height of the text. I have
AutoSize checked and anchors at Left/Top. Wordwrap on.
Interestingly the width of the 'Calc' doesn't change.
If I turn worwrap off it all goes to hell with everything on one line.

Regards,
Ian

Comments

  • edited January 2016
    Hi Nico,
    Thank you for the clarifications and suggestions.
    Regards,
    Ian
  • edited January 2016
    Hi Ian,

    If you would like a memo-like control, I suggest populating a TppMemo
    from the OnCalc of a TppVariable rather than using the TppVariable
    itself. Variables are not meant to act as memos.

    1. The Variable component does not support the dtMemo type. See the RB
    help for TppVariable.

    2. It is not possible to justify a single line of a memo or text object.
    If you need a specific line of text justified, I suggest using a
    separate control or perhaps a RichText control.

    3. Non-stretchable text controls such as the label or variable will
    autosize horizontally if Wordwrap is False and AutoSize is True. They
    will autosize vertically if Wordwrap is True and AutoSize is True.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.