data.setValueExpr( "row[\"Month\"]" );
data.setResultSetColumn( cs1.getName( ) );
	private void createBody( ) throws SemanticException	{		// Grid 1		GridHandle grid1 = elementFactory.newGridItem( "grid1", 3, 1 );//$NON-NLS-1$		grid1.setWidth( "100%" );//$NON-NLS-1$		reportDesignHandle.getBody( ).add( grid1 );		// First Grid Row		RowHandle row = (RowHandle) grid1.getRows( ).get( 0 );		// Cell (1st Row)		CellHandle cell = (CellHandle) row.getCells( ).get( 0 );		cell.setProperty( StyleHandle.TEXT_ALIGN_PROP,				DesignChoiceConstants.TEXT_ALIGN_CENTER );		try		{			EmbeddedImage image1 = StructureFactory.createEmbeddedImage( );			image1.setType( DesignChoiceConstants.IMAGE_TYPE_IMAGE_JPEG );			image1.setData( load( "logo1.jpg" ) );//$NON-NLS-1$			image1.setName( "logo1" );//$NON-NLS-1$			reportDesignHandle.addImage( image1 );			ImageHandle imageHandle = elementFactory.newImage( "handle" );//$NON-NLS-1$			imageHandle.setSource( DesignChoiceConstants.IMAGE_REF_TYPE_EMBED );			imageHandle.setImageName( "logo1" );//$NON-NLS-1$			cell.getContent( ).add( imageHandle );		}		catch ( IOException e )		{			e.printStackTrace( );		}		cell = (CellHandle) row.getCells( ).get( 1 );		cell.setProperty( StyleHandle.TEXT_ALIGN_PROP,				DesignChoiceConstants.TEXT_ALIGN_CENTER );		try		{			EmbeddedImage image2 = StructureFactory.createEmbeddedImage( );			image2.setType( DesignChoiceConstants.IMAGE_TYPE_IMAGE_JPEG );			image2.setData( load( "logo2.jpg" ) );//$NON-NLS-1$			image2.setName( "logo2" );//$NON-NLS-1$			reportDesignHandle.addImage( image2 );			ImageHandle imageHandle2 = elementFactory.newImage( "imageHandle2" );//$NON-NLS-1$			imageHandle2.setSource( DesignChoiceConstants.IMAGE_REF_TYPE_EMBED );			imageHandle2.setImageName( "logo2" );//$NON-NLS-1$			cell.getContent( ).add( imageHandle2 );		}		catch ( IOException e )		{			e.printStackTrace( );		}		cell = (CellHandle) row.getCells( ).get( 2 );		cell.setProperty( StyleHandle.TEXT_ALIGN_PROP,				DesignChoiceConstants.TEXT_ALIGN_CENTER );		try		{			EmbeddedImage image3 = StructureFactory.createEmbeddedImage( );			image3.setType( DesignChoiceConstants.IMAGE_TYPE_IMAGE_JPEG );			image3.setData( load( "logo3.jpg" ) );//$NON-NLS-1$			image3.setName( "logo3" );//$NON-NLS-1$			reportDesignHandle.addImage( image3 );			ImageHandle imageHandle3 = elementFactory.newImage( "imageHandle3" );//$NON-NLS-1$			imageHandle3.setSource( DesignChoiceConstants.IMAGE_REF_TYPE_EMBED );			imageHandle3.setImageName( "logo3" );//$NON-NLS-1$			cell.getContent( ).add( imageHandle3 );		}		catch ( IOException e )		{			e.printStackTrace( );		}		// Grid 2		GridHandle grid2 = elementFactory.newGridItem( "grid2", 2, 1 );//$NON-NLS-1$		grid2.setWidth( "100%" );//$NON-NLS-1$		reportDesignHandle.getBody( ).add( grid2 );		// First Grid Row		row = (RowHandle) grid2.getRows( ).get( 0 );		// Cell (1st Row)		cell = (CellHandle) row.getCells( ).get( 0 );		cell.setProperty( StyleHandle.TEXT_ALIGN_PROP,				DesignChoiceConstants.TEXT_ALIGN_RIGHT );		cell.setProperty( StyleHandle.VERTICAL_ALIGN_PROP,				DesignChoiceConstants.VERTICAL_ALIGN_MIDDLE );		TableHandle table = elementFactory.newTableItem( null, 3, 1, 1, 1 );		table.setProperty( StyleHandle.TEXT_ALIGN_PROP,				DesignChoiceConstants.TEXT_ALIGN_CENTER );		table.setWidth( "80%" );//$NON-NLS-1$		table.setProperty( TableHandle.DATA_SET_PROP, "Data Set" );//$NON-NLS-1$		// Table sorter		SortKey key = StructureFactory.createSortKey( );		key.setKey( "row[\"Month\"]" );//$NON-NLS-1$		key.setDirection( "asc" );//$NON-NLS-1$		PropertyHandle sort = table.getPropertyHandle( TableHandle.SORT_PROP );		sort.addItem( key );		// Header		RowHandle header = (RowHandle) table.getHeader( ).get( 0 );		CellHandle tcell = (CellHandle) header.getCells( ).get( 0 );		LabelHandle label = elementFactory.newLabel( null );		label.setText( "Product" );//$NON-NLS-1$		label.setStyleName( "Label" );//$NON-NLS-1$		tcell.getContent( ).add( label );		tcell = (CellHandle) header.getCells( ).get( 1 );		label = elementFactory.newLabel( null );		label.setText( "Month" );//$NON-NLS-1$		label.setStyleName( "Label" );//$NON-NLS-1$		tcell.getContent( ).add( label );		tcell = (CellHandle) header.getCells( ).get( 2 );		label = elementFactory.newLabel( null );		label.setText( "Amount" );//$NON-NLS-1$		label.setStyleName( "Label" );//$NON-NLS-1$		tcell.getContent( ).add( label );		// Table Group		TableGroupHandle group = elementFactory.newTableGroup( );		group.setKeyExpr( "row[\"Product\"]" );//$NON-NLS-1$		table.getGroups( ).add( group );		RowHandle groupHeader = elementFactory.newTableRow( 3 );		tcell = (CellHandle) groupHeader.getCells( ).get( 0 );		tcell.setDrop( DesignChoiceConstants.DROP_TYPE_DETAIL );		DataItemHandle data = elementFactory.newDataItem( null );		data.setStyleName( "Data" );//$NON-NLS-1$		data.setValueExpr( "row[\"Product\"]" );//$NON-NLS-1$		tcell.getContent( ).add( data );		group.getHeader( ).add( groupHeader );		RowHandle groupFooter = elementFactory.newTableRow( 3 );		tcell = (CellHandle) groupFooter.getCells( ).get( 0 );		tcell.setProperty( StyleHandle.BORDER_BOTTOM_COLOR_PROP, "#FF8000" );//$NON-NLS-1$		tcell.setProperty( StyleHandle.BORDER_BOTTOM_STYLE_PROP,				DesignChoiceConstants.LINE_STYLE_SOLID );		tcell.setProperty( StyleHandle.BORDER_BOTTOM_WIDTH_PROP,				DesignChoiceConstants.LINE_WIDTH_THIN );		tcell = (CellHandle) groupFooter.getCells( ).get( 1 );		tcell.setProperty( StyleHandle.BORDER_BOTTOM_COLOR_PROP, "#FF8000" );//$NON-NLS-1$		tcell.setProperty( StyleHandle.BORDER_BOTTOM_STYLE_PROP,				DesignChoiceConstants.LINE_STYLE_SOLID );		tcell.setProperty( StyleHandle.BORDER_BOTTOM_WIDTH_PROP,				DesignChoiceConstants.LINE_WIDTH_THIN );		tcell = (CellHandle) groupFooter.getCells( ).get( 2 );		tcell.setProperty( StyleHandle.BORDER_BOTTOM_COLOR_PROP, "#FF8000" );//$NON-NLS-1$		tcell.setProperty( StyleHandle.BORDER_BOTTOM_STYLE_PROP,				DesignChoiceConstants.LINE_STYLE_SOLID );		tcell.setProperty( StyleHandle.BORDER_BOTTOM_WIDTH_PROP,				DesignChoiceConstants.LINE_WIDTH_THIN );		group.getFooter( ).add( groupFooter );		// Detail		RowHandle detail = (RowHandle) table.getDetail( ).get( 0 );		tcell = (CellHandle) detail.getCells( ).get( 1 );		data = elementFactory.newDataItem( null );		data.setStyleName( "Data" );//$NON-NLS-1$		data.setValueExpr( "row[\"Month\"]" );//$NON-NLS-1$		tcell.getContent( ).add( data );		tcell = (CellHandle) detail.getCells( ).get( 2 );		data = elementFactory.newDataItem( null );		data.setStyleName( "Data" );//$NON-NLS-1$		data.setValueExpr( "row[\"Amount\"]" );//$NON-NLS-1$		tcell.getContent( ).add( data );		cell.getContent( ).add( table );		cell = (CellHandle) row.getCells( ).get( 1 );		cell.setProperty( StyleHandle.TEXT_ALIGN_PROP,				DesignChoiceConstants.TEXT_ALIGN_CENTER );		cell.getContent( ).add( createPieChart( ) );	}