使用SSRS,如果我使用代码创建了一个数据集(我有以下的union语句)。我想要做的是 - 只返回一个数据 - 传递参数的地方(是customer_no)基本上是a.customer_no = customer_no作为参数传递的地方。但我不认为我这样做是准确的。
select reservation_no,
customer_no,
'GT Adult' as 'price_type',
a.adult as pt,
(select b.adult from LT_CHC_TOURS_RSV_PRICE b) as current_price
FROM LV_CHC_TOURS_RSV_DATA a
WHERE a.customer_no = Fields!customer_no.Value
union
select reservation_no,
customer_no,
'GT Senior/Student' as 'price_type',
a.senior_student,
(select b.senior_student from LT_CHC_TOURS_RSV_PRICE b) as current_price
from LV_CHC_TOURS_RSV_DATA a
WHERE a.customer_no = Fields!customer_no.Value
我应该用{<1}}代替什么?
答案 0 :(得分:1)
在数据集查询中,将Fields!customer_no.Value
更改为@SomeParameterName
。
然后,仍然在数据集中,转到参数选项卡,并将数据集参数映射到报表参数。