Bug 324546 external .js file has no effect in beforeOpen if the data set is used to generate a dynamic parameter selection
Build Identifier: I define a function "replace_query" in an external .js file, and then include it in the report. I then use the function in the beforeOpen script. If the data set is not used to generate a dynamic parameter selection, then it works fine. Otherwise, when viewing the report, it will give this error: Error evaluating Javascript expression. Script engine error: ReferenceError: "replace_query" is not defined. Reproducible: Always Steps to Reproduce: 1. Define a function in an external .js file 2. Include the .js file in the report 3. Call the function in the beforeOpen script of a data set that is also used to generate a dynamic parameter selection
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/GetParameterDefinitionTask.java
scalarParameter.setAllowBlank( handle.allowBlank( ) );
			scalarParameter.setAllowNull( handle.allowNull( ) );
			scalarParameter.setIsRequired( handle.isRequired( ) );
			scalarParameter.setScalarParameterType( handle.getParamType( ) );
			String controlType = handle.getControlType( );
			if ( DesignChoiceConstants.PARAM_CONTROL_CHECK_BOX.equals( controlType ) )
				scalarParameter.setControlType( IScalarParameterDefn.CHECK_BOX );
			else if ( DesignChoiceConstants.PARAM_CONTROL_LIST_BOX
					.equals( controlType ) )
				scalarParameter.setControlType( IScalarParameterDefn.LIST_BOX );
			else if ( DesignChoiceConstants.PARAM_CONTROL_RADIO_BUTTON
					.equals( controlType ) )
				scalarParameter.setControlType( IScalarParameterDefn.RADIO_BUTTON );
			else if ( DesignChoiceConstants.PARAM_CONTROL_AUTO_SUGGEST
					.equals( controlType ) )
				scalarParameter.setControlType( IScalarParameterDefn.AUTO_SUGGEST );
			else
				scalarParameter.setControlType( IScalarParameterDefn.TEXT_BOX );
			scalarParameter.setDefaultValue( handle.getDefaultValue( ) );
			scalarParameter.setDisplayName( handle.getDisplayName( ) );
			scalarParameter.setDisplayNameKey( handle.getDisplayNameKey( ) );
			scalarParameter.setFormat( handle.getPattern( ) );
			scalarParameter.setHelpText( handle.getHelpText( ) );
			scalarParameter.setHelpTextKey( handle.getHelpTextKey( ) );
			scalarParameter.setPromptText( handle.getPromptText( ) );
			scalarParameter.setPromptTextKey( handle.getPromptTextID( ) );
			scalarParameter.setIsHidden( handle.isHidden( ) );
			scalarParameter.setName( handle.getName( ) );
			String valueType = handle.getDataType( );
			if ( DesignChoiceConstants.PARAM_TYPE_BOOLEAN.equals( valueType ) )