Hi,
As you are getting the error only when running the query in web, please perform which should solve your issue.
1. Please apply below note which is valid for your issue.
2160500 - Error CX_SY_OPEN_SQL_DB in the authorization log
2. After this please regenerate the query in RSRT using the button "Generate Report".
Please then check the issue again.
Regards,
Amit