I am trying to build a list of 4 numbers that may or may not be avaliable in a certian table. The problem is when I use it with another simular formula it makes duplicat entries for the main formula.
here is the formula in question (CR5):
stringvar ICD:=
if not IsNull({Service.ICD1}) then
ICD:=ICD+{Service.ICD1};
if not IsNull({Service.ICD2}) then
ICD:=ICD+","+{Service.ICD2};
if not IsNull({Service.ICD3}) then
ICD:=ICD+","+{Service.ICD3};
if not IsNull({Service.ICD4}) then
ICD:=ICD+","+{Service.ICD4};
ICD
And here is the Main formula (this one works great when the other one is not present in the report):
if IsNull({Appointment.FirstName}) then //PRINT LAST NAME ONLY IF FIRST IS BLANK
{Appointment.LastName}
else if IsNull({Appointment.LastName}) then //PRINT FIRST NAME ONLY IF LAST IS BLANK
{Appointment.FirstName}
else //PRINT BOTH FIRST AND LAST NAME
{Appointment.LastName} + ", " + {Appointment.FirstName}
here is the formula in question (CR5):
stringvar ICD:=
if not IsNull({Service.ICD1}) then
ICD:=ICD+{Service.ICD1};
if not IsNull({Service.ICD2}) then
ICD:=ICD+","+{Service.ICD2};
if not IsNull({Service.ICD3}) then
ICD:=ICD+","+{Service.ICD3};
if not IsNull({Service.ICD4}) then
ICD:=ICD+","+{Service.ICD4};
ICD
And here is the Main formula (this one works great when the other one is not present in the report):
if IsNull({Appointment.FirstName}) then //PRINT LAST NAME ONLY IF FIRST IS BLANK
{Appointment.LastName}
else if IsNull({Appointment.LastName}) then //PRINT FIRST NAME ONLY IF LAST IS BLANK
{Appointment.FirstName}
else //PRINT BOTH FIRST AND LAST NAME
{Appointment.LastName} + ", " + {Appointment.FirstName}