数据集日期参数范围如何和参数不为空一起写呢

参数不为空时写法:

${if(len(月份)=0,""," and report_month='"+月份+"'")}

范围写法:

report_month between ${date1} and ${date2}

请问这两种能写到一块嘛 

FineReport 艾达 发布于 2022-12-12 13:14
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共2回答
最佳回答
1
snrtuemcLv8专家互助
发布于2022-12-12 13:34

建议换成

${if(len(date1)=0,""," and report_month>='"+date1+"'")}

${if(len(date2)=0,""," and report_month<='"+date2+"'")}

最佳回答
1
weibwLv7高级互助
发布于2022-12-12 13:32

${if(and(len(date1)=0,len(date2)=0),""," and report_month between '"+date1+"' and '"+date2+"'")}

  • 2关注人数
  • 351浏览人数
  • 最后回答于:2022-12-12 13:34
    请选择关闭问题的原因
    确定 取消
    返回顶部