I have a Matrix report with some columns that are grouped by Month and Year in the Column Group. Now, these columns are being toggled by the Month Column as the Visibility Property is set to hide but toggled by the Month Column. But when the report is rendered, the hidden columns come out as blank and this defeat the purpose of the report, as seen in the images below. How do I do away with the blank spaces or which is the best way to meet this requirement?
2 Answers
I'm assuming you tried to set the individual column visibility properties...
You actually need to set the group visibility of your EnglishMonthName
group to be toggled by [CalendarYear]
. This will not hide the column completely (as you would not have anything visible to click on to get it back again) but it will collapse the data down and aggregate at the year level.

- 19,839
- 3
- 22
- 35
What you have done to hide your columns is actually working. If you look at that WIDTH of each of the month then you will see they are of the same width. So according to your query you have the months appearing regardless of the corresponding data for that month.
I would do in two way depending on how the users would like it.
If possible and for better performance, I would alter the SQL query and do one of the following: 1. The months for which there is no corresponding data - I would remove the month names (or ID) as well 2. Rather than returning NULLs I would return a valid value like 0 or 'N/A' this will how the month as well as what the data actually is
To do it in the matrix you will need to alter the visibility of the month row as suggested by Alan Schofield

- 177
- 2
- 14
-
Hi Usama and Alan. The month may not necessarily be null. It is collapsed so that users can just click on and view the month(s) they are interested in. Just don't know how to reduce or make the blank for the month users are not interested in go away. – UpwardD Mar 01 '18 at 15:31
-
Hi dLight, as I described the blank is actually the space of the width of the Month column. Please can you share what you mean by blank go away? – Unbound Mar 01 '18 at 17:02
-
Hi Usama, thank you. I got your point very well. What I want though for example from the third image above, April should be close to January since February is collapsed. So, by "blank", I mean the space I get when a month is collapsed(+) as in the space between January and April. How do I achieve this design? – UpwardD Mar 01 '18 at 17:17
-
Sorry still not clear. With your current design if you wanted February to appear the cell would be of same size as the other months. On the other hand if you did not bring in months that did not have the relative data then you would have April right after Jan. This is what I wanted to tell you in my post. – Unbound Mar 01 '18 at 17:43
-
I see you don't get my point. February has data in it and likewise other months apart from March which is why March is not on the list. Now, February has been collapsed by a user because he is not interested in that month. But since the user collapsed that month(February) he does not want to see the empty space between January and April. Please bear in mind that this is not about hiding null. Rather, it is a business logic to hide or collapse the month and space a user is not interested in. – UpwardD Mar 01 '18 at 17:50
-
This is easy enough but as I pointed out in my answer, you will always have 'something' even when it's collapsed otherwise there would be nothing on screen to click on to expand it back out again. – Alan Schofield Mar 01 '18 at 18:11