0

我在 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
4

1 回答 1

0

Well the parameters are automatically added when you create the datasets. Then, go to the properties for the parameter and change the parameter visibility to hidden or internal.

How are you going to be accessing the report? You can pass the value of the parameter through the url:

Passing parameter via url to sql server reporting service

于 2012-12-10T16:41:05.730 回答