"#错误"在Microsoft Reporting 3.0中使用Lookup时

时间:2015-12-15 14:46:04

标签: tsql reporting-services lookup microsoft-reporting

我们正在使用Microsoft Reporting生成每日报告。我想在我们的一个表中添加另一列。最初,我已经正确设置了这个,报告工作得很好。但是,由于技术性,我必须使用不同的表(具有完全相同的数据),所以我编辑了查询,一旦我这样做,我明星得到"#错误"在我的专栏的细胞卡片中。

细胞表达:

=Lookup(Fields!fldFlight.Value, Fields!OutboundFlightNumber.Value, Fields!OnTime.Value, "DataSet")

我使用以下查询来形成DataSet:

SELECT
 turnarounds_staging.OutboundFlightNumber
,turnarounds_staging.VisitDatabaseID AS [turnarounds_staging VisitDatabaseID]
,turnarounds_staging.STDDate
,events_staging.VisitDatabaseID AS [events_staging VisitDatabaseID]
,events_staging.OnTime
,events_staging.Event
FROM
turnarounds_staging
LEFT OUTER JOIN events_staging
 ON turnarounds_staging.VisitDatabaseID = events_staging.VisitDatabaseID
WHERE
 events_staging.Event ='PDC'AND
 turnarounds_staging.STDDate= @Date

其中@Date是指示昨天的参数。

如果我将查询更改为原始表(相同)。它工作正常。 当turnarounds_staging与原始表相同时,有什么想法会发生这种情况吗?

0 个答案:

没有答案