0

当我使用 RecordSelectionFormula 属性将以下内容传递给 Crystal Report 时,它无法生成并出现错误“The ) is missing。这是一个有效的 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.
4

1 回答 1

0

我使用了以下内容,它解决了我的问题;

DataTable dtRawData = new DataTable();
SqlConnection loConn = ConnectionUtilities.getServerConnection();
loConn.Open();
SqlDataAdapter sdaSysObjects = new SqlDataAdapter(psSqlStatement, loConn);
sdaSysObjects.Fill(dtRawData);
Report.SetDataSource(dtRawData);
于 2012-10-09T16:11:05.040 回答