The following conditional IF field will eliminate a blank space caused by an empty middle initial field:
{FNAME} {IF {MI} <> "" "{MI} "}{LNAME}
The following conditional MERGEFIELD field will remove blank spaces in any field. For example, given the following fields,
{Prefix} {FirstName} {LastName}
the following conditional statements will properly suppress the space normally included for any blank fields:
{IF {MERGEFIELD Prefix}<>"" "{MERGEFIELD Prefix} "}
{IF {MERGEFIELD FirstName}<>"" "{MERGEFIELD FirstName} "}
{IF {MERGEFIELD LastName}<>"" "{MERGEFIELD LastName}"}
To enter the field characters ({}), choose Field from the Insert menu (or press CTRL+F9).
NOTE: Are you creating your csv by unloading the data from informix and replacing the pipe delimiter with commas?... maybe it would be better for you to create an ace report which can better manipulate strings to create the csv file! here's an example of an ace report I use to achieve a similar objective:
database pawnshop end
define
variable act integer
variable actven integer
variable ret integer
variable ven integer
variable cmp integer
variable plt integer
variable vta integer
variable tot integer
variable totprof integer
end
output
top margin 0
bottom margin 0
left margin 0
right margin 384
report to "clientes.unl"
page length 200000
end
select
pa_serial,
pa_code,
pa_store_id,
pa_user_id,
pa_cust_name,
pa_id_type,
pa_id_no,
pa_dob,
pa_address1,
pa_city,
pa_tel,
pa_cmt,
pa_entry_date,
pa_last_date,
pa_idioma,
pa_apodo,
pwd_id,
pwd_trx_type,
pwd_last_type,
pwd_last_pymt,
pwd_trx_date,
pwd_pawn_amt,
pwd_last_amt,
pwd_cob1,
pwd_cob2,
pwd_cob3,
pwd_cob4,
pwd_update_flag,
st_code,
st_exp_days,
st_com_exp,
st_plat_exp
from CLIENTES, outer BOLETOS, storetab
where pa_serial = pwd_id
and pa_code = st_code
order by pa_cust_name, pwd_last_pymt
end
format
on every row
if pwd_last_type = "E" then
begin
let act = act + 1
if today - pwd_last_pymt >= st_exp_days then
let actven = actven + 1
end
if pwd_last_type = "I" then
begin
let act = act + 1
if today - pwd_last_pymt >= st_exp_days then
let actven = actven + 1
end
if pwd_trx_type = "C" then
begin
let cmp = cmp + 1
if pwd_last_type = "C" and (today - pwd_last_pymt >= st_com_exp) then
let actven = actven + 1
end
if pwd_last_type = "R" then
begin
let ret = ret + 1
end
if pwd_trx_type = "P" and pwd_last_type = "P" then
begin
let plt = plt + 1
if today - pwd_last_pymt >= st_plat_exp then
let actven = actven + 1
end
if pwd_trx_type = "E" and pwd_last_type = "F" then
begin
let ven = ven + 1
end
if pwd_trx_type = "P" and pwd_last_type = "F" then
begin
let ven = ven + 1
end
if pwd_trx_type = "E" and pwd_last_type = "T" then
begin
let ven = ven + 1
end
if pwd_trx_type = "P" and pwd_last_type = "T" then
begin
let ven = ven + 1
end
before group of pa_cust_name
let totprof = 0
let tot = 0
let act = 0
let actven = 0
let ret = 0
let ven = 0
let cmp = 0
let plt = 0
let vta = 0
after group of pa_cust_name
print column 1, pa_serial using "<<<<<","|",
pa_code clipped,"|",
pa_store_id clipped,"|",
pa_user_id clipped,"|",
pa_cust_name clipped,"|",
pa_id_type clipped,"|",
pa_id_no clipped,"|",
pa_dob using "mm-dd-yyyy","|",
pa_address1 clipped,"|",
pa_city clipped,"|",
pa_tel clipped,"|",
pa_cmt clipped,"|",
pa_entry_date using "mm-dd-yyyy","|",
pwd_last_pymt using "mm-dd-yyyy","|",
act using "&&&","|",
ret using "&&&","|",
ven using "&&&","|",
tot using "&&&","|",
totprof using "-&&&&&","|",
actven using "&&&","|",
cmp using "&&&","|",
pa_idioma,"|",
pa_apodo,"|",
plt using "&&&","|",
vta using "&&&","|"
end