gpt4 book ai didi

php - Reportico - 报告参数传递

转载 作者:行者123 更新时间:2023-11-29 13:14:29 24 4
gpt4 key购买 nike

请帮我通过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}

错误消息:

Error: Error ( 1064) in Connection: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '})' at line 3

最佳答案

我的脚本:

        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();

我的reportico查询:

select 
l_number, due_number, due_date, amount, capital, interest
from
loan_due
where
l_number = "{USER_PARAM,lnumber}"
limit
0, 30

关于php - Reportico - 报告参数传递,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21660025/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com