1个回答
展开全部
var
sql:string;
begin
sql :=select dfxx.zhh as 总户号,jbxx.dh as 段号,dfxx.nf as 年份,dfxx.yf as 月份,dfxx.je as 金额,dfxx.znj as 滞纳金,dfxx.je+dfxx.znj as 合计,dfxx.sfqf as 是否欠费,jbxx.hm as 户名 from dfxx,jbxx where (jbxx.dh=:edit1.text) and xx.zhh=jbxx.zhh ';
if combobox1.text <> '' then
sql := sql + ' and jbxx.sffs=:combobox1.text';
if combobox2.text <> '' then
sql := sql + ' and dfxx.nf=:combobox2.text';
if combobox3.text <> '' then
sql := sql + ' and dfxx.yf=:combobox3.text';
adoquery.sql.text := sql;
adoquery.open;
end;
sql:string;
begin
sql :=select dfxx.zhh as 总户号,jbxx.dh as 段号,dfxx.nf as 年份,dfxx.yf as 月份,dfxx.je as 金额,dfxx.znj as 滞纳金,dfxx.je+dfxx.znj as 合计,dfxx.sfqf as 是否欠费,jbxx.hm as 户名 from dfxx,jbxx where (jbxx.dh=:edit1.text) and xx.zhh=jbxx.zhh ';
if combobox1.text <> '' then
sql := sql + ' and jbxx.sffs=:combobox1.text';
if combobox2.text <> '' then
sql := sql + ' and dfxx.nf=:combobox2.text';
if combobox3.text <> '' then
sql := sql + ' and dfxx.yf=:combobox3.text';
adoquery.sql.text := sql;
adoquery.open;
end;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询