Hide and merge matrix row group dynamically in SSRS 2005
Hi for allPlease I need any meaningful help about this problem:In Matrix control, simply I select a specific Row Group and change its Visiblity to be adjusted according to a parameterand magic thing happen and I don't know why ???I have 3 Row groups:and at the runtime, if the second row group is hidden, then the first row group also is hidden and I get a big whitespace ?? Why this happens ?and if the third row group is hidden, then all the three row groups are hidden and a more big blank whitespace is appeared ? Why also this happens ?Any help is really appreciated about this issueThanksWindows7_Is_MyLove
February 3rd, 2009 2:50pm

Did you set the visibility property for the group from the row (cell within matrix) or on the actual grouping field (Matrix Properties -> Groups -> Group Properties)? If you set the visibility for the group, those empty rows shouldnt appear....hegde
Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2009 3:08pm

Hi Mahesh_HegdeThanks alot for your replyI understand you, but I confirm to you that I set the visibility of the Group itself by right-click->Edit Group or from the Matrix properties dialogbut I want to ask you about the behavior, do you perform this before on SSRS 2005 and the row group hides successfully and no whitespace appeared ? or what happened ?again thank you alot, But what should I do now ?????????Windows7_Is_MyLove
February 3rd, 2009 3:32pm

This is what i did try -I created a matrix in SQL Server 2005 reporting services. Added 3 groups and one measure in the matrix. Created a report parameter name Visible with two values yes and No. Right Clicked on the lowest group cell in the matrix -> Edit group -> Visibility tab. Initial visibility I set as expression =IIF(Parameters!Visible.Value="Yes",False,True) I initially had enable Toggle item. When I view the report and set the Visible to No, matrix shows only first two group level data no blank rows. I change the Visible to Yes and click view report, it shows 3 group level values. Now, I add the same functionality to second group and make the group3 visible (no expression). Now, when the second group is hidden, 3rd group is also not visible but still, theres no blank line....hegde
Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2009 4:20pm

Hi MaheshThanks alotfor your explanation, please be patient with me little, I will explain to you the situation exactlymy matrix should be like this : Col1 Col2 Col3 Month1 . Month N Data Data Data Value . Value Data Data Data Value . ValueCol1 and Col2 and Col3 are 3 row groups and from Month1 to Month N is a Column groupValue fields are the subtotal of the month cell specified at the design timeAs you know the matrix upper left corner is empty, and I put a rectangle with 3 textboxes with values Col1 and Col2 and Col3my problem is that Col2 or Col3 should be appear or not according to a parameter valueI go simply and change the visiblity of the Col2Row group to be equal the value of the boolean parameter ( I know it should be reversed due to Hidden property not visible) and do the same for Col3 with the second boolean parameterrun the report and when set the parameter1 value to be true -hide the Col2- I got a blank vertical space instead of Col2 and Col3 and Col1 is strechedwait I still need to know if the rectangle which contains columns titles will be shrinked and expanded dynamically with Col2 and Col3 repectively or not ??sure I will give the same expression to both Col2 and Col3 headers textboxes as Rowgroup2 and RowGroup3 visibility expressions ?So what do ou think of this ?I hope you understand meThanks alot for reading ...MohamedWindows7_Is_MyLove
February 3rd, 2009 5:22pm

Could you try running the report after removing the rectangle in title?To find out ifthat's causing problem... ..hegde
Free Windows Admin Tool Kit Click here and download it now
February 4th, 2009 3:55pm

Hi Mohamed, From the scenario you described, I think this issue belongs to the same report you mentioned before in another thread. I hope my explanation will help you solve this issue. About the first problem: parameters did not control the visibility of group correctly. You should create new report for test according to the steps as Hegde said. I think you knew the difference between setting visibility in textbox properties dialog and in Grouping and sorting properties dialog. If you set visibility in Grouping and Sorting Properties dialog, group will display with merger group. You are right. Ina matrix, the third group's visibility base on the first one and second one, the second group's visibility base on the first one. However when you set the parameter1value to be true -hide the Col2- the Group of Col3 willalso be hidden. You will got a horizontal blank not a vertical blank because of the Col1's spread. Wehave the same situation. If you think this is unacceptable or after recreate new report still have strange display issue, I'd like to suggest you a couple of solutions: Solution1: You could create three matrixes like I mentioned before. Create first matrix with one group Col1, the second one with two group Col1 and Col2, the third matrix with three groups. Show or hide any one of them completely according to the parameter. It will solve this issue. Of cause, it will also cause a little performance issue. Solution2: Do not try to hide any group in your matrix. Set expression with "=iif(Parameters! parameter1.Value=1,Fields!Col1.Value,nothing)" in the cell of group. About the second question: if the rectangle which contains columns titles will be shrinking and expanded dynamically with Col2 and Col3?As i knowit will not. So Solution1 is the best choice. Hope this helps,Raymond
February 4th, 2009 5:12pm

Hi Raymond-LeeReally :), itis the same report mentioned before but Iintend to explain more and the other post stopped to my suggestion like your solution No1let me do not forget to thank you alot for your detailed explanation and your perfect understanding of my intension, many thanksbut according to solution no1, Is theer any way to something like disable one of my 4 matrices in this report ?and why this related dependencies existence between row groups in the visibility, this not happens when using table?I actually still not try your second solution but I think it will change things.. Thank you alot :)MohamedWindows7_Is_MyLove
Free Windows Admin Tool Kit Click here and download it now
February 5th, 2009 11:26am

Hi Mohamed, Lets take a look at your second question first: why groups have relationship with each other when you hide some group. Actually you will get the same result in a table. Because the sequence of groups have been fixed when you generate a matrix (table). You can change it in matrix properties dialog (table properties dialog), but the sequence cannot dynamic change when some group be hidden. The sequence similar to inheritance relationship of groups (by default), it means you cannot create sun-group without father-group. Of cause, matrix gives us another choice: you can hide some group without changing of others visibility in textbox properties dialog. However, it will leave blank space to us (Without merge). If you want to use solution1 I mentioned before, I think you will have concernabout performance. Is this your first question about disable one matrix? There are two affected behavior. One is dataset running, another is report painting. You can set Execution of report in report manage. Apply for Cache a Temporary Copy of the report. By this, dataset will not run every time when you change the parameter. About the painting of report, its unlikely has any good workaround, because you need to re-paint report again when you change the parameter. At last I think you could use one parameter with available values to control the visibility. Hope this helps, Raymond
February 5th, 2009 4:25pm

Hi Abo Omar, As i per my knowledge, if you hide any group in matrix then the hidden group will not be functioning. if you have Group A B C and if you hide B then you report is only group A and C.
Free Windows Admin Tool Kit Click here and download it now
February 17th, 2011 1:14am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics