yann22580 Posted January 21, 2020 Share Posted January 21, 2020 Hi,I followed the Admin guide and tested with a new user on JRS 6.4.0 and JRS 7.5.0 and I get the same error :"Attribute 'host' is not defined in the User Profile."Or if the host is defined in the Server profile :"Attribute 'host' is not defined in the server Profile."2020-01-21 17:27:10,545 ERROR ProfileAttributesResolverImpl,http-apr-8080-exec-12:307 - Erreur de substitution dans la ressource /datasources/JDBC_PGDH, champ 'url'. Attribut 'host' non défini dans le Server Profile.Here is the URL : jdbc:postgresql://{attribute('host','Server')}:{attribute('port','Server')}/{attribute('db','Server')}If anyone has an idea ?Regards,Yann Link to comment Share on other sites More sharing options...
swood_1 Posted January 22, 2020 Share Posted January 22, 2020 Here is how you can use Attributes in Data Source definitions: https://community.jaspersoft.com/documentation/tibco-jasperreports-server-administrator-guide/v750/attributes-data-source-definitionsWhen you do something like "{attribute('host','Server')}" a value for the "host" attribute needs to be in the Server Attributes (Manage > Server Settings > Server Attributes) need to be set."{attribute('someKey','User')}" implies a "someKey" needs to be in the User Atributes of the currently logged in user."{attribute('someKey')}" implies that the Server will search for a "someKey" attribute in the following order: User (logged in user), Organization hierarchy of logged in user, Server.Sherman Link to comment Share on other sites More sharing options...
yann22580 Posted January 22, 2020 Author Share Posted January 22, 2020 Thanks to you Sherman but what you explain is exactly what I did. I precised I followed the Admin guide and create a new user for the tests.I tried with the attributes at the user level or server level, both reacts the same with the error below : " 'host' attribute not defined at User/Server profile".I attached another screenshot of the user attributes.Would you have another idea ? Link to comment Share on other sites More sharing options...
asimkin Posted March 10, 2020 Share Posted March 10, 2020 Hi,in Manage > Server Settings > Server Attributes menu you should add atrbiutes using their name/key, that is justuserNamepasswordSyntax like {attribute('host','Server')} should be used in Da tasource definition only:jdbc:postgresql://{attribute('host','Server')}:{attribute('port','Server')}/{attribute('db','Server')}Best regards,Andriy Link to comment Share on other sites More sharing options...
yann22580 Posted March 12, 2020 Author Share Posted March 12, 2020 Hi Andriy,Thanks for your answer, it works.Ttoo bad it tooks so long just because of that..Regards,Yann Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now