executionContext.getReportContext(), executionContext.getSharedScope() );
executionContext, executionContext.getSharedScope( ) );
	public void evaluateQuery( String parameterGroupName )	{		CascadingParameterGroupHandle parameterGroup = getCascadingParameterGroup( parameterGroupName );		if ( dataCache == null )			dataCache = new HashMap( );		if ( parameterGroup == null )			return;		DataSetHandle dataSet = parameterGroup.getDataSet( );		if ( dataSet != null )		{			try			{				// Handle data source and data set				DataEngine dataEngine = getDataEngine( );				DataSourceHandle dataSource = dataSet.getDataSource( );				ModelDteApiAdapter adaptor = new ModelDteApiAdapter(						executionContext.getReportContext(), 						executionContext.getSharedScope() );				try				{					dataEngine.defineDataSource( adaptor.createDataSourceDesign( dataSource));					dataEngine.defineDataSet( adaptor.createDataSetDesign( dataSet ));				} catch ( BirtException e )				{					log.log( Level.SEVERE, e.getMessage( ) );				}				QueryDefinition queryDefn = new QueryDefinition( );				queryDefn.setDataSetName( dataSet.getQualifiedName( ) );				SlotHandle parameters = parameterGroup.getParameters( );				Iterator iter = parameters.iterator( );				if ( labelMap == null )					labelMap = new HashMap( );				if ( valueMap == null )					valueMap = new HashMap( );				while ( iter.hasNext( ) )				{					Object param = iter.next( );					if ( param instanceof ScalarParameterHandle )					{						String valueExpString = ( ( ScalarParameterHandle ) param )								.getValueExpr( );						Object valueExpObject = new ScriptExpression(								valueExpString );						valueMap.put(								parameterGroup.getName( )										+ "_"										+ ( ( ScalarParameterHandle ) param )												.getName( ), valueExpObject );						queryDefn.getRowExpressions( ).add( valueExpObject );						String labelExpString = ( ( ScalarParameterHandle ) param )								.getLabelExpr( );						if ( labelExpString != null								&& labelExpString.length( ) > 0 )						{							Object labelExpObject = new ScriptExpression(									labelExpString );							labelMap.put( parameterGroup.getName( )									+ "_"									+ ( ( ScalarParameterHandle ) param )											.getName( ), labelExpObject );							queryDefn.getRowExpressions( ).add( labelExpObject );						}						GroupDefinition groupDef = new GroupDefinition( );						groupDef.setKeyExpression( valueExpString );						queryDefn.addGroup( groupDef );					}				}				IPreparedQuery query = dataEngine.prepare( queryDefn );				IQueryResults result = query.execute( executionContext						.getSharedScope( ) );				IResultIterator resultIter = result.getResultIterator( );				dataCache.put( parameterGroup.getName( ), resultIter );				return;			} catch ( BirtException ex )			{				ex.printStackTrace( );			}		}		dataCache.put( parameterGroup.getName( ), null );	}