Get Value in Request in Program Network Report

  • Last update:  2020-12-24
  • I. Overview

    Web report is allowed to contain parameters. How can we pass parameter values to a web report when we access the report with a browser?

    In general, we add parameters at the end of the path to the web report being accessed, for example: http://localhost:8075/webroot/decision/view/report?viewlet=com.fr.demo.URLParameterDemo&Region=North China. Where there are a few dozen parameters, parameter values will be passed to the program in forms of lists, arrays and so on.

    The program gets the parameter value in the request, then assigns it to the parameter in the report, and finally displays the corresponding report.

    We will take Template_Parameter.cpt for example. Read the template, convert it to a web report containing parameters, and pass these parameters when accessing the report.

     II. Sample

    III. Preview

    Save URLParameterDemo.class generated from compiling to %FR_HOME%\webroot\WEB-INF\classes\com\fr\demo.

    Trigger the Report Server, access web reports in a browser and pass parameter values to the following path: http://localhost:8075/webroot/decision/view/report?viewlet=com.fr.demo.URLParameterDemo&Region=North China.

    Then you can see the effect below:  

    企业微信截图_16031851261910.png

    Attachment List


    Theme: Secondary Development
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy