DBText comes over Text
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
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
This discussion has been closed.
Comments
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.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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
:-)
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.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com