if( this.USE_DATE_IN_SUBQUERY ) subqueryDefn.addResultSetExpression("sub4", new ScriptExpression("dataSetRow.SALE_DATE"));
	private QueryDefinition newGenIVReportQuery( )	{		QueryDefinition qd = newReportQuery( );		// add basic column binding		IBaseExpression[] rowBeArray = getRowExpr( );		IBaseExpression[] totalBeArray = getAggrExpr( );		for ( int i = 0; i < rowBeArray.length; i++ )			qd.addResultSetExpression( this.rowExprName[i], rowBeArray[i] );		if( this.GEN_use_invalid_column )			qd.addResultSetExpression( "abc",new ScriptExpression("dataSetRow.def") );		for ( int i = 0; i < totalBeArray.length; i++ )			qd.addResultSetExpression( this.totalExprName[i], totalBeArray[i] );		// add filter		if ( this.GEN_add_filter == true )		{			ConditionalExpression filterExpr = new ConditionalExpression( "row.AMOUNT_1",					IConditionalExpression.OP_GT,					"50" );			FilterDefinition filterDefn = new FilterDefinition( filterExpr );			qd.addFilter( filterDefn );			this.GEN_filterDefn.add( filterDefn );		}		if ( this.TEST_ISEMPTY )		{			ConditionalExpression filterExpr = new ConditionalExpression( "row.AMOUNT_1 - row.AMOUNT_1",					IConditionalExpression.OP_GT,					"50" );			FilterDefinition filterDefn = new FilterDefinition( filterExpr );			qd.addFilter( filterDefn );			this.GEN_filterDefn.add( filterDefn );		}				// add sorting		SortDefinition sortDefn = new SortDefinition( );		sortDefn.setColumn( "CITY_1" );		qd.addSort( sortDefn );		// add group		if ( this.GEN_add_group == true )		{			// add grouping on column1			GroupDefinition gd = new GroupDefinition( );			gd.setKeyColumn( "COUNTRY_1" );			qd.addGroup( gd );						if ( this.GEN_add_subquery == true )			{				SubqueryDefinition subqueryDefn = new SubqueryDefinition( subQueryName1 );				subRowExprName1 = new String[3];				subRowExprName1[0] = "sub1";				subRowExprName1[1] = "sub2";				subRowExprName1[2] = "sub3";				ScriptExpression[] exprs = new ScriptExpression[3];				exprs[0] = new ScriptExpression( "dataSetRow.COUNTRY" );				exprs[1] = new ScriptExpression( "dataSetRow.CITY" );				exprs[2] = new ScriptExpression( "dataSetRow.AMOUNT" );				for ( int i = 0; i < subRowExprName1.length; i++ )					subqueryDefn.addResultSetExpression( subRowExprName1[i],							exprs[i] );				subqueryDefn.setApplyOnGroupFlag( true );				gd.addSubquery( subqueryDefn );			}		}		return qd;	}