Submitting a Report
This example shows how to submit a report. The script calls a batch file that includes the necessary parameters instead of including the parameters directly in the script. Note that if you try to submit a report script with an equal sign (=) in the parameters, the script fails.
#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 fileimport osimport subprocessos.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)The myreport.bat file referenced above can contain the equal sign as a parameter as in the following:
runreport.bat <username> <password> "TB All Columns (Per,Cat,Loc)" "Period=Jan 15" "Category=Actual" "Location=AAA" "Rule Name=AAA" "Report Output Format=PDF"