douxin2002 2014-02-09 14:07
浏览 44

Reportico - 报告参数传递

Please help me to pass report parameters to "Reportica report" through PHP code.

This is the method i tried:

PHP code:

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

Report Query:

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

Error message:

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

  • 写回答

1条回答 默认 最新

  • douqi4673 2014-02-12 02:55
    关注

    My script:

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

    My reportico query:

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

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度