|
我用自定义的action,生成代码中用SQL返回Table类型数据:
public static Table compareaction(){
String oracle ="select SBU,NameCount,CompanyCount,PlaceCount from ( "+
"select aa.NameCount as NameCount,bb.CompanyCount as CompanyCount,cc.PlaceCount as PlaceCount, aa.NameSBU1 as SBU from (select count(SName) as NameCount,sbu1 as NameSBU1 from("+
" select re_a1.*, re_a1.sbu as sbu1, re_b2.*,comparename(re_a1.fname,re_b2.fstu) as SName,comparecompany(re_a1.fcompany,re_b2.ffactory) as Company,compareplace(re_a1.fplace,re_b2.fbirth) as Place from re_a1 left outer join re_b2 on re_a1.fno = re_b2.fcode"+
" ) where SName='公司中文名称不一致' group by sbu1 order by sbu1 ) aa"+
" left outer join"+
" (select count(Company) as CompanyCount,sbu1 as CompanySBU1 from("+
" select re_a1.*, re_a1.sbu as sbu1, re_b2.*,comparename(re_a1.fname,re_b2.fstu) as SName,comparecompany(re_a1.fcompany,re_b2.ffactory) as Company,compareplace(re_a1.fplace,re_b2.fbirth) as Place from re_a1 left outer join re_b2 on re_a1.fno = re_b2.fcode"+
" ) where Company='公司英文名称不一致' group by sbu1 order by sbu1 ) bb"+
" on aa.NameSBU1 = bb.CompanySBU1"+
" left outer join"+
" (select count(Place) as PlaceCount,sbu1 as PlaceSBU1 from("+
" select re_a1.*, re_a1.sbu as sbu1, re_b2.*,comparename(re_a1.fname,re_b2.fstu) as SName,comparecompany(re_a1.fcompany,re_b2.ffactory) as Company,compareplace(re_a1.fplace,re_b2.fbirth) as Place from re_a1 left outer join re_b2 on re_a1.fno = re_b2.fcode"+
" ) where Place='地址不一致' group by sbu1 order by sbu1 ) cc"+
" on aa.NameSBU1=cc.PlaceSBU1)";
System.out.println(oracle);
HashMap<String,String> sqlMap = new HashMap<String,String>();
sqlMap.put(SQL.DEFAULT_DB_NAME,oracle);
sqlMap.put(DatabaseProduct.ORACLE.name(),oracle);
return SQL.select(sqlMap,null,"/x5demo/basedemo/data");
}
该SQL在PL/SQL执行可以返回数据,如下所示:
我自.w文件设计如下:
然后运行报表,图片如下:
就是我自定义列的值显示不出来 |
|