此示例说明如何提交报表。脚本将调用包含所需参数的批处理文件,而不是参数直接包含在脚本中。请注意,如果尝试提交的报表脚本中的参数带有等号 (=),该脚本将失败。
#
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)
上面引用的 myreport.bat
文件可以在参数中包含等号,如下所示:
runreport.bat <username> <password> "TB All Columns (Per,Cat,Loc)" "Period=Jan 15" "Category=Actual" "Location=AAA" "Rule Name=AAA" "Report Output Format=PDF"