// if there is only one document type id the user should be
// able to choose between different templates
if (differentDocTypes.size() == 1) {
final String templateId = vars.getRequestGlobalVariable("templates", "templates");
try {
final TemplateInfo usedTemplateInfo = new TemplateInfo(this, report.getDocTypeId(),
report.getOrgId(), vars.getLanguage(), templateId);
report.setTemplateInfo(usedTemplateInfo);
} catch (final ReportingException e) {
throw new ServletException("Error trying to get template information", e);
}