0

请帮助我通过 PHP 代码将报告参数传递给“Reportica 报告”。

这是我尝试的方法:

PHP代码:

require_once('../reportico/reportico.php'); 

$q = new reportico();

$q->initial_project = "loansys";
$q->initial_project_password = "k013";
$q->initial_report = "loansys.xml";
$q->initial_output_format = "HTML";
$q->embedded_report = true;

$q->allow_debug = true;
$q->forward_url_get_parameters = "";
$q->external_param1 = 1; 
$q->execute($q->get_execute_mode(), true);

报告查询:

SELECT l_number,due_number,due_date,amount,capital,interest
FROM  loan_due
WHERE l_number = {external_param1}

错误信息:

错误:连接中的错误(1064):您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 3 行的 '})' 附近使用正确的语法

4

1 回答 1

1

我的脚本:

        require_once('../reportico/reportico.php'); 
        $q = new reportico();
        $q->initial_project = "xxxx";
        $q->initial_project_password = "xxxx";
        $q->initial_report = "xxxx.xml";
        $q->initial_execute_mode = "MENU";
        $q->access_mode = "SInGLEPROJECT";
        $q->embedded_report = true;
        $q->user_parameters["lnumber"] =  $_POST['cmblnumber'];
        $q->execute();

我的报告查询:

select 
    l_number, due_number, due_date, amount, capital, interest
from 
    loan_due
where
    l_number = "{USER_PARAM,lnumber}"
limit 
    0, 30
于 2014-02-12T02:55:20.947 回答