Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
MyFile.php :
$this->src('criter')
->query("SELECT
concat(concat(concat('PTM',p.ptm_id),' : '),p.ptm_lib) PTM,
p.PTM_ID,
p.PTM_LIB
FROM
cfg_pt_mesure p,
cfg_arc a
WHERE
p.arc_id = a.arc_id (+)
AND
a.arc_suppr (+) = 0
AND
p.ptm_suppr (+) = 0
AND
PTM_ID<994
order by PTM_ID")
->pipe(new Map(array(
'{value}' => function($row, $metaData) {
$row['PTM'] = (string)$row['PTM'];
$row['PTM_ID'] = (float)$row['PTM_ID'];
return array($row);
}
)))
->pipe(new ColumnMeta(array(
"PTM"=>array(
'type' => 'string',
),
"PTM_ID"=>array(
'type' => 'number',
)
)))
->pipe(new Custom(function($data){
$data["PTM"] = utf8_encode($data["PTM"]);
return $data;
}))
->pipe($this->dataStore('PTM'));
$this->src('criter')
->query("select
TO_CHAR(F.MFH_HD, 'DD/MM/YYYY HH24:MI:SS') MFH_HD,
F.MFH_DEBIT,
F.MFH_TAUX,
F.MFH_VITESSE
from
HST_MES_FLUX_HEURE F
join
CFG_PT_MESURE P on F.PTM_ID=P.PTM_ID
where
p.ptm_lib = trim(substr('$ptm_nom',instr('$ptm_nom',':')+1))
AND
f.MFH_hd >= TO_DATE('$date1 $heure1','YYYY/MM/DD HH24:Mi')
AND
f.MFH_hd < TO_DATE('$date2 $heure2','YYYY/MM/DD HH24:Mi')
order by F.MFH_HD")
->pipe(new Map(array(
'{value}' => function($row, $metaData) {
$row['MFH_HD'] = (string)$row['MFH_HD'];
$row['MFH_DEBIT'] = (float)$row['MFH_DEBIT'];
$row['MFH_TAUX'] = (float)$row['MFH_TAUX'];
$row['MFH_VITESSE'] = (float)$row['MFH_VITESSE'];
return array($row);
}
)))
->pipe(new ColumnMeta(array(
"MFH_HD"=>array(
'type' => 'string',
),
"MFH_DEBIT"=>array(
'type' => 'number',
),
"MFH_TAUX"=>array(
'type' => 'number',
),
"MFH_VITESSE"=>array(
'type' => 'number',
),
)))
->pipe($this->dataStore('table_horaire'));
myFile_export.php :
<?php
require_once "T1_Comptage_QT_TT.php";
$Comptage_QT_TT = new Comptage_QT_TT;
$Comptage_QT_TT->run()->exportToExcel(array("table_horaire"))->toBrowser("Comptage_QT_TT_VT.xls");
$Comptage_QT_TT->render("T1_Comptage_QT_TT");
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo