Set rptApp = New CRPEAuto.Application
rptApp.LogOnServer "PDSODBC.DLL", "sbd", "sbd", "epm", "epmis"
Set rpt = rptApp.OpenReport(App.Path & "\\计划管理\\月度保养计划.rpt")
rpt.SQLQueryString = strSQL \'strSQL为查询语句
Set Parms = rpt.FormulaFields
Dim Parm1 As CRPEAuto.FormulaFieldDefinition
Set Parm1 = Parms.Item("Month")
Parm1.Text = "\'" & MonthValue & "\'" \'MonthValue为用户所取
rpt.Preview