// we must have to build this query by joining the field relation ship with
// the primary table
// then update the column in the temporary table.
ArrayList updateQueryList = new ArrayList();
ReportVO report = new ReportVO();
report = this.getStandardReport(userId, reportId);
try {
InitialContext ctx = new InitialContext();
Object oh = ctx.lookup("local/AdvancedSearch");
AdvancedSearchLocalHome cfh = (AdvancedSearchLocalHome) javax.rmi.PortableRemoteObject.narrow(oh,
com.centraview.advancedsearch.AdvancedSearchLocalHome.class);
AdvancedSearchLocal localAdvancedSearch = (AdvancedSearchLocal) cfh.create();
localAdvancedSearch.setDataSource(this.dataSource);
// Here is where the advanced Search is actually performed and the results
// effect the
// results of the report query.
String whereClause = localAdvancedSearch.getWhereClauseForReport(userId, search, "");
HashMap primaryTableMap = localAdvancedSearch.getPrimaryTableForModule(report.getModuleId());
// get the primary Table Name and Table Primary Key incase If the user
// doesn't selects the primary key
// You must have to add a hidden field in your report criteria coz primary
// key only link to all other tables
String primaryKey = primaryTableMap.get("TablePrimaryKey").toString();