表可见性SSRS

时间:2016-11-10 13:15:51

标签: reporting-services ssrs-2008-r2

我对SSRS很陌生,在几个月后转到我目前的职位报告。

我试图根据特定参数显示或隐藏我的表格。如果@rate留空,我希望隐藏表格,如果不是,我希望它可见。这可能吗?

我的查询:

SELECT t1.property, '100' AS tran_code, 'ROOM RATE' AS description, 0 AS tax_amt, @rate AS amount
    FROM z_taxtype_detail t1 INNER JOIN z_trancode t2 ON t1.tran_code = t2.code
        WHERE t1.tax_type = 'ROTX'
        AND t1.property = @property
            GROUP BY t1.property
UNION ALL
SELECT t1.property, t2.code, t2.description,
      (CASE WHEN t1.tax_base = '1' THEN (t1.tax_amt / 100)
            WHEN t1.tax_base = '4' THEN t1.tax_amt ELSE 0 END) AS tax,
      (CASE WHEN t1.tax_base = '1' THEN @rate * (t1.tax_amt / 100)
            WHEN t1.tax_base = '4' THEN t1.tax_amt ELSE 0 END) AS tax_amt
    FROM z_taxtype_detail t1 INNER JOIN z_trancode t2 ON t1.tran_code = t2.code
        WHERE t1.tax_type = 'ROTX'
        AND t1.property = @property

1 个答案:

答案 0 :(得分:1)

转到Tablix属性。

enter image description here

在“可见性”选项卡中,选择最后一个单选按钮并使用以下表达式:

enter image description here

=IIF(ISNOTHING(Parameters!Rate.Value) OR Parameters!Rate.Value="", True, False)

如果有帮助,请告诉我。