Maximo

 View Only

 How can we pass Parameters dynamically from Automation Script to run a Report in MAS MANAGE

Rakesh Mannam's profile image
Rakesh Mannam posted Wed June 25, 2025 03:52 AM

Dear All,

Good Day!

I hope this message finds you well.
I have a requirement in Maximo where the user would like to have a Print icon/button available in each row of a child table.

When the user clicks the Print icon, it should open a report that displays information related to that specific row.

Currently, we are using a script to open the report dialog on clicking the Print icon. I would appreciate your guidance or suggestions on how to properly implement this functionality, especially ensuring that the correct row-specific data is passed to the report.

Looking forward to your valuable inputs.

Thank you in advance for your support!

from psdi.webclient.system.session import WebClientSession;
from psdi.mbo import SqlFormat;

wcs = service.webclientsession()

 

sqf = SqlFormat(mbo, "APPNAME='PLUSGPTW' AND REPORTNAME=:2") 
sqf.setObject(2, "REPORT", "REPORTNAME", "PIPP_Isolation_List1.rptdesign")
where = sqf.format()

reportSet = mbo.getMboSet("$REPORTSPI","REPORT",where) 
#Set the set as disposable, we're not changing the report just reading it 
reportSet.setFlag(39L,True) 
reportSet.reset()

report = reportSet.moveFirst() 
reportnum = str(report.getInt("REPORTNUM")) 
pageName = "reportd"+reportnum 
wcs.loadDialog(pageName) 
reportSet.close()
#wcs.showMessageBox("PRINT", "STICKER", ["Updated target finish for PM-generated work orders."])