Using Crystal 10 with Microsoft SQL Server 2000 backend and a Microsoft Dynamics ERP solution.
I have a report that is generating labels based on ship to addresses for customers. Customer Number is GH1 and Address Code is GH2. The label contains the customer name and all contacts associated with that customer/address code.
I have three formulas to get the contact names and separate them by a comma.
@rtcontact - in Details
WhilePrintingRecords;
stringvar contact;
if length(contact) > 235 then contact:=contact
else contact:=contact + {CSC43102.CNTCPRSN} + ", "
@reset - in GH2
WhilePrintingRecords;
stringvar contact:= ""
@display - in GF2
WhilePrintingRecords;
stringvar contact;
contact;
The problem is that it is putting a comma at the end too.
EX.
ABC Company
Attn: John Doe, Jane Doe, Liz Doe,
How can I elminate the last character if it is a comma? I have tried the instr and right funcions but not sure if it is not working because it is a variable?
I appreciate the help in advance!
I have a report that is generating labels based on ship to addresses for customers. Customer Number is GH1 and Address Code is GH2. The label contains the customer name and all contacts associated with that customer/address code.
I have three formulas to get the contact names and separate them by a comma.
@rtcontact - in Details
WhilePrintingRecords;
stringvar contact;
if length(contact) > 235 then contact:=contact
else contact:=contact + {CSC43102.CNTCPRSN} + ", "
@reset - in GH2
WhilePrintingRecords;
stringvar contact:= ""
@display - in GF2
WhilePrintingRecords;
stringvar contact;
contact;
The problem is that it is putting a comma at the end too.
EX.
ABC Company
Attn: John Doe, Jane Doe, Liz Doe,
How can I elminate the last character if it is a comma? I have tried the instr and right funcions but not sure if it is not working because it is a variable?
I appreciate the help in advance!