I. Overview
1. Application scenarios
Some cells in the report are calculation formulas. After exporting to Excel, I hope to keep these formulas for secondary calculation. When the associated cells in the formula are changed, the formula can still calculate the result. The export effect is shown in the figure below:
2. Realization ideas
In the formula definition panel, check the "Preserve formula when export"option to save the calculation formula after exporting the report to Excel.
Note: This method only supports Unaltered Export as it is. Does not support Full page export, page to sheet export.
II. Example
1. Design Report
Open the designer's built-in template: %FR_HOME%\webroot\WEB-INF\reportlets\GettingStartedEN.cpt
Cells C5 and D5 are summation formulas. Double-click these two cells respectively, and the formula definition panel will pop up. Check Preserve formula when export, as shown in the figure below:
2. Effect Preview
1) Save the report, click the pagination preview, and after querying the data, click Export button in the toolbar, and choose Unaltered Export as it is to get the Excel file.
2) Open the obtained Excel file, and the retained formula is shown in the figure below: