Add a YORN lookup in a parameter for a BIRT report

This tip from IBM Support is very useful for adding a true/false lookup dialog for a parameter on the BIRT report request dialog.

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”);

– Because YORN lookups are used for Bound parameters, 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. [IBM Support]

Here are some screenshots:

YORN Lookup

YORN Lookup BIRT Parameters

Did You Know...

As Maximo Experts, we have developed Maximo adds on products to make Maximo work assignment simple, reporting easy, and facilitating service requests seamless. Check out our additional products EZPlanner, EZInsight, and EZRequest.

Find Out More

One thought on “Add a YORN lookup in a parameter for a BIRT report

  1. Hello, I tried to use the yornlookuplist Without an attribute as the document describes. The request page does NOT display a binding error but it does not display the lookup popup either. If I add an application attribute the popup does display. However according to the documentation you shouldn’t need an attribute for  date or yorn lookup. Do you have any idea if this is a bug?

Leave a Reply

Your email address will not be published. Required fields are marked *