}else if(smartFilterValues!=null){
content = getSmartFilterTemplateContent();
}else if(wk_definition!=null && query!=null && orig_obj!=null){
ObjTemplate qbETemplate = orig_obj.getActiveTemplate();
String templCont = new String(qbETemplate.getContent());
WorksheetDriver q = new WorksheetDriver();
String temp = q.composeWorksheetTemplate(wk_definition, query, null, templCont);
content = temp.getBytes();
}else{
logger.error("Document template not available");
throw new SpagoBIServiceException(SERVICE_NAME, "sbi.document.saveError");
}