你这个需要写js,才能实现,给你一个我写的列子
var password0 = contentPane.getWidgetByName("password0").getValue();
var idcardno = contentPane.getWidgetByName("idcardno").getValue();
var sql = "select count(*) from yq_dx_employees_password where code in (select ye .code from yc_dx_employees ye where ye.lastworkdate>=sysdate -30) and IDCARDNO=" + "'" + idcardno + "'"+"and password="+"'"+password0+"'";
var sql2 = 'SQL("MING",' + '"' + sql + '",1,1)';
//alert(sql2);
var password1 = FR.remoteEvaluate(sql2);
var len = idcardno.length;
//alert(password0);
//alert(password1);
if(password1=0){
alert("密码错误或身份证错误");
return false;
}else if( len < 15 && len > 0) {
var sql1 = " select * from yq_dx_employees_password where idcardno=" + "'" + idcardno + "'";
var sql3 = 'SQL("MING",' + '"' + sql1 + '",1,1)';
var code1 = FR.remoteEvaluate(sql3);
var sql9="select code from yq_dx_employees_password where IDCARDNO=" + "'" + idcardno + "'"+"and password='"+password0+"'"+"order by jobdate desc";
var sql10='SQL("MING",' + '"' + sql9 + '",1,2)';
var code3= FR.remoteEvaluate(sql10);
//this.options.form.getWidgetByName("code").setValue(code1);
// _g().parameterCommit();
window.location = "/yq/Report?formlet=HR/tw_pay1.frm&code1=" + code3+"&code="+code1;
} else if(len > 15) {
var sql5 = "select code from yq_dx_employees_password where IDCARDNO=" + "'" + idcardno + "'"+"and password='"+password0+"'"+"order by jobdate desc";
var sql6 = 'SQL("MING",' + '"' + sql5 + '",1,1)';
var code2 = FR.remoteEvaluate(sql6);
//this.options.form.getWidgetByName("code").setValue(code1);
// _g().parameterCommit();
window.location = "/yq/Report?reportlet=yq report/hr/yq_salarys_select.cpt&op=write&code=" + code2;
}