Jumping to Different Web Pages in FVS

  • Last update:October 16, 2025
  • Overview

    This document applies to users who have installed the FineVis Data Visualization plugin to learn FVS functions.

    Version

    Report Server Version

    Plugin Version

    11.0

    V1.0.0

    Application Scenario

    You can jump to a single web link or template in FVS by web link/pop-up box events. However, if you need to jump to different links based on different objects, JavaScript events are needed.

    For example, you want to jump to different templates based on the chart series. The effect is shown in the following figure.

    应用场景.gif

    Implementation Method

    Add a JavaScript click event to the component: Open a web link in a new window by JavaScript code.

    The common JavaScript code is as follows:

    iconNote:
    The effects of the following code are opening web links in new tabs. If you need to open a web link on the current page, replace window.open with window.location.replace.

    Scenario

    Example

    Opening a fixed web page

    Absolute path: Ensure that the current server can access the URL.

    window.open("https://www.fanruan.com/");


    Opening a fixed template

    Absolute path: Ensure that the current server can access the URL.

    window.open("http://localhost:8075/webroot/decision/view/report?viewlet=GettingStarted.cpt");


    Opening a template and   passing parameters

    Absolute path: Ensure that the current server can access the URL.

    window.open("http://localhost:8075/webroot/decision/view/report?viewlet=GettingStarted.cpt&Area="+area);


    Opening different templates   based on the passed parameter values

    if(series=='California') /*Determine that the series name is
      California
      .*/{var URL='/
      webroot/decision/view/report?
      viewlet
      =demo/basic/Aggregation Report.cpt
      '; window.open(encodeURI(encodeURI(URL))); //Open
      Aggregation Report.
      cpt in a new tab.}if(series=='New York') /*Determine that the series name is
      New York.*/{var URL='/webroot/decision/view/report?viewlet=demo/basic/Card Split.cpt'; window.open(encodeURI(encodeURI(URL))); //Open Card Split.cpt in a new tab.}

    Example

    Creating a Template

    Choose File > New FineVis Visualization Dashboard on the designer menu bar, customize the dashboard name and canvas size, and click Create Dashboard to create a blank dashboard, as shown in the following figure.

    新建模版.png

    Data Preparation

    Create a database query ds1 with the SQL statement Select * from Sales_Volume, as shown in the following figure.

    准备数据.png

    Adding a Pie Chart Component

    Choose Chart > Pie, and click Pie Chart to add a pie chart component to the page.

    Select the component, choose Content > Data in the setting area, and set Dataset to ds1, Series to Region, and Value to Sales_Volume, as shown in the following figure.

    添加饼图组件.png

    Setting a JavaScript Event

    Select the pie chart component, choose Interaction > Interaction Event, and choose Add Event > Click > JavaScript to add a JavaScript click event.

    Set the event name to Jump to different templates.

    In the Parameter Setting window, add a parameter area, and set Parameter Name to area, Parameter Type to Component Field, and Parameter Content to Series Name.

    设置JS事件.png

    Enter the following JavaScript code.

    if(area=='California') /*Determine that the series name is California.*/{var URL='http://localhost:8075/webroot/decision/view/report?viewlet=demo/basic/Aggregation Report.cpt'; window.open(encodeURI(encodeURI(URL))); //Open Aggregation Report.cpt in a new tab.}if(area=='New York') /*Determine that the series name is New York.*/{var URL='http://localhost:8075/webroot/decision/view/report?viewlet=demo/basic/Card Split.cpt'; window.open(encodeURI(encodeURI(URL))); //Open Card Split.cpt in a new tab.}

    Effect Display

    Save the template and click Preview in the upper right corner. Different sub-templates in new windows are opened based on the clicked series names of the pie chart.

    iconNote:
    The effect cannot be previewed on mobile terminals.

    效果预览.gif

    Template Download

    Download the completed template by clicking Jumping to Different Web Pages in FVS.fvs.

    Attachment List


    Theme: FineVis Data Visualization
    • 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