Bug 164273 Exception is thrown out when export a report to library [02]
Description: Exception is thrown out when export a report to library It doesn't support java-based event handler, either. Build number: 2.2.0.v20061113-0636 Steps to reproduce: 1. New a library with a data source, a data set, a dynamic report parameter, a data binding to the data set. 2. New a report use the library, and drag the data source, data set, report parameter and the data from Library Explorer to Outline. 3. Drag the parameter from Outline to Layout, save. 4. Export the report to library. Expected result: The report can be exported to library. Actual result: Exception is thrown out. Error log: A BIRT exception occurred. Plug-in Provider:Eclipse.org Plug-in Name:BIRT Model Plug-in ID:org.eclipse.birt.report.model Version:2.2.0.v20061111-0633 Error Code:Error.NameException.DUPLICATE Error Message:The name "NewData" duplicates an existing name. Please choose a different name.
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/util/ElementExporter.java
* <li>The element must have name.
	 * </ul>
	 * 
	 * @param elementToExport
	 *            handle of the element to export
	 */
	static void checkElementToExport( DesignElementHandle elementToExport )
	{
		ModuleHandle root = elementToExport.getRoot( );
		if ( !( root instanceof ReportDesignHandle ) )
		{
			throw new IllegalArgumentException(
					"The element to export must be in design file." ); 
		}
		if ( StringUtil.isBlank( elementToExport.getName( ) ) )
		{
			throw new IllegalArgumentException(
					"The element must have name defined." ); 
		}
	}
	/**
	 * Checks whether the given structure is suitable for exporting.
	 * <ul>
	 * <li>The structure must be in design file.
	 * <li>The structure must have name property value.
	 * <li>The structure must be one of <code>EmbeddedImage</code>,
	 * <code>CustomColor</code> and <code>ConfigVariable</code>.
	 * </ul>
	 * 
	 * @param structToExport