コード例 #1
0
ファイル: pre_process.php プロジェクト: siwiwit/PhreeBooksERP
 switch ($report->reporttype) {
     case 'frm':
         $output = BuildForm($report, $delivery_method);
         if ($output === true) {
             $error = true;
         }
         break;
     case 'rpt':
         $ReportData = '';
         $success = BuildSQL($report);
         if ($success['level'] == 'success') {
             // Generate the output data array
             $sql = $success['data'];
             $report->page->filter->text = $success['description'];
             // fetch the filter message
             if (!($ReportData = BuildDataArray($sql, $report))) {
                 $messageStack->add(PHREEFORM_NODATA . ' The sql was: ' . $sql, 'caution');
                 $error = true;
                 break;
             }
             // Check for the report returning with data
             if (!$ReportData) {
                 $messageStack->add(PHREEFORM_NODATA . ' The failing sql= ' . $sql, 'caution');
                 $error = true;
             } else {
                 if ($_REQUEST['action'] == 'exp_csv') {
                     $output = GenerateCSVFile($ReportData, $report, $delivery_method);
                 }
                 if ($_REQUEST['action'] == 'exp_xml') {
                     $output = GenerateXMLFile($ReportData, $report, $delivery_method);
                 }
コード例 #2
0
ファイル: ReportMaker.php プロジェクト: strollClouds/snkStudy
     break;
 case RPT_BTN_EXPCSV:
 case RPT_BTN_EXPPDF:
     $Prefs = ReadPostData($ReportID, $Prefs);
     // include the necessary files to build report
     require $PathPrefix . 'includes/tcpdf/tcpdf.php';
     // TCPDF class to generate reports
     require 'WriteReport.inc';
     $ReportData = '';
     $success = BuildSQL($Prefs);
     if ($success['level'] == 'success') {
         // Generate the output data array
         $sql = $success['data'];
         $Prefs['filterdesc'] = $success['filterdesc'];
         // fetch the filter message
         $ReportData = BuildDataArray($ReportID, $sql, $Prefs);
         // Check for the report returning with data
         if (!$ReportData) {
             $usrMsg[] = array('message' => RPT_NODATA . ' The failing sql=' . $sql, 'level' => 'warn');
         }
     } else {
         // Houston, we have a problem, sql build failed
         $usrMsg[] = array('message' => $success['message'], 'level' => $success['level']);
     }
     if ($usrMsg) {
         // then we have a message to display and no report to show
         if ($_POST['FilterForm']) {
             // return to the filter form
             $Title = RPT_CRITERIA;
             $IncludePage = 'forms/ReportsFilter.html';
         } else {
コード例 #3
0
ファイル: reploting.php プロジェクト: nate4osu/Aquatech
    $GraphUpdate;
    $interval = 500;
    $npoints = 25;
    $maxIterations = 200;
    $niters = 0;
    $GraphData = array();
    $x = 0;
    $y = rand(10, 100) * 10;
    for ($i = 0; $i < $npoints; $i++) {
        $x += rand(10, 100) * 5;
        $y += (rand(10, 100) - 0.5) * 10;
        $GraphData[$i] = array($x, $y);
    }
    return $GraphData;
}
$GraphData = BuildDataArray();
$pc = new C_PhpChartX(array($GraphData), 'Graph');
$pc->add_plugins(array('canvasTextRenderer', 'canvasAxisTickRenderer', 'canvasAxisLabelRenderer', 'highlighter', 'canvasOverlay', 'cursor', 'pointLabels'), true);
$pc->set_title(array('text' => 'Test Data Run'));
$pc->set_cursor(array('show' => false));
$pc->set_point_labels(array('show' => false));
$pc->set_highlighter(array('show' => false));
$pc->set_axes_default(array('pad' => 0.05, 'labelRenderer' => 'plugin::CanvasAxisLabelRenderer', 'tickRenderer' => 'plugin::CanvasAxisTickRenderer', 'labelOptions' => array('fontSize' => '13pt')));
$pc->set_axes(array('xaxis' => array('label' => 'Number'), 'yaxis' => array('label' => 'Value')));
// should be the last method to call
$pc->draw(800, 500);
?>

	<script type="text/javascript" lang="javascript">
	     var Graph;
         var GraphUpdate;