What? get the server hostname of the environment where the BIRT report is running.
Why? In a few scenarios, we need to form a URL in hyperlink property to point it to Maximo record or any other integrated application specific to environment.
Maximo BIRT framework don’t support implicit variable :HOSTNAME. This variable is handy on getting the server host name inside Maximo applications like communication template.
How? In order to achieve it inside BIRT, we need to run the sql query
in MAXPROPVALUE table from the system property mxe.hostname on the beforeOpen method of the dataSet; it can also be from any instance or custom system property.
Store the hostname in a Global variable - hostname to use them inside the report.
"https://" + reportContext.getPersistentGlobalVariable ("hostname") + "/maximo/ui/login?event=loadapp&value=asset&additionalevent=sqlwhere"
+"&additionaleventvalue=assetid = (select assetid from asset where siteid = '"+row["siteid"]+"' and assetnum = '"+row["assetnum"]+"')"
report file - hostname_hyperlink_design_file
Courtesy: Madhavan
No comments:
Post a Comment