水晶报告中的公式出错

时间:2012-11-09 15:59:44

标签: crystal-reports-2008

我在水晶报告中收到以下错误:

  

其余文字不属于公式

错误指向我公式的最后一行:zone;

配方有什么问题?可以用其他方式完成吗?

stringVar zone := '';
if {?ParamPuntenboek} = 'Begin schooljaar' then
        (if {LEERLING_LEERLING.LEERJAAR} = '4'then
            select(toNumber({@4BTOT}))
                case '99': zone := 'A'
                case '97': zone := 'A'
                case '95': zone := 'A'
                case '93': zone := 'A'
                case '90': zone := 'A'
                case '85': zone := 'A'
                case '80': zone := 'A'
                case '75': zone := 'A'
                case '70': zone := 'B'
                case '65': zone := 'B'
                case '60': zone := 'B'
                case '55': zone := 'B'
                case '50': zone := 'B'
                case '45': zone := 'C'
                case '40': zone := 'C'
                case '35': zone := 'C'
                case '30': zone := 'C'
                case '25': zone := 'C'
                case '20': zone := 'D'
                case '15': zone := 'D'
                case '10': zone := 'E'
                case '7': zone := 'E'
                case '5': zone := 'E'
                case '3': zone := 'E'
                case '1': zone := 'E'
                case '0': zone := 'E'
                default: zone := '';
        if {LEERLING_LEERLING.LEERJAAR} = '5'then
            select(toNumber({@5BTOT}))
                case '99': zone := 'A'
                case '97': zone := 'A'
                case '95': zone := 'A'
                case '93': zone := 'A'
                case '90': zone := 'A'
                case '85': zone := 'A'
                case '80': zone := 'A'
                case '75': zone := 'A'
                case '70': zone := 'B'
                case '65': zone := 'B'
                case '60': zone := 'B'
                case '55': zone := 'B'
                case '50': zone := 'B'
                case '45': zone := 'C'
                case '40': zone := 'C'
                case '35': zone := 'C'
                case '30': zone := 'C'
                case '25': zone := 'C'
                case '20': zone := 'D'
                case '15': zone := 'D'
                case '10': zone := 'E'
                case '7': zone := 'E'
                case '5': zone := 'E'
                case '3': zone := 'E'
                case '1': zone := 'E'
                case '0': zone := 'E'
                default: zone := '';
        if {LEERLING_LEERLING.LEERJAAR} = '6'then
            select(toNumber({@6BTOT}))
                case '99': zone := 'A'
                case '97': zone := 'A'
                case '95': zone := 'A'
                case '93': zone := 'A'
                case '90': zone := 'A'
                case '85': zone := 'A'
                case '80': zone := 'A'
                case '75': zone := 'A'
                case '70': zone := 'B'
                case '65': zone := 'B'
                case '60': zone := 'B'
                case '55': zone := 'B'
                case '50': zone := 'B'
                case '45': zone := 'C'
                case '40': zone := 'C'
                case '35': zone := 'C'
                case '30': zone := 'C'
                case '25': zone := 'C'
                case '20': zone := 'D'
                case '15': zone := 'D'
                case '10': zone := 'E'
                case '7': zone := 'E'
                case '5': zone := 'E'
                case '3': zone := 'E'
                case '1': zone := 'E'
                case '0': zone := 'E'
                default: zone := '';)
