How to concatenate image data in Postgres to use in fast report

Define your own aggregate to do binary concatenation and use it sql.
eg.
CREATE AGGREGATE bytea_add(bytea)
(
sfunc = byteacat,
stype = bytea,
initcond = E''
);
select bytea_add(logoimage) from emplimage where recordid=:recordid