0

I am very new to SSRS, being transferred over to reporting from my current position in a couple of months.

I am trying to have my table be visible or hidden based on a particular parameter. If @rate is left blank I want the table to be hidden, if not I would like it to be visible. Is this possible?

My query:

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
Femmer
  • 133
  • 12

1 Answers1

1

Go to Tablix properties.

enter image description here

In Visibility tab select the last radio button and use the below expression:

enter image description here

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

Let me know if this helps.

alejandro zuleta
  • 13,962
  • 3
  • 28
  • 48
  • Thank you very much once again! I can handle anything anyone throws at me for sql queries, but this ssrs stuff is tough to get used to when there is really no one in my department to ask questions. Thank god for stackoverflow! – Femmer Nov 10 '16 at 13:31