begin
with data.ADOQuery2do
begin
close;
sql.Clear;
sql.Add('select bmmc as 部门名称,sum(rjhz) as 累计计划值,sum(rsjz) as 累计实际值,sum(rbjz) as 累计报局值 from cx_clrb where date>='''+formatdatetime('yyyy-mm-dd',dtp_qs.Date)+''' and date<='''+formatdatetime('yyyy-mm-dd',dtp_js.Date)+''' and bmlb=01 group by bmmc');
open;
end;
series1.DataSource:=data.ADOQuery2;
Series1.XLabelsSource := data.ADOQuery2.Fields[0].fieldname;
Series1.YValues.ValueSource := data.ADOQuery2.Fields[2].fieldname;
end;
是这个意思吗?