views:

27

answers:

1

I'm receiving an error in my crystal report:

The reminaing text does not appear to be part of the formula. the highlighted area in question is between the 2 **'s when the error is thrown.

Here is my formula in Crystal Syntax.

numbervar pos;
stringvar cpu;

if (Length ({_v_hardware.CpuDesc}) >2) then 
(
pos := instr({_v_hardware.CpuDesc},",");
cpu ='{_v_hardware.CpuDesc}';

) 
else 
(
//cpu := {_v_hardware.CpuDesc2};
pos := instr({_v_hardware.CpuDesc},",");
cpu ={_v_hardware.CpuDesc};
)

**//replace({_v_hardware.CpuDesc},"    ","")
if (pos > 0) then
(
replace(replace(replace(left(cpu, pos-1),"    ",""), "Pentium(R) III",""),"Pentium III","");
)
else 
(
replace(cpu,"    ","");
)**

Any ideas what might be causing this error?

thanks in advance

+1  A: 

figured it out. I just had to add a semi-colon (;) to the end of the if-then statement following the very last parenthesis.

phill