silvio.araujo Posted March 7, 2019 Share Posted March 7, 2019 Hi friends!Every report we mount with Jasper Studio includes UUID numbers for every element. It will be very useful, if I can retrieve these elements using the generated UUID, but... is it possible? I would like to retrieve an element in a JRElement (for instance), inside a scriptlet, to manipulate it... But I could not find any method or example in that way, like: "JRElement jre = reportResource.findByUUID(<UUID>);" or something...If it's impossible to do such a thing, why this UUID attribute exists? Link to comment Share on other sites More sharing options...
Friendly User Posted March 11, 2019 Share Posted March 11, 2019 UUID is used mostly for the interactive elements like tables and crosstabs to identify the elements for sorting/filtering/etc. It's used in the viewer and on the engine level, I am not sure there is useful API available to interact with elements using UUID. Link to comment Share on other sites More sharing options...
hozawa Posted March 12, 2019 Share Posted March 12, 2019 Haven't tried this but seems like creating a Map with values from JRIdentifiable.getUUID() and then searching the Map? Link to comment Share on other sites More sharing options...
silvio.araujo Posted March 13, 2019 Author Share Posted March 13, 2019 @hozawa, that was near what I need, but not exactly... I verify that it's possible to use this getUUID() from uncompiled "jrxml" files, but not "on-the-fly". What I want is to pick an element within a scriptlet, using its UUID (or its key), to change its attributes based on data beeing processed. But I guess it is not possible... 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