public function lineListOfEquipmentWithEquipmentUtilizationAction() { //ccem proposed list 3.23 (33) $this->_helper->layout->setLayout('reports'); $data_arr = array(); $search_form = new Form_ReportsSearch(); $ccm_models = new Model_CcmModels(); $form_values['office'] = $this->_request->getParam('office', ''); $form_values['combo1'] = $this->_request->getParam('combo1', ''); $form_values['combo2'] = $this->_request->getParam('combo2', ''); if ($this->_request->isPost()) { if ($search_form->isValid($this->_request->getPost())) { $form_values = array_merge($form_values, $search_form->getValues()); $ccm_models->form_values = $form_values; $data_arr = $ccm_models->lineListOfEquipmentWithEquipmentUtilization(); } } $xmlstore = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; $xmlstore .= "<rows>"; foreach ($data_arr as $sub_arr) { $xmlstore .= "<row>"; $xmlstore .= "<cell>" . $sub_arr['Province'] . "</cell>"; $xmlstore .= "<cell>" . $sub_arr['Distirct'] . "</cell>"; // $xmlstore .= "<cell>" . $sub_arr['Tehsil'] . "</cell>"; // $xmlstore .= "<cell><![CDATA[" . $sub_arr['UC'] . "]]></cell>"; $xmlstore .= "<cell><![CDATA[" . $sub_arr['FacilityName'] . "]]></cell>"; $xmlstore .= "<cell>" . $sub_arr['FacilityType'] . "</cell>"; $xmlstore .= "<cell>" . $sub_arr['LibraryID'] . "</cell>"; $xmlstore .= "<cell><![CDATA[" . $sub_arr['Model'] . "]]></cell>"; $xmlstore .= "<cell><![CDATA[" . $sub_arr['Make'] . "]]></cell>"; $xmlstore .= "<cell>" . $sub_arr['SerialNumber'] . "</cell>"; $xmlstore .= "<cell>" . $sub_arr['NetVol4'] . "</cell>"; $xmlstore .= "<cell>" . $sub_arr['NetVol20'] . "</cell>"; $xmlstore .= "<cell>" . $sub_arr['WorkingSince'] . "</cell>"; $xmlstore .= "<cell>" . $sub_arr['WorkingStatus'] . "</cell>"; $xmlstore .= "</row>"; } $xmlstore .= "</rows>"; $this->view->main_heading = "CCEM Reports"; $this->view->report_title = "Refrigerators/Freezers not in use"; $this->view->headers = 'Province,District,Facility Name,Facility Type,Catalog ID,Model,Make,' . 'Serial No,Net Vol +4,Net Vol -20,Year of Supply,Working Status'; $this->view->rspan = ''; $this->view->cspan = '#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan'; $this->view->width = '*,*,*,*,*,*,*,*,*,*,*,*'; $this->view->ro = 'ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro'; $this->view->xmlstore = $xmlstore; $this->view->search_form = $search_form; $this->view->data = $data_arr; $search_form->facility_type->setValue($form_values['facility_type']); $this->view->form_values = $form_values; $this->view->inlineScript()->appendFile(Zend_Registry::get('baseurl') . '/js/all_level_area_combo_report_graph.js'); }