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

DBText comes over Text

edited April 2004 in RAP
Hi,

when i place a DXText between textfields are a DBText after another
DBTextfields, these fields sometimes cross eathother. I want the fields to
autoalign, so they form a sentence instead of becoming unreadable, but i
can't seem to figger out a way to do this.

Thanks in advance, JKB

Comments

  • edited April 2004
    Hi Jakob,

    There are two ways to do this. First, you can use a single TppVariable
    instead of multiple DBText components. Then append each data value on to
    the value of the variable directly leaving a single space between the
    values. Something like the following.

    Variable1.Value := customers['FirstName'] + ' ' + customers['LastName'] +
    '.';

    Second you can do the same thing with a TppMemo component. For an example
    of this (using Delphi code) see Demo 33 (dm0033.pas) in the
    RBuilder\Demos\1. Reports\... directory.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2004
    Hi it's me again,

    sorry, i haven't explained my problem too well.
    The probleem is we're building reports at runtime, not at designtime.
    So we're only coding stuff when we consiter it as a last resort.
    As you understand i have to find a way to do this using the properties of
    components instead of using events. It's a little bit more of a challenge
    :-)


  • edited April 2004
    Hi Jakob,

    Unfortunately there is not a single component available in ReportBuilder to
    merge two data values into one area. If you are designing your reports at
    runtime, you still have access to RAP which gives you a full developement
    environment to access any event you need and add pascal code. This code
    will then be saved in the report template just as it would at designtime.

    As another alternative, you may want to check out the RichText Mail Merge
    feature. It may be a little overkill, but it would be the only way to do
    this at runtime without using RAP. See the ReportBuilder Developer's guide
    for a Mail Merge example.

    --
    Best Regards,

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