PDA

View Full Version : Concatenation


Fearghal O'Boyle
26-11-05, 09:18 AM
I notice that printing pair names in 2 columns takes up a lot of room in reports. Is it possible to join pair names together in some way e.g. Meg Ryan & Julia Roberts?
Regards,
Fearghal.

ianmac
27-11-05, 08:29 AM
This is possible using the report designer.
For example select a two winner event (Mitchell) and use the report "S2 NSEW side by side". Go to "change" report and open the designer. Click on the second name and press delete. Then resize the first name (called DBText2 in the status bar at the bottom) to full width remaining. Change the font size to 8. Click CALC tab and choose [view]/[events]. Go to Detail DBText2 and click on it. In the "events for DBText2" right click on OnGetText and click [new]. The code will appear and change it to
Text := Trim(SessionPairs2Win['Name1']) + ' & ' +
Trim(SessionPairs2Win['Name2']);
This concatenates two trimmed (remove leading and trailing spaces) names with & between them.

The next set of reports I produce will contain such examples. :D