JS Return to the Main Report in the Subreport

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

    1.1 Requirement

    How to go back from a child report to the parent report?

    See the demonstration below for the effect desired:

    1.gif 


    1.2 Solution

    Add a custom button and then add an event to the button with JavaScript.

    You will learn
    • Sample

      • Steps

      • Preview

    • Download the templates

    II. Sample

    2.1 Steps

    1) Open the child template child.cpt, click [Template]-[Web Attributes]-[Pagination Preview], and add a Custom Button:

    2) Set the Custom Button icon as a Go Back icon:

     

    3) Input the following JavaScript codes for the User Defined Event:

    var backto=backgoto;
    window.location.href=(backto);

    Add a parameter and name it backgoto. Select the formula =CONCATENATE(serverURL,servletURL,'?viewlet=Father.cpt'). Set Father.cpt as the parent report.

    4.png

     

    2.2 Preview

    Save the template and click [Pagination Preview]. The preview effect is shown as below:

    5.gif 

    III. Download the templates

    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