我編寫了這段代碼,但它有這個錯誤。將參數傳遞給水晶報告
「運行時錯誤‘20553’:無效的參數字段名稱」
誰能幫助我解決這個問題?
With CR
.ParameterFields(0) = "start;" + CStr(Form1.cmbMonth.Text) & ";True"
.ParameterFields(1) = "end;" + CStr(Form1.cmbYear.Text) & ";True"
.ReportFileName = App.Path & "\Report\Report1.rpt"
.SelectionFormula = "{SW.dtaMonth}>=date('" & Format(Form1.cmbMonth.Text) & "') and {SW.dtaYear}<=date(" & Format(Form1.cmbYear.Text) & ")"
.WindowTitle = "PG Variable Overhead Report" 'title of report
.Action = 1 'Will Show The Report
End With