我有以下Crystal报告公式,但它只取第一个IF
条件并忽略所有其他ELSE IF
s。请帮忙。Crystal报告公式ELSE如果不起作用
IF {CCS_ScheduleMatrixRpt;1.period2} [(InStr ({CCS_ScheduleMatrixRpt;1.period2}, ";") - 1)] = "1" Then
{CCS_ScheduleMatrixRpt;1.period2} [(InStr ({CCS_ScheduleMatrixRpt;1.period2}, " ") + 1) To Length ({CCS_ScheduleMatrixRpt;1.period2})]
ELSE IF {CCS_ScheduleMatrixRpt;1.period3} [(InStr ({CCS_ScheduleMatrixRpt;1.period3}, ";") - 1)] = "1" Then
{CCS_ScheduleMatrixRpt;1.period3} [(InStr ({CCS_ScheduleMatrixRpt;1.period3}, " ") + 1) To Length ({CCS_ScheduleMatrixRpt;1.period3})]
ELSE IF {CCS_ScheduleMatrixRpt;1.period5} [(InStr ({CCS_ScheduleMatrixRpt;1.period5}, ";") - 1)] = "1" Then
{CCS_ScheduleMatrixRpt;1.period5} [(InStr ({CCS_ScheduleMatrixRpt;1.period5}, " ") + 1) To Length ({CCS_ScheduleMatrixRpt;1.period5})]
ELSE IF {CCS_ScheduleMatrixRpt;1.period1} [(InStr ({CCS_ScheduleMatrixRpt;1.period1}, ";") - 1)] = "1" Then
{CCS_ScheduleMatrixRpt;1.period1} [(InStr ({CCS_ScheduleMatrixRpt;1.period1}, " ") + 1) To Length ({CCS_ScheduleMatrixRpt;1.period1})]
ELSE IF {CCS_ScheduleMatrixRpt;1.period6} [(InStr ({CCS_ScheduleMatrixRpt;1.period6}, ";") - 1)] = "1" Then
{CCS_ScheduleMatrixRpt;1.period6} [(InStr ({CCS_ScheduleMatrixRpt;1.period6}, " ") + 1) To Length ({CCS_ScheduleMatrixRpt;1.period6})]
ELSE IF {CCS_ScheduleMatrixRpt;1.period7} [(InStr ({CCS_ScheduleMatrixRpt;1.period7}, ";") - 1)] = "1" Then
{CCS_ScheduleMatrixRpt;1.period7} [(InStr ({CCS_ScheduleMatrixRpt;1.period7}, " ") + 1) To Length ({CCS_ScheduleMatrixRpt;1.period7})]
ELSE IF {CCS_ScheduleMatrixRpt;1.period8} [(InStr ({CCS_ScheduleMatrixRpt;1.period8}, ";") - 1)] = "1" Then
{CCS_ScheduleMatrixRpt;1.period8} [(InStr ({CCS_ScheduleMatrixRpt;1.period8}, " ") + 1) To Length ({CCS_ScheduleMatrixRpt;1.period8})]
ELSE IF {CCS_ScheduleMatrixRpt;1.period1} [(InStr ({CCS_ScheduleMatrixRpt;1.period1}, ";") - 1)] = "1" Then
{CCS_ScheduleMatrixRpt;1.period1} [(InStr ({CCS_ScheduleMatrixRpt;1.period1}, " ") + 1) To Length ({CCS_ScheduleMatrixRpt;1.period1})]
您的第一个'IF'始终是真实的你的病情..检查即将公式的数据.. – Siva 2014-11-21 04:28:32