I have many subreports in my jaspersoft main report and I pass the credentials to access specific SQL datasource in the "connection expression" in the subreport tab :
I would like to find an another method to make sure that a user can't read this credentials when they access the report with Jaspersoft studio.
Thanks for your help.
I think that it would be easier for you to use default adapters instead of java.sql.Drivermanager, moreover it isn't needed to write credentials.
To do so, you need to export your data adapter to a XML file, then publish it to jasperReports server.
After, that, configure each "Default Data Adapter" property in each subreport, compile them, compile your main report and publish it without datasource connection.
(more information in this jaspersoft documentation : https://community.jaspersoft.com/wiki/how-deploy-and-use-data-adapter-tibco-jasperreports-server-v56)