Bug 188336 Fairly Simple Report Generates NPE When Saving as Excel
When attempting to Save the attached report to Excel, the following error is displayed in the viewer instead of the Excel file: + org.eclipse.birt.report.service.api.ReportServiceException: Error happened while running the report; nested exception is: java.util.EmptyStackException
engine/org.eclipse.birt.report.engine.emitter.prototype.excel/src/org/eclipse/birt/report/engine/emitter/excel/ExcelEmitter.java
private int lines = 0, flushLength = 1000;
	private StyleEngine engine = null;
	private ListBuffer lb;
	private OutputStream out = null;
	private List charts = new ArrayList( );
	private ChartConverter chartConverter = new ChartConverter( );
    
	private Hashtable bookmarkList = new Hashtable( );
	
	public void end( IReportContent report )
	{
		try
		{
			
			lb.flush( true, engine );
			ExcelWriter writer = new ExcelWriter( out );
			writer.writeDeclarations( );
			writer.declareStyles( engine.getStyleIDMap( ) );
			writer.startSheet( );
			writer.startTable( width );
			writeDatas( writer );
			writer.endTable( );
			writer.closeSheet( );
			
			for ( int i = 0; i < charts.size( ); i++ )
			{
				File temp = (File) charts.get( i );
				writer.insert( temp );
				temp.delete( );
			}