public String usingContext(final Map<String, Object> context) {
try {
ReportTemplate template = getTemplateManager().getTemplateFrom(templateFile);
StringWriter sw = new StringWriter();
template.merge(context, sw);
return sw.toString();
} catch (Exception e) {
throw new RuntimeException("Failed to merge template: " + e.getMessage(), e);
}
}