代码:
oRpt = new ReportDocument();
oRpt.Load(path);
oRpt.SetDataSource(ds);
string selectFormula= "{QueryTime}= '000'";//这个是新加的
oRpt.DataDefinition.RecordSelectionFormula = selectFormula;//这个也是
this.crystalReportViewer1.ReportSource = oRpt;
this.crystalReportViewer1.Show();
运行报错:Error in File C:\.....rpt
Error in formula <Record_Selection>
'{QueryTime}='000"this field name is not known.