我在 BRIO (Hyperion Interactive Reporting Studio) 中编写了以下代码。代码是 JavaScript 或 JScript,但我不确定是哪一个,因为我只是在学习语法并且不确定它们有何不同。
无论如何,我Script(line number) missing; before statement
在以下几行中遇到语法错误:
if (xYear == 2012 && yMonth == 10) {stopIt = "Yes"} else (yMonth == 12) {stopIt = "Yes"}
和
var myDate = New Date(xYear, yMonth, 1)
在下面的代码中。
var xYear
var yMonth
for (j = 2009; j = 2012; j++)
{
xYear = j
if (xYear == 2009) {yMonth = 7} else {yMonth = 1}
var StopIt = "No"
Do
{
var myDate = New Date(xYear, yMonth, 1)
Alert (myDate)
//var myQuery = ActiveDocument.Sections["qry_billing"]
//myQuery.Limits["Accounting Year Month"].CustomValues.RemoveAll()
//myQuery.Limits["Accounting Year Month"].CustomValues.Add(myDate)
//myQuery.Limits["Accounting Year Month"].SelectedValues.Add(myDate)
//myQuery.Process()
//var Path = "W:\\Major Accounts\\Alliance Process\\AAA\\reference_files\\Results"
//var File = "Results" + "_" + xYear + "_" + yMonth+ " .txt"
//ActiveDocument.Sections["Results"].Export(Path + "\\" + File,bqExportFormatText,true)
yMonth = yMonth + 1
if (xYear == 2012 && yMonth == 10) {stopIt = "Yes"} else if (yMonth == 12) {stopIt = "Yes"}
}
While (stopIt != "Yes")
}
有人可以帮我解决这个问题吗,因为我不明白为什么它要求我提供;
,因为我认为 BRIO 文档脚本中甚至不需要它。