通常我们在做按某一条件分组汇总数据的时候,都是透过SQL去处理。如果您不熟悉SQL怎么办?FR高级条件分组可以帮您实现。
一、新建数据集
select A0188 AS ID, CAST(FLOOR(datediff(DY,A0111,getdate())/365.25) AS INT) 年龄 ,A01156 部门 from A01
where A0183 in ${cblCompany} --公司别
and A01156 is not null
and A0111 is not null
and A0179 is null --离职日期
and convert(char(8) ,A0141,112)<=CONVERT(char(8),getdate(),112)--入职日期
二、新建报表
(1)斜线
(2)高级条件分组
选择年龄,编辑。