Overview
This document introduces the changes in the official JavaScript APIs when you upgrade FineReport from V10.0 to V11.0. If JavaScript code is used in your templates, you need to read this document carefully before the version upgrade.

Description
API Instruction for 11.0 and 10.0
All officially supported APIs for 11.0 are listed in JS API Summary. Some of these APIs may not be compatible with templates of 10.0. If you are using FineReport 10.0, you are advised to refer directly to the relevant documents for 10.0 and use the APIs for 11.0 with caution.
1. APIs available in 10.0 but not included in 11.0 may pose compatibility risks. You are advised to use these APIs with caution.
2. Some APIs may share the same name in both 10.0 and 11.0, but the calling methods or inherited objects may differ. You are advised to refer to the API introduction documents for 10.0 and use these APIs with caution.
Deprecation of the contentPane Object
The contentPane object has been deprecated in 11.0, and most of its APIs have been migrated to the report object obtained via _g(). Although the deprecated contentPane object and its APIs are still available in 11.0, they will no longer be updated in future releases. Therefore, using them in 11.0 carries compatibility risks, and you are advised to proceed with caution.
1. Most deprecated APIs on the contentPane object have corresponding replacements in the APIs for 11.0. A few without replacements are still being updated. You are advised to refer to the APIs for 11.0 for usage.
2. Special attention is required if legacy APIs involving the contentPane object are used in templates after the version upgrade. You are advised to update these APIs to the APIs for 11.0.
Non-official API Code Solution
Code solutions that modify front-end styles by accessing HTML DOM elements via jQuery or CSS are closely tied to the front-end architecture of the report system. These methods have poor compatibility during version upgrades and should be used with caution.
1. If such solutions stop working after upgrading from 10.0 to 11.0, you can revise the code according to the current front-end structure.
2. When developing templates in 11.0, you are advised to use official APIs and avoid unofficial ones. If issues arise from using unofficial APIs, official support will not assist with troubleshooting.
Usage Issue Between Old and New FRM Report
When you upgrade FineReport from 10.0 to 11.0, the FRM report defaults to the old version. The old FRM report does not support the APIs for the new FRM report introduced in 10.0 or the APIs added in 11.0. You can switch the FRM report to the new version to use the APIs added in 11.0.
1. To use APIs introduced in 11.0, you need to switch the FRM report to the new version.
2. The old version corresponds to the front-end for the FRM report of 10.0. Templates using APIs for 10.0 can still run under the old version, but to avoid potential compatibility risks in the future, you are advised to switch to the new version and use APIs for 11.0.
Usage Issue Caused by New Calculation Engine
The new calculation engine has been built into FineReport 11.0. If JavaScript code exists and the new calculation engine is enabled in templates of FineReport 10.0, compatibility issues may occur after the upgrade. You are advised to modify the JavaScript code with the APIs supported in FineReport 11.0.
Notes
Problem
After JavaScript code is added to the template, the error message "CustomJSError : _xxx.submit is not a function" appears during template preview.
Cause
The API in the code does not exist.
Solution
Check if any spelling errors exist in the APIs used in the code, and check if the APIs used in the code are supported in the current environment. The possible error reasons are as follows:
APIs supported only in FineReport 11.0 are used in the template of FineReport 10.0.
APIs supported only in FineReport 11.0 are used in the FRM report of an older version.
After checking, make the necessary corrections accordingly.