我有以下水晶报告公式,但只需要第一个IF
条件并忽略所有其他ELSE IF
s。请帮忙。
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})]
答案 0 :(得分:0)
如果总是如此,那么可能是第一个,所以如果将第一个作为最后一个,请尝试更改其他人的顺序。如果重复2次,你也有以下
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})]