我在 ssrs 中有 2 个数据集。一种是联合,另一种是简单查询,但我必须在不由用户输入的情况下将参数传递给两个数据集,而是使用页面参数,即设备编号。基本上报告是根据每个设备编号显示的,应该传递给这些数据集. 一个数据集查询是
SELECT
BHEQNO
,CertifDesc
,Company
,EffDate
,ExpDate
,BHEQSN
,BHEQIV
,BHEQYR
,BHEQMF
,0 AS AI
,0 AS LP
,CZDRNM
,CZADD1
,CZCITY
,CZST
,CZZIP
,BHEQNO AS Equip
,NULL AS Name
,NULL AS Addess
,NULL AS City
,NULL AS State
,NULL AS Zip
,Rate
,ShortName
,ExportShortName
,Coverage
FROM
EquipmentRateLookUp
WHERE
BHEQNO = @BHEQNO
UNION ALL
SELECT
EquipmentNumber
,NULL AS Expr6
,NULL AS Expr7
,NULL AS Expr8
,NULL AS Expr9
,NULL AS Expr10
,NULL AS Expr11
,NULL AS Expr12
,NULL AS Expr13
,AI
,LP
,NULL AS Expr14
,NULL AS Expr15
,NULL AS Expr16
,NULL AS Expr17
,NULL AS Expr18
,NULL AS Expr19
,Name
,Address
,City
,State
,ZIP
,0 As Rate
,NULL As ShortName
,NULL As EShortName
,NULL As Coverage
FROM
LossPayee
WHERE
EquipmentNumber = @BHEQNO
第二个数据集
SELECT
EquipmentNumber
,EBDRNO
,EBEFDTF
,EBEFDTT
,EBTXID
,EBNAME1
,EBADD1
,EBADD2
,EBCITY
,EBSTATE
,EBZIP
FROM
Select_DriverB
WHERE
EquipmentNumber = @BHEQNO
ORDER BY
EBEFDTF DESC