Instead of using three TppDBText components, try using one TppVariable and in its OnCalc event, set its value by doing something similar to the following...
var lsPrefix: String; lsFirstName: String; lsSurname: String; begin
Thanks Nico that did the job. I now need to do the same with 5 address DBEdit fields that are located above each other. I presume I need to use the same format but how do I put a carrage return at the end of an address line.
If you are looking to do the same thing with a multiple line address, check out demo 33 located in the \RBuilder\Demos\1. Reports\... directory (dm0033.pas). This shows how to more or less do the same thing using a TppMemo so multiple lines can be shown. Hope this helps.
Comments
Instead of using three TppDBText components, try using one TppVariable and
in its OnCalc event, set its value by doing something similar to the
following...
var
lsPrefix: String;
lsFirstName: String;
lsSurname: String;
begin
lsPrefix := Report.DataPipeline['Prefix'];
lsFirstName := Report.DataPipeline['FirstName'];
lsSurname := Report.DataPipeline['Surname'];
if lsPrefix <> '' then
lsPrefix := lsPrefix + ' ';
if lsFirstName <> '' then
lsFirstName := lsFirstName + ' ';
Value := lsPrefix + lsFirstName + lsSurname;
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks Nico that did the job. I now need to do the same with 5 address
DBEdit fields that are located above each other. I presume I need to use the
same format but how do I put a carrage return at the end of an address line.
eg Value := lsAdd1+ (carrage return) + lsAdd2 + (carrage return)+
lsPostcode;
If you are looking to do the same thing with a multiple line address, check
out demo 33 located in the \RBuilder\Demos\1. Reports\... directory
(dm0033.pas). This shows how to more or less do the same thing using a
TppMemo so multiple lines can be shown. Hope this helps.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com