Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

crystal reports error : remaining text does not appear to be part of the formula

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

like image 629
phill Avatar asked Jun 21 '10 21:06

phill


1 Answers

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

like image 62
phill Avatar answered Sep 23 '22 01:09

phill