I. Description
Drill into the sub-report through the hyperlink of the main table, and hope that there is a "return to the previous page" in the sub-report. When there are parameters in the main table, click "return to the previous page" to use the previously used parameters to query data, and No need to click the query button again, as shown below:
II.Ideas
The sub-table is realized by setting the Hyperlink-JavaScript and the parameters are defined. In the main table, you need not to check the Display Nothing Before Query in the parameter interface.
III. Examples
Let's take a look at the specific implementation process.
1. Main report settings
1) Open the template
Open the template: %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Advanced\Data_Drilling_main.cpt.
2) Parameter setting
Add a report parameter named orderID and set its default value to 10001, as shown below:
Add a filter condition of ORDERID Equal to $orderID to the data column where the ORDERID is located, as shown below:
3) Parameter interface setting
Set the control type of the parameter orderID to the drop-down box, and its actual value and display value are the order ID in the order table, as shown below:
The label value is set to the Order number, as shown below:
You need not to check the Display Nothing Before Query, as shown below:
2. Subreport settings
1) Open the template
Open the template: %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Advanced\Data_Drilling_sub.cpt.
2) Hyperlink settings
Fill in a blank cell to return to the previous page, right-click to select the hyperlink, and click Add JavaScript. The specific settings are as follows:
Add the following JS event:
location=FR.cjkEncode("${servletURL}?viewlet=doc-EN/SpecialSubject/HyplinkReport/Data_Drilling_And_Return_main.cpt&orderID=")+orderID;
3. View the effect
Preview the main report in pages. After clicking the hyperlink to the sub-report, click Back to the previous level to return to the main report, as shown in the above rendering.
Note: Mobile terminal is not supported.
4. Completed template
Please refer to the completed template%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\SpecialSubject\HyplinkReport\Data_Drilling_And_Return_main.cpt
%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\SpecialSubject\HyplinkReport\Data_Drilling_And_Return_sub.cpt
Click to download the template:
Data_Drilling_And_Return_main.cpt
Data_Drilling_And_Return_sub.cpt