public String preReportByType() {
        List<ClassObj> lstClass = mdClass.getAll();
        List<ObjectiveObj> lstObjective = mdObjective.getAll();
        List<TopicObj> lstTopic = new LinkedList<TopicObj>();
        if(lstObjective.size() > 0){
            lstTopic = mdTopic.getByObjective(lstObjective.get(0).getObjId());
        }
        
        //validate
        boolean check = true;
        if(lstClass.isEmpty()){
            check = false;
            addFieldError("clo.classname", "Class List is empty");
        }
        
        if(lstObjective.isEmpty()){
            check = false;
            addFieldError("ojto.objName", "Objective List is empty");
        }
        
        if(lstTopic.isEmpty()){
            check = false;
            addFieldError("tpo.name", "Topic List is empty");
        }
        
        if(check){
            mClass.put(ALL, ALL);
            for (ClassObj classObj : lstClass) {
                mClass.put(classObj.getClassname(), classObj.getClassname());
            }
            
            for (ObjectiveObj objectiveObj : lstObjective) {
                mObjective.put(objectiveObj.getObjId(), objectiveObj.getObjName());
            }
            
            for (TopicObj topicObj : lstTopic) {
                mTopic.put(topicObj.getTopicId(), topicObj.getName());
            }
            
            mStatus.put(0, "Fail");
            mStatus.put(1, "Pass");
            
            return SUCCESS;
        }else{
            return ERROR;
        }
    }