JS Wrap Cell Prompt Text

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

    1.1 Problem Description

    If using Finereport's default tooltip of cell, the text in the tooltip cannot be displayed in multiple lines, as shown in the following screenshot:

    1609119182692148.png

    With JavaScript, it is necessary to let text be wrapped in tooltip, as shown in the following screenshot:

    1609119226590742.png


    1.2 Solution

    Use the title attribute of JavaScript.

    II. Demo

    2.1 Data preparation

    Create a new report and new dataset ds1.

    SQL statement of ds1:

    SELECT * FROM Sales_Volume where Region = 'East China'

    1609119259890223.png  


    2.2 Design report

    1) Design the report as follows:

    2) In the menu bar, select Template > Web Attributes. In Pagination Preview tab,

    add a Loading End event, and the JS code is:

    $("td[id^=B1-]").attr("title","Statistics show sales still in service at the end of the month.\nContains sales resigned on the last day of the month");

    2.3 View results

    Save report,select Pagination Preview,and the results are as shown below:

    1.gif

    Tips:Not support mobile devices.

    III. 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