Exemple #1
0
 public function toExcelAction()
 {
     $this->filename = 'staffList.xls';
     $this->type = 'Excel5';
     $generic = new GenericProfilesObject();
     $generic->setOrderBy('GP_LastName');
     $profile = new StaffProfilesObject();
     $oAddr = new AddressObject();
     $this->select = $profile->getAll(null, false);
     $this->select->joinLeft($generic->getDataTableName(), $profile->getDataId() . ' = ' . $generic->getDataId(), array('lastName' => 'GP_LastName', 'firstName' => 'GP_FirstName', 'email' => 'GP_Email', 'member_id' => 'GP_MemberID'));
     $this->select->joinLeft($oAddr->getDataTableName(), $oAddr->getDataId() . ' = ' . $profile->getAddressField());
     $this->select->joinLeft($oAddr->getIndexTableName(), $oAddr->getIndexId() . ' = ' . $oAddr->getDataId());
     $this->tables = array('GenericProfiles' => array('GP_LastName', 'GP_FirstName', 'GP_Email'), 'StaffProfile' => array('SP_GenericProfileId'), 'AddressData' => array('A_CityTextValue'), 'AddressIndex' => array('AI_FirstTel', 'AI_SecondTel'));
     $this->fields = array('firstName' => array('width' => '250px'), 'lastName' => array('width' => '250px'), 'email' => array('width' => '250px'), 'AI_FirstTel' => array('width' => '250px'), 'AI_SecondTel' => array('width' => '250px'));
     $this->filters = array();
     parent::toExcelAction();
 }
Exemple #2
0
 public function toExcelAction()
 {
     $this->filename = 'benevolesList.xls';
     $this->type = 'Excel5';
     $generic = new GenericProfilesObject();
     $generic->setOrderBy('GP_LastName');
     $profile = new VolunteersProfilesObject();
     $oRef = new ReferencesObject();
     $this->select = $profile->getAll(null, false);
     $this->select->joinLeft($generic->getDataTableName(), $profile->getDataId() . ' = ' . $generic->getDataId(), array('lastName' => 'GP_LastName', 'firstName' => 'GP_FirstName', 'email' => 'GP_Email', 'member_id' => 'GP_MemberID'));
     $this->select->joinLeft($oRef->getDataTableName(), $oRef->getDataId() . ' = VP_Job', array('R_TypeRef'));
     $this->select->joinLeft($oRef->getIndexTableName(), $oRef->getIndexId() . ' = ' . $oRef->getDataId(), array('VP_Job' => 'RI_Value'));
     $this->tables = array('GenericProfiles' => array('GP_LastName', 'GP_FirstName', 'GP_Email'), 'VolunteersProfile' => array('VP_GenericProfileId', 'VP_Job'), $oRef->getDataTableName() => array('R_TypeRef'), $oRef->getIndexTableName() => array('RI_Value'));
     $this->fields = array('firstName' => array('width' => '250px'), 'lastName' => array('width' => '250px'), 'email' => array('width' => '250px'), 'VP_Job' => array('width' => '250px'));
     $this->filters = array();
     parent::toExcelAction();
 }