throw new ReportServiceException( "Invalid parameter: " + firstName );
throw new ReportServiceException( BirtResources .getFormattedString( ResourceConstants.REPORT_SERVICE_EXCEPTION_INVALID_PARAMETER, new String[]{firstName} ) );
	private Map getParameterSelectionLists( IViewerReportDesignHandle design,			Map params, InputOptions options ) throws ReportServiceException	{		if ( params == null || params.size( ) == 0 )			return new HashMap( );		List[] listArray = null;		Map ret = new HashMap( );		List remainingParamNames = new ArrayList( );		String firstName = (String) params.keySet( ).iterator( ).next( );		Collection paramDefs = getReportService( ).getParameterDefinitions(				design, options, false );		ParameterDefinition paramDef = null;		for ( Iterator it = paramDefs.iterator( ); it.hasNext( ); )		{			ParameterDefinition temp = (ParameterDefinition) it.next( );			if ( temp.getName( ).equals( firstName ) )			{				paramDef = temp;				break;			}		}		if ( paramDef == null )		{			throw new ReportServiceException( "Invalid parameter: " + firstName );		}		ParameterGroupDefinition group = paramDef.getGroup( );		if ( group != null )		{			if ( group.getParameterCount( ) > params.size( ) )			{				int remainingParams = group.getParameterCount( )						- params.size( );				for ( int i = 0; i < remainingParams; i++ )				{					ParameterDefinition def = (ParameterDefinition) group							.getParameters( ).get( params.size( ) + i );					remainingParamNames.add( def.getName( ) );				}			}		}		// Query all lists.		try		{			if ( remainingParamNames.size( ) > 0 )			{				listArray = new List[remainingParamNames.size( )];				for ( int k = 0; k < remainingParamNames.size( ); k++ )				{					Object[] keyValue = new Object[params.size( ) + k];					Set values = params.keySet( );					int i = 0;					for ( Iterator it = values.iterator( ); it.hasNext( ); )					{						keyValue[i] = params.get( it.next( ) );						i++;					}					for ( i = 0; i < k; i++ )					{						if ( listArray[i].isEmpty( ) )						{							keyValue[params.size( ) + i] = null;						}						else						{							keyValue[params.size( ) + i] = listArray[i].get( 0 );						}					}					listArray[k] = doQueryCascadeParameterSelectionList(							design, group.getName( ), keyValue, options );					ret.put( remainingParamNames.get( k ), listArray[k] );				}			}		}		catch ( RemoteException e )		{			throw new ReportServiceException( e.getLocalizedMessage( ) );		}		return ret;	}