当前位置: 首页>>代码示例>>PHP>>正文


PHP Helper_Config::getJasperStarterPostgresTT方法代码示例

本文整理汇总了PHP中Helper_Config::getJasperStarterPostgresTT方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper_Config::getJasperStarterPostgresTT方法的具体用法?PHP Helper_Config::getJasperStarterPostgresTT怎么用?PHP Helper_Config::getJasperStarterPostgresTT使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Helper_Config的用法示例。


在下文中一共展示了Helper_Config::getJasperStarterPostgresTT方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: printReport

 public function printReport($date_begin, $date_end, $tipo_rpte, $tipo_descarga = NULL)
 {
     if (empty($tipo_descarga)) {
         $tipo_descarga = 'xlsx';
     }
     $this->load->library('library_jasperstarter');
     $java_bin = Helper_Config::getBinaryJava();
     //$firebird_ftt = Helper_Config::getJasperStarterFirebirdTT();
     $postgres_ftt = Helper_Config::getJasperStarterPostgresTT();
     $this->library_jasperstarter->setPathFolderOutput(BASEPATH . '../application/temp');
     $this->library_jasperstarter->setPathJavaBin($java_bin);
     //$this->library_jasperstarter->dbGeneric( $firebird_ftt['db-driver'], $firebird_ftt['db-url'], $firebird_ftt['dbuser'], $firebird_ftt['dbpasswd']);
     $this->library_jasperstarter->dbGeneric($postgres_ftt['db-driver'], $postgres_ftt['db-url'], $postgres_ftt['dbuser'], $postgres_ftt['dbpasswd']);
     $condicion = ' AND 1=1 ';
     $isSuccess = FALSE;
     if ($tipo_rpte == 'RPTE_CAMARAS_GENERAL') {
         $path_file_jasper = BASEPATH . "../application/reports/camera_general/rpte_camera_general.jasper";
         $file_name_download = "CAMARA_EN_GENERAL_" . uniqid();
         $file_name_output = 'camaras_general_' . uniqid();
         $isSuccess = TRUE;
     } else {
         if ($tipo_rpte == 'RPTE_ACCESS_TERMINAL') {
             $path_file_jasper = BASEPATH . "../application/reports/acceso_terminal/rpte_access_terminal.jasper";
             $file_name_download = "ACCESO_TERMINAL" . uniqid();
             $file_name_output = 'acceso_terminal_' . uniqid();
             $isSuccess = TRUE;
         } else {
             if ($tipo_rpte == 'RPTE_BANIOS') {
                 $path_file_jasper = BASEPATH . "../application/reports/banios/rpte_banios.jasper";
                 $file_name_download = "BAÑOS" . uniqid();
                 $file_name_output = 'baños_' . uniqid();
                 $isSuccess = TRUE;
             } else {
                 if ($tipo_rpte == 'RPTE_PATIO_COMIDA') {
                     $path_file_jasper = BASEPATH . "../application/reports/patio_comida/rpte_patio_comida.jasper";
                     $file_name_download = "PATIOS_DE_COMIDAS" . uniqid();
                     $file_name_output = 'patios_de_comidas_' . uniqid();
                     $isSuccess = TRUE;
                 } else {
                     if ($tipo_rpte == 'RPTE_ESCALERA_ASCENSOR') {
                         $path_file_jasper = BASEPATH . "../application/reports/escalera_ascensor/rpte_escalera_ascensor.jasper";
                         $file_name_download = "ESCALERAS_ASCENSORES" . uniqid();
                         $file_name_output = 'escaleras_ascensores_' . uniqid();
                         $isSuccess = TRUE;
                     } else {
                         if ($tipo_rpte == 'RPTE_TORNIQUETE') {
                             $path_file_jasper = BASEPATH . "../application/reports/torniquetes/rpte_torniquetes.jasper";
                             $file_name_download = "TORNIQUETES" . uniqid();
                             $file_name_output = 'torniquetes_' . uniqid();
                             $isSuccess = TRUE;
                         }
                     }
                 }
             }
         }
     }
     $arrParameter = array('fecha_inicio' => $date_begin, 'fecha_fin' => $date_end, 'condicion' => $condicion, 'ci_root_path' => BASEPATH . '../');
     if ($isSuccess) {
         /* @var $oReport oReport */
         $oReport = $this->library_jasperstarter->buildReport($path_file_jasper, $file_name_output, $arrParameter, $tipo_descarga);
         if ($oReport->isSuccess()) {
             //$data = file_get_contents( $oReport->filePath() ); // Read the file's contents
             //force_download($file_name_output, $data);
             $mime = get_mime_by_extension($oReport->fileExtension());
             //$mime = "application/pdf";
             ob_clean();
             header("Content-disposition: attachment; filename={$file_name_download}.{$tipo_descarga}");
             header("Content-type: {$mime}");
             readfile($oReport->filePath());
         } else {
             header('Content-Type: text/html; charset=utf-8');
             echo "ERROR DE EJECCIÓN<br/>";
             echo "COMANDO: " . $oReport->cmd();
         }
     } else {
         header('Content-Type: text/html; charset=utf-8');
         echo "ERROR DE EJECCIÓN<br/>";
         echo "TIPO DE REPORTE: " . $tipo_rpte;
     }
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:80,代码来源:reporte_general.php

示例2: printReport

 public function printReport($tipo_informacion, $tipo_sub_informacion, $year, $month, $day, $day_week, $area, $tipo_descarga = NULL)
 {
     if (empty($tipo_descarga)) {
         $tipo_descarga = 'xlsx';
     }
     $this->load->library('library_jasperstarter');
     $java_bin = Helper_Config::getBinaryJava();
     $postgres_ftt = Helper_Config::getJasperStarterPostgresTT();
     $this->library_jasperstarter->setPathFolderOutput(BASEPATH . '../application/temp');
     $this->library_jasperstarter->setPathJavaBin($java_bin);
     $this->library_jasperstarter->dbGeneric($postgres_ftt['db-driver'], $postgres_ftt['db-url'], $postgres_ftt['dbuser'], $postgres_ftt['dbpasswd']);
     $isSuccess = FALSE;
     $ci_root_path = BASEPATH . '../';
     $CI_ROOT_PATH_REPORT = $ci_root_path . "/application/reports/";
     $titulo = NULL;
     $name_tabla = NULL;
     $by_where = NULL;
     $case_group_camera = NULL;
     if ($tipo_informacion == 'INFORMATION_BY_DAY') {
         $path_file_jasper = $CI_ROOT_PATH_REPORT . 'panel_control/by_day/rpte_dynamic_by_day';
         $file_name_download = 'BY_DAY_' . $tipo_sub_informacion . uniqid();
         $file_name_output = strtolower('BY_DAY_' . $tipo_sub_informacion . uniqid());
         $date_begin = $year . '-' . $month . '-01';
         $date_end = $year . '-' . $month . '-' . Helper_Fecha::getLastDay_By_YearMonth($year, $month, TRUE);
         if ($area == 'ACCESOS_GENERALES') {
             $titulo = 'Accesos Generales';
             $name_tabla = 'access_terminal';
             $case_group_camera = "CASE " . "WHEN t_d.id_group_camera = '1' THEN " . "'Puerta 1' " . "WHEN t_d.id_group_camera = '2' THEN " . "'Puerta 2' " . "WHEN t_d.id_group_camera = '3' THEN " . "'Puerta 3' " . "ELSE " . "'NO FOUND' " . "END";
             $by_where = " AND t_d.id_group_camera BETWEEN '1' AND '3'";
         } elseif ($area == 'ARRIBO_PASAJEROS') {
             $titulo = 'Arribo de Pasajeros';
             $name_tabla = 'access_terminal';
             $case_group_camera = "CASE " . "WHEN t_d.id_group_camera = '4' THEN " . "'Puerta A' " . "WHEN t_d.id_group_camera = '5' THEN " . "'Puerta B' " . "WHEN t_d.id_group_camera = '6' THEN " . "'Puerta C' " . "ELSE " . "'NO FOUND' " . "END";
             $by_where = " AND t_d.id_group_camera BETWEEN '4' AND '6'";
         } elseif ($area == 'TORNIQUETES') {
             $path_file_jasper = $CI_ROOT_PATH_REPORT . 'panel_control/by_day/rpte_toniquete_by_day';
             $titulo = 'Torniquetes';
             $name_tabla = 'torniquete';
         } elseif ($area == 'ESCALERAS_ELECTRICAS') {
             $titulo = 'Escaleras Electricas';
             $name_tabla = 'escalera_and_ascensor';
         } elseif ($area == 'ASCENSORES') {
             $titulo = 'Ascensores';
             $name_tabla = 'escalera_and_ascensor';
         } elseif ($area == 'PATIO_COMIDAS') {
             $titulo = 'Patio de Comidas';
             $name_tabla = 'patios_comida';
         } elseif ($area == 'BANIOS') {
             $titulo = 'Baños';
             $name_tabla = 'banio';
         }
         $isSuccess = TRUE;
     } else {
         if ($tipo_informacion == 'INFORMATION_BY_HOUR') {
             $path_file_jasper = $CI_ROOT_PATH_REPORT . 'panel_control/by_hour/' . strtolower($tipo_sub_informacion) . '/';
             $file_name_download = 'BY_HOUR_' . $tipo_sub_informacion . uniqid();
             $file_name_output = strtolower('BY_HOUR_' . $tipo_sub_informacion . uniqid());
         }
     }
     $arrParameter = array('titulo' => $titulo, 'name_table' => $name_tabla, 'case_group_camera' => $case_group_camera, 'by_where' => $by_where, 'fecha_inicio' => $date_begin, 'fecha_fin' => $date_end, 'ci_root_path' => $ci_root_path);
     if ($isSuccess) {
         /* @var $oReport oReport */
         $oReport = $this->library_jasperstarter->buildReport($path_file_jasper, $file_name_output, $arrParameter, $tipo_descarga);
         if ($oReport->isSuccess()) {
             //$data = file_get_contents( $oReport->filePath() ); // Read the file's contents
             //force_download($file_name_output, $data);
             $mime = get_mime_by_extension($oReport->fileExtension());
             //$mime = "application/pdf";
             ob_clean();
             header("Content-disposition: attachment; filename={$file_name_download}.{$tipo_descarga}");
             header("Content-type: {$mime}");
             readfile($oReport->filePath());
         } else {
             header('Content-Type: text/html; charset=utf-8');
             echo "ERROR DE EJECCIÓN<br/>";
             echo "COMANDO: " . $oReport->cmd();
         }
     } else {
         header('Content-Type: text/html; charset=utf-8');
         echo "ERROR DE EJECCIÓN<br/>";
         echo "TIPO DE REPORTE: " . $area;
     }
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:83,代码来源:panel_control.php

示例3: printReport

 public function printReport($date_begin, $date_end, $tipo_rpte, $rpte_grupo, $tipo_descarga = NULL)
 {
     if (empty($tipo_descarga)) {
         $tipo_descarga = 'xlsx';
     }
     $this->load->library('library_jasperstarter');
     $java_bin = Helper_Config::getBinaryJava();
     //$firebird_ftt = Helper_Config::getJasperStarterFirebirdTT();
     $postgres_ftt = Helper_Config::getJasperStarterPostgresTT();
     $this->library_jasperstarter->setPathFolderOutput(BASEPATH . '../application/temp');
     $this->library_jasperstarter->setPathJavaBin($java_bin);
     //$this->library_jasperstarter->dbGeneric( $firebird_ftt['db-driver'], $firebird_ftt['db-url'], $firebird_ftt['dbuser'], $firebird_ftt['dbpasswd']);
     $this->library_jasperstarter->dbGeneric($postgres_ftt['db-driver'], $postgres_ftt['db-url'], $postgres_ftt['dbuser'], $postgres_ftt['dbpasswd']);
     $condicion = ' AND 1=1 ';
     $isSuccess = FALSE;
     if ($tipo_rpte == 'RPTE_RESUMEN_CAMARAS_GENERAL') {
         $path_file_jasper = BASEPATH . "../application/reports/resumen_camras_general/rpte_resumen_camara_general.jasper";
         $file_name_download = "RESUMEN_CAMARA_EN_GENERAL_" . uniqid();
         $file_name_output = 'resumen_camaras_general_' . uniqid();
         $condicion .= ' AND 1=1 ';
         $isSuccess = TRUE;
     } else {
         if ($tipo_rpte == 'RPTE_RESUMEN_GRUPOS_CAMARAS') {
             if ($rpte_grupo == '1') {
                 $path_file_jasper = BASEPATH . "../application/reports/accesos_generales/rpte_accesos_generales.jasper";
                 $file_name_download = "RESUMEN_ACCESOS_GENERALES_" . uniqid();
                 $file_name_output = 'resumen_accesos_generales_' . uniqid();
             } elseif ($rpte_grupo == '2') {
                 $path_file_jasper = BASEPATH . "../application/reports/viajeros_arriban/rpte_viajeros_arriban.jasper";
                 $file_name_download = "RESUMEN_VIAJEROS_ARRIBAN_" . uniqid();
                 $file_name_output = 'resumen_viajeros_arriban_' . uniqid();
             } elseif ($rpte_grupo == '3') {
                 $array = explode("-", $date_begin);
                 $year = $array[0];
                 $month = $array[1];
                 $date_begin = $date_begin . '-01';
                 $date_end = $date_end . '-' . Helper_Fecha::getLastDay_By_YearMonth($year, $month);
                 $path_file_jasper = BASEPATH . "../application/reports/corredores/rpte_corredores.jasper";
                 $file_name_download = "RESUMEN_CORREDORES_" . uniqid();
                 $file_name_output = 'resumen_corredores_' . uniqid();
             } elseif ($rpte_grupo == '4') {
                 $path_file_jasper = BASEPATH . "../application/reports/escaleras_electricas/rpte_escalera_electrica.jasper";
                 $file_name_download = "RESUMEN_ESCALERAS_ELECTRICAS_" . uniqid();
                 $file_name_output = 'resumen_escaleras_electricas_' . uniqid();
             } elseif ($rpte_grupo == '5') {
                 $path_file_jasper = BASEPATH . "../application/reports/ascensores/rpte_ascensores.jasper";
                 $file_name_download = "RESUMEN_ASCENSORES_" . uniqid();
                 $file_name_output = 'resumen_ascensores_' . uniqid();
             } elseif ($rpte_grupo == '6') {
                 $path_file_jasper = BASEPATH . "../application/reports/resumen_patio_comida/rpte_patio_comida.jasper";
                 $file_name_download = "RESUMEN_PATIO_COMIDA_" . uniqid();
                 $file_name_output = 'resumen_patio_comida_' . uniqid();
             } elseif ($rpte_grupo == '7') {
                 $path_file_jasper = BASEPATH . "../application/reports/resumen_banios/rpte_banios.jasper";
                 $file_name_download = "RESUMEN_BAÑOS_" . uniqid();
                 $file_name_output = 'resumen_baños_' . uniqid();
             } elseif ($rpte_grupo == '8') {
                 $path_file_jasper = BASEPATH . "../application/reports/resumen_torniquetes/rpte_resumen_torniquetes.jasper";
                 $file_name_download = "RESUMEN_TORNIQUETES_" . uniqid();
                 $file_name_output = 'resumen_torniquetes_' . uniqid();
             } elseif ($rpte_grupo == '9') {
                 $path_file_jasper = BASEPATH . "../application/reports/resumen_general/rpte_resumen_general.jasper";
                 $file_name_download = "RESUMEN_GENERAL" . uniqid();
                 $file_name_output = 'resumen_torniquetes_' . uniqid();
             }
             $isSuccess = TRUE;
         }
     }
     $arrParameter = array('fecha_inicio' => $date_begin, 'fecha_fin' => $date_end, 'condicion' => $condicion, 'ci_root_path' => BASEPATH . '../');
     if ($isSuccess) {
         /* @var $oReport oReport */
         $oReport = $this->library_jasperstarter->buildReport($path_file_jasper, $file_name_output, $arrParameter, $tipo_descarga);
         if ($oReport->isSuccess()) {
             //$data = file_get_contents( $oReport->filePath() ); // Read the file's contents
             //force_download($file_name_output, $data);
             $mime = get_mime_by_extension($oReport->fileExtension());
             //$mime = "application/pdf";
             ob_clean();
             header("Content-disposition: attachment; filename={$file_name_download}.{$tipo_descarga}");
             header("Content-type: {$mime}");
             readfile($oReport->filePath());
         } else {
             header('Content-Type: text/html; charset=utf-8');
             echo "ERROR DE EJECCIÓN<br/>";
             echo "COMANDO: " . $oReport->cmd();
         }
     } else {
         header('Content-Type: text/html; charset=utf-8');
         echo "ERROR DE EJECCIÓN<br/>";
         echo "TIPO DE REPORTE: " . $tipo_rpte;
     }
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:92,代码来源:reporte_resumen.php


注:本文中的Helper_Config::getJasperStarterPostgresTT方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。