Commit 6e114317 by Naung1

complete fixbug report

parent 7fec0600
......@@ -249,15 +249,7 @@ public class ReportResultSet implements MyReport {
if(pre>-1 || pos>-1){
fixpFilter=this.swapFormat(fixpFilter);
}
if(fixpFilter.indexOf("%25")>-1){
fixpFilter=fixpFilter.replace("%25", "%");
}
if(fixpFilter.indexOf("%3C")>-1){
fixpFilter=fixpFilter.replace("%3C", "<");
}
if(fixpFilter.indexOf("%3E")>-1){
fixpFilter=fixpFilter.replace("%3E", ">");
}
fixpFilter = this.replaceURLEscape(fixpFilter);
rFilter += fixpFilter;
if (filter.get(tableName) != null
......@@ -287,6 +279,19 @@ public class ReportResultSet implements MyReport {
}
}
}
private String replaceURLEscape(String param){
if(param.indexOf("%25")>-1){
param=param.replace("%25", "%");
}
if(param.indexOf("%3C")>-1){
param=param.replace("%3C", "<");
}
if(param.indexOf("%3E")>-1){
param=param.replace("%3E", ">");
}
return param;
}
private void setChildFilter(Hashtable h, Properties filter,DbInquiry inqParent) {
try {
......@@ -315,20 +320,22 @@ public class ReportResultSet implements MyReport {
if (filter.get(tableName) != null &&
!filter.get(tableName).equals(""))
rFilter += " AND " + (String) filter.get(tableName);
} else
} else{
rFilter = (String) filter.get(tableName);
inq.setFilter(rFilter);
if(di.getRelation(inq.getActualName())!=null){
if(inq instanceof DbRecord){
mainkey=((DbRecord)inq).getMainkey().toLowerCase();
}else{
mainkey=((DbInquiry)inq).getCurrentDbRecord().getMainkey().toLowerCase();
}
if(!di.getCurrentDbRecord().getArrayFieldList().contains(mainkey)){
mainkey=di.getCurrentDbRecord().getMainkey().toLowerCase();
rFilter = this.replaceURLEscape(rFilter);
inq.setFilter(rFilter);
if(di.getRelation(inq.getActualName())!=null){
if(inq instanceof DbRecord){
mainkey=((DbRecord)inq).getMainkey().toLowerCase();
}else{
mainkey=((DbInquiry)inq).getCurrentDbRecord().getMainkey().toLowerCase();
}
if(!di.getCurrentDbRecord().getArrayFieldList().contains(mainkey)){
mainkey=di.getCurrentDbRecord().getMainkey().toLowerCase();
}
reqFilter.add(mainkey+" in (select "+mainkey+" from "+inq.getTableName()+" where "+rFilter+")");
}
reqFilter.add(mainkey+" in (select "+mainkey+" from "+inq.getTableName()+" where "+rFilter+")");
}
// reform filter for any object
if (this.di.getType().equals("inqreport")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment