在数据集中使用if语句,如果select *from a 为空,则select* from b,否则select*from a
可以使用关联数据集https://help.finereport.com/doc-view-125.html
case when
${if(sql("数据库名称","SELECT count(*) FROM a",1)>0,"SELECT * FROM a","SELECT * FROM b")}
select * from info where typeid= 1 and xxx is NOT nullselect * from info where typeid= 1 and xxx is null