Maximo Open Forum

 View Only
  • 1.  Can we display used dataset open sql queries on report output

    Posted 10-08-2021 05:09
    Hello Experts,
    I want to display the open method sql queries on report output post run. I know there is a way for writing the query in to log file but want to check if we can display the sql query on layout post running report.

    Any help on this is highly appreciated.
    #Reporting

    ------------------------------
    Pradeep Rout
    TCSL
    ------------------------------


  • 2.  RE: Can we display used dataset open sql queries on report output

    Posted 10-11-2021 08:50
    1. In the Data set open method, add  reportContext.setGlobalVariable("mysql",sqlText); at the end . Here mysql is a Variable and SQLText is the variable you are writing your query against. 
    1. Add a Dynamic Text to the Report Layout
    2. Add this code to the Dynamic Text .
    reportContext.getGlobalVariable("mysql");

    Report should show the Query along with report output

    Thanks
    Vineet Joshi

    ------------------------------
    vineet joshi
    Asset Analytix
    ------------------------------



  • 3.  RE: Can we display used dataset open sql queries on report output

    Posted 10-12-2021 04:27
    Thanks a lot this worked.

    ------------------------------
    Pradeep Rout
    TCSL
    ------------------------------