public function totalPopulationByFacilityTypeAction()
 {
     //ccem 4.4.1
     $this->_helper->layout->setLayout('reports');
     $data_arr = array();
     $search_form = new Form_ReportsSearch();
     $ccm_warehouse = new Model_CcmWarehouses();
     if ($this->_request->isPost()) {
         if ($search_form->isValid($this->_request->getPost())) {
             //$ccm_warehouse->form_values['office'] = (!empty($this->_request->combo1))?($this->_request->combo1):($this->_request->office);
             $ccm_warehouse->form_values['office'] = !empty($this->_request->combo1) ? $this->_request->combo1 : 0;
             $data_arr = $ccm_warehouse->getTotalPopulationByFacilityType();
         }
     }
     $xmlstore = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
     $xmlstore .= "<rows>";
     foreach ($data_arr as $sub_arr) {
         $xmlstore .= "<row>";
         $xmlstore .= "<cell>Federal</cell>";
         $xmlstore .= "<cell><![CDATA[" . $sub_arr['FacilityType'] . "]]></cell>";
         $xmlstore .= "<cell>" . $sub_arr['NoOfFacilities'] . "</cell>";
         $xmlstore .= "<cell>" . $sub_arr['Minimum'] . "</cell>";
         $xmlstore .= "<cell>" . $sub_arr['Maximum'] . "</cell>";
         $xmlstore .= "<cell>" . $sub_arr['Mean1'] . "</cell>";
         $xmlstore .= "</row>";
     }
     $xmlstore .= "</rows>";
     $this->view->main_heading = "CCEM Reports";
     $this->view->report_title = "Total population by facility type";
     $this->view->headers = 'Area,Facility Type,No. of Facilities,Minimum,Maximum,Mean';
     $this->view->rspan = '';
     $this->view->cspan = '#cspan,#cspan,#cspan,#cspan,#cspan';
     $this->view->width = '120,*,150,150,150,150';
     $this->view->ro = 'ro,ro,ro,ro,ro,ro';
     $this->view->xmlstore = $xmlstore;
     $this->view->search_form = $search_form;
     $this->view->data = $data_arr;
     $base_url = Zend_Registry::get('baseurl');
     $this->view->inlineScript()->appendFile($base_url . '/js/all_level_area_combo_report_graph.js');
 }