SSRS 2008, attempting to hide columns with a parameter and hide rows made blank by hiding columns

こ雲淡風輕ζ 提交于 2019-12-25 07:04:03

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!