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.2 Solution
Add a custom button and then add an event to the button with JavaScript.
You will learn |
---|
|
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.
2.2 Preview
Save the template and click [Pagination Preview]. The preview effect is shown as below: