问题
So, i've figured out how to hide a column based on a report parameter. I also know how to hide a row based on a lack of values. MSDN article on that
What I'm trying to accomplish now is to hide a row that is blank if the columns containing data are hidden by parameter.
An example:
+-------+-----+-------+-------+----+------+
| User | Zip | Zorba | Queen | Of | Mars |
+-------+-----+-------+-------+----+------+
| User1 | 34 | | 3 | 8 | |
| User2 | 9 | 39 | 85 | | |
| User3 | | | 43 | 2 | 2 |
+-------+-----+-------+-------+----+------+
Lets say I hide the last three columns with my handy report parameter. Now what's displayed to the user is a blank row for User3. But in the dataset, its not blank. So the row visibility I have set won't work.
What I found when searching was all about how to hide a row or column, which I can do. This seems to require more knowledge than I have.
回答1:
You can use the nested IIF
to get desired result. You can read more about it here http://msdn.microsoft.com/en-IN/library/ms157328.aspx
You can hide the row using the expression. In that expression you can check for the column hiding value to verify if row is to show or hide
= IIF(Youroldexpressiontohidetherow, true,IIF(yourexpressiontohidecolumn,true,false))
So, If your row hiding expression returns false due to it has values in last three columns then you can check whether you are hiding the last 3 columns if you are the set to true if yo are not then set to true. Hope it helps. In case of issue comment.
来源:https://stackoverflow.com/questions/27280800/ssrs-2008-attempting-to-hide-columns-with-a-parameter-and-hide-rows-made-blank