@Override
	public void generate() throws GeneratorException {
		//get the extension of the template
		String ext="";
		String templateFile = report.getTemplate();
		int i = templateFile.lastIndexOf('.');
		if (i >= 0) {
		    ext = templateFile.substring(i+1);
		}

		try {
			report.generate(report.getOutput()+"."+ext);
		} catch (XDocReportException e) {
			throw new GeneratorException(GeneratorError.DOCX_GENERATION_ERROR,"Error while generating the DOCX file:"+e.getMessage());
		}
	}