[App] JS Scan Code Can Query Information

  • Last update:  2021-12-23
  • I. Overview

    1. Version

    Report sever version

    JAR package

    HTML5 Mobile terminal dispaly plugin version

    App version

    10.02019-12-0510.4.4910.4.49

    2. Solutions

    FineReport supports the mobile terminal to scan the code of the text widget to automatically query the report information, without the need to manually enter the text widget information.

    This function is realized by adding an automatic query JS statement in the post-editing event of the text widget : _g().parameterCommit();.

    Support range:

    App support

    The text widget in the report, the text widget in the form.

    II. Example

    1. Operation steps

    1) New template

    Open the FineReport designer, clickFile>New GeneralReport, create a new template dataset ds1, and write the SQL query statement: SELECT * FROM Sales_Volume in theDB Querydialog box, and clickOK, as shown in the figure below:

    1.png

    Drag the fields in the template dataset ds1 into the corresponding cells, as shown in the figure below:

    2.png

    3) Click Template>Template Parameters, add parameters in theTemplate Parameters prompt box, and double-click to modify the name of the template parameter to Region, and set the Default Value to blank. As shown below:

    3.png

    Click theEdit button on the parameter panel to enter the parameter panel setting interface. The widget setting panel in the upper right corner will display the parameters without added widgets. Click the Region or click Add All to add the default widget of the parameter to the parameter panel. As shown below:

    4.png

    Click theEdit button of the custom widget, select the text box widget type, and add a Text widget with the widget name region, as shown in the figure below:

    5.png

    Double-click cell A1 to set filter conditions for it, and the region is equal to the parameter$region, as shown in the figure below:

    6.png

    2) Add automatic query JS statement

    AddAfter Editing to the text widget: _g().parameterCommit();, as shown in the figure below:

    7.png

    3) Select input method

    Select the text widget and select three support methods under Mobile Terminal: Scan Code or Manually Input, Mannual Input Only, Scan Code Input Only. This document selects Scan Code Input Only, as shown in the following figure:

    8.png


    2. Preview effect on mobile terminal

    Add the template to the decision-making system and access the template on the mobile terminal.

    App display:

    Only supports scanning code input, that is, clicking on the entire text widget  area will trigger the scanning code, as shown in the following figure:

    9.gif

    III. Download template

    Please refer to the completed template: 

    %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\JS\[App] JS_scan_code_query_information.cpt

    Click to download: 

    [App] JS_scan_code_query_information.cpt

    Attachment List


    Theme: Fine Mobile
    • 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