当我使用RecordSelectionFormula属性将以下内容传递给Crystal Report时,无法生成错误“The)”。这是一个有效的Where子句,只是不确定如何在Crystal Reports XI中使用它。
SelectionFormula = "({vInventory_Items.DonorId} IN (8, 1))";
Report.ReportSelectionFormula = SelectionFormula;
错误是;
Error in formula Record_Selection:
'({vInventory_Items.DonorId} IN (8, 1))'
The ) is missing.
答案 0 :(得分:0)
我使用了以下内容并解决了我的问题;
DataTable dtRawData = new DataTable();
SqlConnection loConn = ConnectionUtilities.getServerConnection();
loConn.Open();
SqlDataAdapter sdaSysObjects = new SqlDataAdapter(psSqlStatement, loConn);
sdaSysObjects.Fill(dtRawData);
Report.SetDataSource(dtRawData);