文本控件中输入 ' 这个符号就会报错
你看下你的sql是否报错
${IF(LEN(pname)=0,"",IF(code(pname)=39,"and 表字段 like q'{%'%}' ", "and 表字段 like '%"+pname+"%'"))}
把用到这个控件的数据集拿出来