Sottomissione di un report

In questo esempio viene illustrato come sottomettere un report. Lo script richiama un file batch che include i parametri necessari invece che includere i parametri direttamente nello script. Notare che, se si cerca di sottomettere uno script di report con il segno di uguale (=) nei parametri, lo script restituisce un errore.

#
This sample Jython script provides code related to custom scripts. All the messages being logged (meaning printed) are visible in the process log file as per Log Level profile.
#
# Log the beginning of the script, at the INFO level
fdmAPI.logInfo("======================================================================")
fdmAPI.logInfo("Custom Script: Begin")
fdmAPI.logInfo("======================================================================")
# Execute the subprocess to call and run the batch file
import os
import subprocess
os.chdir("D:/ORCL/MW/EPMSystem11R1/products/FinancialDataQuality/bin")
myScriptName = "D:/ORCL/MW/EPMSystem11R1/products/FinancialDataQuality/bin/myreport.bat"
retcode = subprocess.Popen(myScriptName) 
fdmAPI.logDebug("The return code = " + retcode)

Il file myreport.bat a cui si fa riferimento in precedenza contiene il segno di uguale come parametro nei casi riportati di seguito.

runreport.bat <username> <password> "TB All Columns (Per,Cat,Loc)" "Period=Jan 15" "Category=Actual" "Location=AAA" "Rule Name=AAA" "Report Output Format=PDF"