Bug 200751 NPE in Excel emitter
writer.text( ( (Data) d ).txt.toString( ) ); SEVERE: An error happened while running the report. Cause: java.lang.NullPointerException at org.eclipse.birt.report.engine.emitter.excel.ExcelWriter.writeText(Ex celWriter.java:102) at org.eclipse.birt.report.engine.emitter.excel.ExcelWriter.writeTxtData (ExcelWriter.java:152) at org.eclipse.birt.report.engine.emitter.excel.ExcelEmitter.outputData( ExcelEmitter.java:311) at org.eclipse.birt.report.engine.emitter.excel.ExcelEmitter.end(ExcelEm itter.java:286) at org.eclipse.birt.report.engine.api.impl.RenderTask$PageRangeRender.re nder(RenderTask.java:593) at org.eclipse.birt.report.engine.api.impl.RenderTask.render(RenderTask. java:260)
engine/org.eclipse.birt.report.engine.emitter.prototype.excel/src/org/eclipse/birt/report/engine/emitter/excel/layout/ExcelLayoutEngine.java
{
			IDataContent dataContent = (IDataContent) txt;
			Object value = dataContent.getValue( );
			if ( value instanceof Number )
			{
				String format = ExcelUtil.getPattern( value, entry
						.getProperty( StyleConstant.NUMBER_FORMAT_PROP ) );
				entry.setProperty( StyleConstant.NUMBER_FORMAT_PROP, format );
				entry.setDatatype( Data.NUMBER );
				Data data = new Data( value, entry );
				data.setDatatype( Data.NUMBER );
				return data;
			}
			else if ( value instanceof Date )
			{
				String format = ExcelUtil.getPattern( value, entry
						.getProperty( StyleConstant.DATE_FORMAT_PROP ) );
				entry.setProperty( StyleConstant.DATE_FORMAT_PROP, format );
				entry.setDatatype( Data.DATE );
				Data data = new Data( ExcelUtil.formatDate(value), entry );
				data.setDatatype( Data.DATE );
				return data;
			}
			  
			Data data1 = new Data( dataContent.getText( ).trim( ), entry );
			data1.setDatatype( Data.STRING );
			return data1;
		}
		
		Data data1 = new Data( txt, entry );