else
    (if {?ParamPuntenboek} = 'Midden schooljaar' then
            (if {LEERLING_LEERLING.LEERJAAR} = '3'then
                select({@3MTOT})
                    case '99': zone := 'A'
                    case '97': zone := 'A'
                    case '95': zone := 'A'
                    case '93': zone := 'A'
                    case '90': zone := 'A'
                    case '85': zone := 'A'
                    case '80': zone := 'A'
                    case '75': zone := 'A'
                    case '70': zone := 'B'
                    case '65': zone := 'B'
                    case '60': zone := 'B'
                    case '55': zone := 'B'
                    case '50': zone := 'B'
                    case '45': zone := 'C'
                    case '40': zone := 'C'
                    case '35': zone := 'C'
                    case '30': zone := 'C'
                    case '25': zone := 'C'
                    case '20': zone := 'D'
                    case '15': zone := 'D'
                    case '10': zone := 'E'
                    case '7': zone := 'E'
                    case '5': zone := 'E'
                    case '3': zone := 'E'
                    case '1': zone := 'E'
                    case '0': zone := 'E'
                    default: zone := '';
            if {LEERLING_LEERLING.LEERJAAR} = '4'then
                select(toNumber({@4MTOT}))
                    case '99': zone := 'A'
                    case '97': zone := 'A'
                    case '95': zone := 'A'
                    case '93': zone := 'A'
                    case '90': zone := 'A'
                    case '85': zone := 'A'
                    case '80': zone := 'A'
                    case '75': zone := 'A'
                    case '70': zone := 'B'
                    case '65': zone := 'B'
                    case '60': zone := 'B'
                    case '55': zone := 'B'
                    case '50': zone := 'B'
                    case '45': zone := 'C'
                    case '40': zone := 'C'
                    case '35': zone := 'C'
                    case '30': zone := 'C'
                    case '25': zone := 'C'
                    case '20': zone := 'D'
                    case '15': zone := 'D'
                    case '10': zone := 'E'
                    case '7': zone := 'E'
                    case '5': zone := 'E'
                    case '3': zone := 'E'
                    case '1': zone := 'E'
                    case '0': zone := 'E'
                    default: zone := '';
            if {LEERLING_LEERLING.LEERJAAR} = '5'then
                select(toNumber({@5MTOT}))
                    case '99': zone := 'A'
                    case '97': zone := 'A'
                    case '95': zone := 'A'
                    case '93': zone := 'A'
                    case '90': zone := 'A'
                    case '85': zone := 'A'
                    case '80': zone := 'A'
                    case '75': zone := 'A'
                    case '70': zone := 'B'
                    case '65': zone := 'B'
                    case '60': zone := 'B'
                    case '55': zone := 'B'
                    case '50': zone := 'B'
                    case '45': zone := 'C'
                    case '40': zone := 'C'
                    case '35': zone := 'C'
                    case '30': zone := 'C'
                    case '25': zone := 'C'
                    case '20': zone := 'D'
                    case '15': zone := 'D'
                    case '10': zone := 'E'
                    case '7': zone := 'E'
                    case '5': zone := 'E'
                    case '3': zone := 'E'
                    case '1': zone := 'E'
                    case '0': zone := 'E'
                    default: zone := '';
            if {LEERLING_LEERLING.LEERJAAR} = '6'then
                select(toNumber({@6MTOT}))
                    case '99': zone := 'A'
                    case '97': zone := 'A'
                    case '95': zone := 'A'
                    case '93': zone := 'A'
                    case '90': zone := 'A'
                    case '85': zone := 'A'
                    case '80': zone := 'A'
                    case '75': zone := 'A'
                    case '70': zone := 'B'
                    case '65': zone := 'B'
                    case '60': zone := 'B'
                    case '55': zone := 'B'
                    case '50': zone := 'B'
                    case '45': zone := 'C'
                    case '40': zone := 'C'
                    case '35': zone := 'C'
                    case '30': zone := 'C'
                    case '25': zone := 'C'
                    case '20': zone := 'D'
                    case '15': zone := 'D'
                    case '10': zone := 'E'
                    case '7': zone := 'E'
                    case '5': zone := 'E'
                    case '3': zone := 'E'
                    case '1': zone := 'E'
                    case '0': zone := 'E'
                    default: zone := '';)
    else
        if {?ParamPuntenboek} = 'Einde schooljaar' then
                (if {LEERLING_LEERLING.LEERJAAR} = '3'then
                    select(toNumber({@3ETOT}))
                        case '99': zone := 'A'
                        case '97': zone := 'A'
                        case '95': zone := 'A'
                        case '93': zone := 'A'
                        case '90': zone := 'A'
                        case '85': zone := 'A'
                        case '80': zone := 'A'
                        case '75': zone := 'A'
                        case '70': zone := 'B'
                        case '65': zone := 'B'
                        case '60': zone := 'B'
                        case '55': zone := 'B'
                        case '50': zone := 'B'
                        case '45': zone := 'C'
                        case '40': zone := 'C'
                        case '35': zone := 'C'
                        case '30': zone := 'C'
                        case '25': zone := 'C'
                        case '20': zone := 'D'
                        case '15': zone := 'D'
                        case '10': zone := 'E'
                        case '7': zone := 'E'
                        case '5': zone := 'E'
                        case '3': zone := 'E'
                        case '1': zone := 'E'
                        case '0': zone := 'E'
                        default: zone := '';
                if {LEERLING_LEERLING.LEERJAAR} = '4'then
                    select(toNumber({@4ETOT}))
                        case '99': zone := 'A'
                        case '97': zone := 'A'
                        case '95': zone := 'A'
                        case '93': zone := 'A'
                        case '90': zone := 'A'
                        case '85': zone := 'A'
                        case '80': zone := 'A'
                        case '75': zone := 'A'
                        case '70': zone := 'B'
                        case '65': zone := 'B'
                        case '60': zone := 'B'
                        case '55': zone := 'B'
                        case '50': zone := 'B'
                        case '45': zone := 'C'
                        case '40': zone := 'C'
                        case '35': zone := 'C'
                        case '30': zone := 'C'
                        case '25': zone := 'C'
                        case '20': zone := 'D'
                        case '15': zone := 'D'
                        case '10': zone := 'E'
                        case '7': zone := 'E'
                        case '5': zone := 'E'
                        case '3': zone := 'E'
                        case '1': zone := 'E'
                        case '0': zone := 'E'
                        default: zone := '';
                if {LEERLING_LEERLING.LEERJAAR} = '5'then
                    select(toNumber({@5ETOT}))
                        case '99': zone := 'A'
                        case '97': zone := 'A'
                        case '95': zone := 'A'
                        case '93': zone := 'A'
                        case '90': zone := 'A'
                        case '85': zone := 'A'
                        case '80': zone := 'A'
                        case '75': zone := 'A'
                        case '70': zone := 'B'
                        case '65': zone := 'B'
                        case '60': zone := 'B'
                        case '55': zone := 'B'
                        case '50': zone := 'B'
                        case '45': zone := 'C'
                        case '40': zone := 'C'
                        case '35': zone := 'C'
                        case '30': zone := 'C'
                        case '25': zone := 'C'
                        case '20': zone := 'D'
                        case '15': zone := 'D'
                        case '10': zone := 'E'
                        case '7': zone := 'E'
                        case '5': zone := 'E'
                        case '3': zone := 'E'
                        case '1': zone := 'E'
                        case '0': zone := 'E'
                        default: zone := '';)
)
zone;

1 个答案:

答案 0 :(得分:0)

修复您的问题删除(从读取行

(if {?ParamPuntenboek} = 'Midden schooljaar' then

并在

之前删除公式底部的)
zone;