这样写
IIF([付款方式] like '*货运公司*' , IIF(isnull(Sum(Child(派车_付司机款).付款金额),0) + isnull(Sum(Child(派车_油卡明细).总油额),0)>0, isnull([承运人应结算],0)-(isnull(Sum(Child(派车_付司机款).付款金额),0) + isnull(Sum(Child(派车_油卡明细).总油额),0)), [承运人应结算]) ,0)