PDA

View Full Version : Accessing the parameter label programmatically with the reporting engine



jonpentaho
03-13-2012, 12:22 PM
Hi,

The class ParameterDefinitionEntry represents a parameter in the report (MasterReport), and the method getParameterAttribute(String domain, String name, ParameterContext parameterContext) gets the label. Where can I get the domain from? I've looked in the MasterReport, DefaultParameterContext... god knows why it can't be called 'getLabel()' and not reference a bunch of obscure, hidden-away classes.

Thanks!

Taqua
03-13-2012, 12:31 PM
The class ParameterAttributeNames contains everything, including the namespace/domain for each group of attributes.

jonpentaho
03-14-2012, 07:50 AM
The class ParameterAttributeNames contains everything, including the namespace/domain for each group of attributes.

Thanks, the ParameterAttributeNames.Core class had the domain I need. It was also in getParameterAttributeNamespaces() for the ParameterDefinitionEntry object. I had in fact got this correct, the problem was that I interpreted 'parameter attribute name' as the parameter name. It is in fact the word 'label', obtained by looking at the results for getParameterAttributeNames(String domainName) in the PDE object.