Use Custom Button in Toolbar to Control the Display and Hide of Widgets

  • Last update:  2020-12-30
  • I. Description

    The Pagination Preview of FineReport displays the parameter pane by default. If you want to click a button on the toolbar to directly control the display and hide of the parameter pane, how to achieve it?

    4.gif

    II. Ideas

    Add a custom button to the toolbar of the Pagination Preview mode, and add a User Defined Event of the custom button to control the display and hide of the parameter pane.

    Script to hide the parameter pane:

    $('.parameter-container').css('visibility','hidden');

    Script to display the parameter pane:

    $('.parameter-container').css('visibility','visible');

    III. Operation steps

    1) Open the report: %FR_HOME%\webapps\webroot\WEB-INF\reportlets\demo\query\customize query period.cpt

    Click Template > Web Attributes > Pagination Preview, choose Individually set for the template, and add a custom button to the toolbar, as shown below:

    2) Double-click the added custom button to enter the toolbar settings, and set the name of this custom button as closing parameter interface. Click on the User Defined Event and add JS code, as shown in the figure:

    script:

    $('.parameter-container').css('visibility','visible');

    3) In the same way, add a custom button named hide parameter interface, as shown in the figure:

    3.png

    JS script:

    $('.parameter-container').css('visibility','hidden');

    IV. Preview the effect

    Save the template, select Pagination Preview, and the effect is as shown at the beginning.

    Note: The mobile terminal does not support this effect.

    V. Completed Template

    Attachment List


    Theme: Report Application
    • 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