Using a YORN lookup in a parameter for a BIRT report

Technote (FAQ)


Question

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

Answer

In the Maximo 7.1.1.4 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">
<parameters>
<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");


- 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.


Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

IBM Maximo Asset Management
Report Admin

Software version:

7.1.1, 7.5

Operating system(s):

Platform Independent

Reference #:

1517148

Modified date:

2013-11-06

Translate my page

Machine Translation

Content navigation