Maximo

 View Only
  • 1.  Perform direct print using Automation script

    Posted Mon October 18, 2021 09:44 AM
    Hi All,

    I would like to know whether there is a way to perform direct print on action launch point automation script on Maximo 7.6.1.2? I have button which invokes an automation script and based on some condition a custom report should get printed just the way how work order details report direct print works. 
    I see submitPrint method in ReportDialogBean which probably performs the direct print however I'm unable to invoke it in the automation script.

    ------------------------------
    MAX092012
    ------------------------------

    #Maximo
    #AssetandFacilitiesManagement


  • 2.  RE: Perform direct print using Automation script

    Posted Tue October 19, 2021 03:10 AM
    Hi,

    i'm do it this way in Python AutomationScript:

    context = UIContext.getCurrentContext();
    wcs = context.getWebClientSession();
    Utility.sendEvent(WebClientEvent("RUNAREPORT", ":RUNAREPORT_" + str(reportNum) + "__QL:-tbb", str(reportNum) + "_QL", wcs));

    You need to know reportNum you want to print.


    ------------------------------
    Pawel Nowicki
    ------------------------------



  • 3.  RE: Perform direct print using Automation script

    Posted Tue October 19, 2021 04:22 AM
    Hi Pawel,
    Thank you for your response. I tried however I'm getting an error as Control ':RUNAREPORT_1237__QL:-tbb' could not be found in order to process the 'RUNAREPORT' event. :: 
    Also can you please explain what does the following line do ? ("RUNAREPORT", ":RUNAREPORT_" + str(reportNum) + "__QL:-tbb", str(reportNum) + "_QL", wcs));

    ------------------------------
    MAX092012
    ------------------------------



  • 4.  RE: Perform direct print using Automation script

    Posted Tue October 19, 2021 11:29 AM
    You may want to check out this article: https://www.ibm.com/docs/en/control-desk/7.6.1.1?topic=documents-server-side-printing-reports

    ------------------------------
    Steve Hauptman
    ------------------------------



  • 5.  RE: Perform direct print using Automation script

    Posted Tue October 19, 2021 12:40 PM
    Hi Steve,
    Thank you for your response. I cannot use the steps provided in the link since I have to mention the printer name and this is not possible. I'm typically trying to invoke direct print dialog which comes up for OOB report while performing direct print.

    ------------------------------
    MAX092012
    ------------------------------



  • 6.  RE: Perform direct print using Automation script

    Posted Wed October 20, 2021 04:11 AM
    Edited by System Test Wed March 22, 2023 11:44 AM
    Hi , 

    I'm doing using this way in python AS


    from java.util import Hashtable
    from psdi.webclient.system.controller import WebClientEvent

    reportInfo=Hashtable()
    reportInfo.put("appname", "PO");
    reportInfo.put("reportname", "poprint.rptdesign")
    reportInfo.put("whereclause", "ponum='" + mbo.getString("ponum") + "'")
    sessioncontext=service.webclientsession().getAdaptorInstance()
    webclientevent=WebClientEvent("RUNREPORTBYNAME", "mainrec", reportInfo, sessioncontext)
    sessioncontext.queueEvent(webclientevent)

    ------------------------------
    Abdelmonem Boughdiri
    ------------------------------



  • 7.  RE: Perform direct print using Automation script

    Posted Wed October 20, 2021 10:22 AM
    Hi Abdelmonem,

    Thank you for your response. It works as expected. 



    ------------------------------
    MAX092012
    ------------------------------



  • 8.  RE: Perform direct print using Automation script

    Posted Tue July 26, 2022 11:32 AM
    Hi Abdelmonem I'm trying to run your script but I'm having this error "psdi.util.MXApplicationException: BMXAA7837E - Ha ocurrido un error que ha impedido que el script CRONSCRIPT del punto de ejecución null se ejecute.
    ImportError: No module named controller in <script> at line number 2"
    This is the line with the error : from psdi.webclient.system.controller import WebClientEvent

    Any idea on what's going on?

    Thanks for reading and Regards

    Pablo

    ------------------------------
    Pablo Condoleo
    ------------------------------