数据集是这样的:SELECT${if(type='date'," CONVERT(varchar(100),a.BillDate,20)) as riqi ,","")}${if(type='month', " CONVERT(varchar(7),a.BillDate,20)) as riqi, ","")}${if(type='year', " CONVERT(varchar(4),a.BillDate,20)) as riqi, ","")}a.ShopID 门店ID,b.BrandName 品牌,b.HotelName 门店,sum(a.Amount) 实际营收,c. 计划营收FROM. bLEFT JOIN . a ON a.ShopID = b.ShopIDLEFT JOIN . c ON c.ShopID = b.HotelIDwhere c.Items = '营收(万元)'${if(type='date'," and CONVERT(varchar(100),a.BillDate,20) >= '" + 开始日期 + "' and CONVERT(varchar(100),a.BillDate,20)<='" + 结束日期 + "'", "")}${if(type='month', " and cast(month(CONVERT(varchar(100),a.BillDate,20)) as int) = "+ 月 + " and year(CONVERT(varchar(100),a.BillDate,20)) = '" + 年+"'", "")}${if(type='year', " and year(CONVERT(varchar(100),a.BillDate,20)) = '" + 年+"'", "")}${if(len(品牌)==0,"","and b.BrandName in ('"+品牌+"')")}${if(len(门店)==0,"","and b.HotelName in ('"+门店+"')")}GROUP BYa.ShopID,${if(type='date'," CONVERT(varchar(100),a.BillDate,20)), ","")}${if(type='month', " CONVERT(varchar(7),a.BillDate,20)), ","")}${if(type='year', " CONVERT(varchar(4),a.BillDate,20)), ","")}b.BrandName,b.HotelName,c.给开始时间,结束时间,年份默认数据预览时成功的给TYPE参数默认值时,就开始报错:给参数品牌默认值时,预览也是成功的:参数的写法有问题吗?