IBM Support

Using a YORN lookup in a parameter for a BIRT report

Question & Answer


Can you add a lookup for YORN values in a parameter in the Request Page for a BIRT report?


In the Maximo release (and higher 7.1.1. fixpacks) and 7.5 releases, a lookup has been added for Yes or No values (YORN type). This lookup can therefore be used in BIRT reports to eliminate the question of which specific value to enter in a parameter's value (Do I enter a 'Yes' or a 'Y' or a '1' value?).

YORN fields are indeed stored in the database as numbers (0 and 1) but are presented in Maximo 7.x as localized text. The getBooleanString(String attributeName) method will perform both tasks: retrieve the numeric value and translate it to the appropriate text. You also can obtain the translated value from the integer using getBooleanString(int intValue).

For the Out-of-the-Box Reports, the Security Group Access report security_group.rptdesign has been updated to include the new YORN lookup. In this case, the lookup is used to populate the parameter value for the MAXGROUP.INDEPENDENT database field.
This can be used as an example of how you can apply this lookup in your own custom or customised reports.

An extract from the reports.xml for this Security Group Access report seen below shows how the YORN parameter is set. To find the complete version, access the reports.xml file under <Maximo 711 folder>\reports\birt\reports\USER or ...\SECURGROUP

<report name="security_group.rptdesign">
<parameter name="independent">
<attribute name="attributename">INDEPENDENT</attribute>
<attribute name="lookupname">yornlookuplist</attribute>
<attribute name="sequence">2</attribute>
<attribute name="labeloverride">Independent</attribute>
<attribute name="defaultvalue">false</attribute>

The rptdesign file itself will reference the getBooleanString(String attributeName) method:
row["my_attribute_name"] = maximoDataSet.getBooleanString("my_attribute_name");
for example:
row["independent"] = maximoDataSet.getBooleanString("independent");

You therefore need to open the reports.xml file and find the relevant section for the report on whose parameter you wish to add a YORN lookup.
<report name="REPORT_XYZ.rptdesign">
Then add a line under the tag referencing the parameter where you want to add a YORN lookup:
<parameter name="FIELD_XYZ">
<attribute name="lookupname">yornlookuplist</attribute>
as in the example above.

Alternatively, you can go to Report Administration, find the rptdesign record for the relevant report, go to the parameters table, expand the line for the relevant parameter and add yornlookuplist in the Lookup Name field and then save the record.

- YORN lookups are used for Bound parameters, so they will ALWAYS need to have the Attribute Name field populated.

- Do not use default value for YORN parameters (such as Y, O, J or N depending on language). If default values are required, you can only use “true” or “false”, as in the example above.

- Remember that the parameter name you use in the report 's rptdesign file must match exactly (with the same case) the parameter name you create in Maximo's Report Administration application.

If you are experiencing issues referencing the 'yornlookuplist' lookup in a report, please contact Tivoli Maximo Support services.

[{"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Report Admin","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.1.1;7.5;7.6","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
17 June 2018