FYI, All reports are running fine without errors in qv 11.
Hence I did code analysis identified this variable is creating the problem. The code running fine after commenting below let variable.Now my doubt why qv11 is not showing any error and getting error in qv 12
We had similar issues to yours. This helped (from the release notes for Nov 2017 release):
BNF script reload mode
A new script reload mode, BNF, has been introduced. It uses the same syntax checks as those in the Script editor. The BNF script reload mode is more strict, and this can cause some scripts to fail. The BNF script reload mode can be disabled, although we recommend disabling it only as a temporary action, in case you are investigating problems with the regular procedure.
If needed, there are two different methods for disabling the BNF reload mode.
• Disabling BNF reload mode for the entire server. Update the Settings.ini by adding the line EnableBnfReload=0
• Disabling BNF reload mode for individual apps. Add the ///$bnf off tag at the top of the script (The tag must be in the first 50 characters of the script). After adding the tag, reload the script
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein